[llvm] r286140 - Fix `git-llvm` script to handle `git worktree` setups correctly

Mehdi Amini via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 7 12:35:03 PST 2016


Author: mehdi_amini
Date: Mon Nov  7 14:35:02 2016
New Revision: 286140

URL: http://llvm.org/viewvc/llvm-project?rev=286140&view=rev
Log:
Fix `git-llvm` script to handle `git worktree` setups correctly

Modified:
    llvm/trunk/utils/git-svn/git-llvm

Modified: llvm/trunk/utils/git-svn/git-llvm
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/git-svn/git-llvm?rev=286140&r1=286139&r2=286140&view=diff
==============================================================================
--- llvm/trunk/utils/git-svn/git-llvm (original)
+++ llvm/trunk/utils/git-svn/git-llvm Mon Nov  7 14:35:02 2016
@@ -221,7 +221,8 @@ def cmd_push(args):
     os.chdir(git_root)
 
     # We need a staging area for SVN, let's hide it in the .git directory.
-    svn_root = os.path.join(git_root, '.git', 'llvm-upstream-svn')
+    dot_git_dir = git('rev-parse', '--git-common-dir')
+    svn_root = os.path.join(dot_git_dir, 'llvm-upstream-svn')
     svn_init(svn_root)
 
     rev_range = args.rev_range




More information about the llvm-commits mailing list