public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 1/2] Sync latest fix for git_version.sh from RadeonHD's tree
@ 2008-07-09  0:52 Theodore Ts'o
  2008-07-09  0:52 ` [PATCH 2/2] Add hack to support git 1.6 in git_version.sh Theodore Ts'o
  0 siblings, 1 reply; 2+ messages in thread
From: Theodore Ts'o @ 2008-07-09  0:52 UTC (permalink / raw)
  To: systemtap; +Cc: Theodore Ts'o

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" <tytso@mit.edu>
---
 git_version.sh |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/git_version.sh b/git_version.sh
index 69eb0f2..5cf2943 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;
-- 
1.5.6.1.205.ge2c7.dirty

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [PATCH 2/2] Add hack to support git 1.6 in git_version.sh
  2008-07-09  0:52 [PATCH 1/2] Sync latest fix for git_version.sh from RadeonHD's tree Theodore Ts'o
@ 2008-07-09  0:52 ` Theodore Ts'o
  0 siblings, 0 replies; 2+ messages in thread
From: Theodore Ts'o @ 2008-07-09  0:52 UTC (permalink / raw)
  To: systemtap; +Cc: Theodore Ts'o

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" <tytso@mit.edu>
---
 git_version.sh |   23 +++++++++++++++++++++++
 1 files changed, 23 insertions(+), 0 deletions(-)

diff --git a/git_version.sh b/git_version.sh
index 5cf2943..5065897 100755
--- a/git_version.sh
+++ b/git_version.sh
@@ -155,6 +155,29 @@ cat<<EOF
 
 EOF
 
+# Backwards compatibility hack for git 1.6.0 (and people running the
+# latest pre-release version of git.) 
+#
+# For now, we'll do this to support git 1.6, with minimal changes to
+# the rest of this script, but no guarantees how long this will work.
+# The hyphenated git-foo-bar names really are deprecated, and may
+# disappear in the future as more of git gets rewritten as built-in C
+# programs.  Google summer of code students and other git developers
+# are hard at work doing this, in order to make git more
+# portable/usable for Windows users.  As a result, some of the
+# git-foo-bar programs, which will be moved to the exec-dir directory
+# in git 1.6, may disappear altogether in the future.  Hence the only
+# truly safe and future-compatible way of running commands such as
+# git-diff-files, git-rev-parse, etc., are "git diff-files" and 
+# "git rev-parse".  Here endeth the git portability sermon, which
+# I suspect will have as much effect as abstinence-only sex ed 
+# classes.  :-)   TYT, 2008-07-08
+
+execdir=$(git --exec-path 2> /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
-- 
1.5.6.1.205.ge2c7.dirty

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-07-09  0:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-07-09  0:52 [PATCH 1/2] Sync latest fix for git_version.sh from RadeonHD's tree Theodore Ts'o
2008-07-09  0:52 ` [PATCH 2/2] Add hack to support git 1.6 in git_version.sh Theodore Ts'o

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).