From 23957b6c147b63db1c071a4c2daaf23b4185dadb Mon Sep 17 00:00:00 2001 From: Theodore Ts'o Date: Tue, 8 Jul 2008 20:51:44 -0400 Subject: Sync latest fix for git_version.sh from RadeonHD's tree This incorporates commit de4fbeeb: "Fix check for wrong macro in in git-version.sh", from the xf86-video-radeonhd tree. Signed-off-by: "Theodore Ts'o" --- git_version.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'git_version.sh') diff --git a/git_version.sh b/git_version.sh index 69eb0f24..5cf29437 100755 --- a/git_version.sh +++ b/git_version.sh @@ -314,7 +314,7 @@ int main(int argc, char *argv[]) const char *const prog = (idx)?(idx+1):(argv[0]); #ifdef PACKAGE_VERSION printf("%s: version %s, built from %s\n", prog, PACKAGE_VERSION, GIT_MESSAGE); -#elif defined(GIT_USED) +#elif defined(GIT_MESSAGE) printf("%s: built from %s\n", prog, GIT_MESSAGE); #endif return 0; -- cgit From d99a656a615dd78773316b7ac3972f3f1bcd5fca Mon Sep 17 00:00:00 2001 From: Theodore Ts'o Date: Tue, 8 Jul 2008 20:51:45 -0400 Subject: Add hack to support git 1.6 in git_version.sh This is needed now for people who are running the "master" branch of git, which is currently in development for git version 1.6.0. This is a kludge to support hyphenated git commands (i.e., git-diff-files), but this form is explicitly deprecated, and doesn't work in git 1.6 unless you put git's execdir (obtained via git --exec-path) in your PATH environment variable. Even then, these programs may no longer exist future versions of git. It would be better to change the script to use "git diff-files", et. al., but I assume upstream had some vaguely justifiable reason for not writing the script that way. I'll let them decide when they are willing to fix the script the right way, even if it means breaking compatibility for some ancient version of git. n.b., git 1.5.0 was released February 2007, and git 1.4.0 was released June, 2006. Signed-off-by: "Theodore Ts'o" --- git_version.sh | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'git_version.sh') diff --git a/git_version.sh b/git_version.sh index 5cf29437..50658970 100755 --- a/git_version.sh +++ b/git_version.sh @@ -155,6 +155,29 @@ cat< /dev/null) +if test -n "$execdir"; then + PATH=$PATH:$execdir +fi + # Detect git tools (should work with old and new git versions) git_found=yes for git_tool in git-symbolic-ref git-rev-parse git-diff-files git-diff-index git -- cgit