mirror of
https://github.com/frej/fast-export.git
synced 2025-11-01 08:55:47 +01:00
hg-fast-export: work still if git-commands are not in PATH
In git 1.6.0, most git tools with a dash in the name will no longer be installed in $bindir. This patch makes hg-fast-export use the "git <command>" form so it will work even if "git" is the only piece of git machinery in the user's PATH. On the other hand, the "git <command>" form does not help for sourcing a shell script (with "."). So use the full path to source "git-sh-setup". Signed-off-by: Jonathan Nieder <jrnieder@uchicago.edu>
This commit is contained in:
committed by
Rocco Rutte
parent
205c76749a
commit
8be4e6b3d0
@@ -86,7 +86,7 @@ def save_cache(filename,cache):
|
||||
def get_git_sha1(name,type='heads'):
|
||||
try:
|
||||
# use git-rev-parse to support packed refs
|
||||
cmd="GIT_DIR='%s' git-rev-parse --verify refs/%s/%s 2>/dev/null" % (os.getenv('GIT_DIR','/dev/null'),type,name)
|
||||
cmd="GIT_DIR='%s' git rev-parse --verify refs/%s/%s 2>/dev/null" % (os.getenv('GIT_DIR','/dev/null'),type,name)
|
||||
p=os.popen(cmd)
|
||||
l=p.readline()
|
||||
p.close()
|
||||
|
||||
Reference in New Issue
Block a user