From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17678 invoked by alias); 9 Jul 2008 00:52:15 -0000 Received: (qmail 17435 invoked by uid 22791); 9 Jul 2008 00:52:14 -0000 X-Spam-Status: No, hits=-1.6 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_SOFTFAIL X-Spam-Check-By: sourceware.org Received: from www.church-of-our-saviour.org (HELO thunker.thunk.org) (69.25.196.31) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 09 Jul 2008 00:51:48 +0000 Received: from root (helo=closure.thunk.org) by thunker.thunk.org with local-esmtp (Exim 4.50 #1 (Debian)) id 1KGNuM-000647-0a; Tue, 08 Jul 2008 20:51:46 -0400 Received: from tytso by closure.thunk.org with local (Exim 4.69) (envelope-from ) id 1KGNuL-00047U-4M; Tue, 08 Jul 2008 20:51:45 -0400 From: Theodore Ts'o To: systemtap@sources.redhat.com Cc: Theodore Ts'o Subject: [PATCH 2/2] Add hack to support git 1.6 in git_version.sh Date: Wed, 09 Jul 2008 00:52:00 -0000 Message-Id: <1215564705-15813-2-git-send-email-tytso@mit.edu> X-Mailer: git-send-email 1.5.6.1.205.ge2c7.dirty In-Reply-To: <1215564705-15813-1-git-send-email-tytso@mit.edu> References: <1215564705-15813-1-git-send-email-tytso@mit.edu> X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: tytso@mit.edu X-SA-Exim-Scanned: No (on thunker.thunk.org); SAEximRunCond expanded to false X-IsSubscribed: yes Mailing-List: contact systemtap-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: systemtap-owner@sourceware.org X-SW-Source: 2008-q3/txt/msg00105.txt.bz2 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 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< /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