llvm.org GIT mirror llvm / 26506e1
Make the git-llvm script work on older git versions that don't support git rev-parse --git-common-dir. Not all versions of git support git rev-parse --git-common-dir. Rather than erorr or print any kind of useful error, they just print back '--git-common-dir' instead of a directory. The git-llvm script ends up taking this '--git-common-dir' as a diretory name to use. Not sure exactly what happens after that, but the end result is that the 'git llvm push' ends up looking like it pushed your commits, but really did nothing. This patch makes the script detect the bogus directory name for --git-common-dir and falls back to using --git-dir instead. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359939 91177308-0d34-0410-b5e6-96231b3b80d8 Craig Topper 5 months ago
1 changed file(s) with 5 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
391391
392392 # We need a staging area for SVN, let's hide it in the .git directory.
393393 dot_git_dir = git('rev-parse', '--git-common-dir')
394 # Not all versions of git support --git-common-dir and just print the
395 # unknown command back. If this happens, fall back to --git-dir
396 if dot_git_dir == '--git-common-dir':
397 dot_git_dir = git('rev-parse', '--git-dir')
398
394399 svn_root = os.path.join(dot_git_dir, 'llvm-upstream-svn')
395400 svn_init(svn_root)
396401