threads / discuss / 23551

Git-SVN on Cygwin 1.7: git svn rebase b0rks index if not run from top-level directory

Subject: Git-SVN on Cygwin 1.7: git svn rebase b0rks index if not run from top-level directory

## tl;dr

5 messages between Apr 21, 2010 and May 27, 2010.

replies: 4people: 3as markdown or json

Matthias Andree· Apr 21, 2010, 16:56 UTC · lore
Greetings,

Looking for help - I have some issues with git-svn as of git version 1.7.1.rc1.12.ga601 on Cygwin 1.7.5 w/ Windows 7 32-bit professional German, but this has been going on for a while now, but I hadn't figured how to reproduce.

=== Symptoms ===

When I run "git svn rebase" (trace below) *from a working directory somewhere deep in the checkout,* the index gets dirty.

git diff-index HEAD then shows a massive amount of files that were to be updated:

$ git diff-index HEAD :100644 100644 faba562f37df8f4a308594b9b867470507229292 0000000000000000000000000000000000000000 M .project :100644 100644 0184158eda0e3787d5d29e1f23a6809ed3e4b54c 0000000000000000000000000000000000000000 M README.txt :100644 100644 d00be041aecaf00e2c3e7358911a6e5d493e9e7f 0000000000000000000000000000000000000000 M docs/.gitignore :100644 100644 bed116f07ba5742e6ed344553008c262656020c7 0000000000000000000000000000000000000000 M docs/d3.3/.gitignore [...]

This is always 100644 100644 SHA1 000...000 M filename.
=== Impact ===
- Several parts of git then show bogus local changes, for instance, gitk.
- git svn dcommit aborts because it believes the index were dirty
=== Workarounds ===
Either is sufficient:
1. cd to top-level directory before running git-svn
2. git update-index --refresh
=== Reproduce ===
1. Use a git-svn checkout that has at least one subdirectory
2. cd to that subdirectory
3. run git svn rebase. It concludes successfully, then:
4. git diff-index HEAD -> output like the one shown above.
=== Trace ===

trace: exec: 'git-svn' 'rebase' trace: run_command: 'git-svn' 'rebase' trace: built-in: git 'rev-parse' '--show-cdup' trace: built-in: git 'config' '--bool' '--get' 'svn.fetchall' trace: built-in: git 'config' '--bool' '--get' 'svn.noauthcache' trace: built-in: git 'config' '--bool' '--get' 'svn.nocheckout' trace: built-in: git 'config' '--get' 'svn.authorsprog' trace: built-in: git 'config' '--bool' '--get' 'svn.dryrun' trace: built-in: git 'config' '--bool' '--get' 'svn.followparent' trace: built-in: git 'config' '--bool' '--get' 'svn.useSvmProps' trace: built-in: git 'config' '--get' 'svn.authorsfile' trace: built-in: git 'config' '--get' 'svn.repackflags' trace: built-in: git 'config' '--bool' '--get' 'svn.localtime' trace: built-in: git 'config' '--get' 'svn.username' trace: built-in: git 'config' '--int' '--get' 'svn.repack' trace: built-in: git 'config' '--get' 'svn.ignorepaths' trace: built-in: git 'config' '--bool' '--get' 'svn.quiet' trace: built-in: git 'config' '--bool' '--get' 'svn.verbose' trace: built-in: git 'config' '--int' '--get' 'svn.logwindowsize' trace: built-in: git 'config' '--get' 'svn.configdir' trace: built-in: git 'config' '--bool' '--get' 'svn.merge' trace: built-in: git 'config' '--bool' '--get' 'svn.addauthorfrom' trace: built-in: git 'config' '--bool' '--get' 'svn.useSvnsyncProps' trace: built-in: git 'config' '--bool' '--get' 'svn.noMetadata' trace: built-in: git 'config' '--bool' '--get' 'svn.local' trace: built-in: git 'config' '--get' 'svn.strategy' trace: built-in: git 'config' '--bool' '--get' 'svn.uselogauthor' trace: built-in: git 'rev-parse' '--symbolic' '--all' trace: built-in: git 'config' '-l' trace: built-in: git 'config' '-l' trace: built-in: git 'update-index' '--refresh' trace: built-in: git 'log' '--no-color' '--first-parent' '--pretty=medium' 'HEAD' trace: built-in: git 'config' '--bool' 'svn.useSvmProps' trace: built-in: git 'config' '-l' trace: built-in: git 'for-each-ref' '--format=%(refname)' 'refs/' trace: built-in: git 'for-each-ref' '--format=%(refname)' 'refs/' trace: built-in: git 'config' '--get' 'svn-remote.svn.rewriteRoot' trace: built-in: git 'config' '--get' 'svn-remote.svn.url' trace: built-in: git 'config' '--get' 'svn-remote.svn.uuid' trace: built-in: git 'rev-list' '--pretty=raw' '--no-color' '--reverse' 'thesamehashthatwasreplacedforprivacy..refs/remotes/trunk' '--' trace: built-in: git 'config' '--get' 'svn-remote.svn.rewriteRoot' trace: built-in: git 'config' '--get' 'svn-remote.svn.rewriteUUID' trace: built-in: git 'diff-index' 'HEAD' '--' trace: built-in: git 'config' '--get' 'svn-remote.svn.usesvmprops' trace: built-in: git 'config' '--get' 'svn-remote.svn.nometadata' trace: built-in: git 'cat-file' 'commit' 'thesamehashthatwasreplacedforprivacy' trace: built-in: git 'config' 'svn-remote.svn.reposRoot' 'svn+ssh://scm.gforge.inria.fr/svn/PROJECT' trace: built-in: git 'rev-list' '--pretty=raw' '--no-color' '--reverse' 'thesamehashthatwasreplacedforprivacy..refs/remotes/trunk' '--' trace: built-in: git 'config' 'svn-remote.svn.reposRoot' 'svn+ssh://scm.gforge.inria.fr/svn/PROJECT' trace: exec: 'git-rebase' 'refs/remotes/trunk' trace: run_command: 'git-rebase' 'refs/remotes/trunk' trace: built-in: git 'rev-parse' '--git-dir' trace: built-in: git 'rev-parse' '--show-toplevel' trace: built-in: git 'config' '--bool' 'rebase.stat' trace: built-in: git 'update-index' '--ignore-submodules' '--refresh' trace: built-in: git 'diff-index' '--cached' '--name-status' '-r' '--ignore-submodules' 'HEAD' '--' trace: built-in: git 'rev-parse' '--verify' 'refs/remotes/trunk^0' trace: built-in: git 'rev-parse' '--verify' 'refs/remotes/trunk^0' trace: built-in: git 'symbolic-ref' 'HEAD' trace: built-in: git 'symbolic-ref' '-q' 'HEAD' trace: built-in: git 'rev-parse' '--verify' 'master^0' trace: built-in: git 'merge-base' 'thesamehashthatwasreplacedforprivacy' 'thesamehashthatwasreplacedforprivacy' trace: built-in: git 'rev-list' '--parents' 'thesamehashthatwasreplacedforprivacy..thesamehashthatwasreplacedforprivacy' Current branch master is up to date.

-- 
Matthias Andree
Alexander Iljin· Apr 21, 2010, 18:41 UTC · re: Matthias Andree · lore

Re: Git 1.7 rebase problems

Hello!

MA> Looking for help - I have some issues with git-svn as of git version MA> 1.7.1.rc1.12.ga601 on Cygwin 1.7.5 w/ Windows 7 32-bit professional German, but MA> this has been going on for a while now, but I hadn't figured how to reproduce.

MA> === Symptoms ===

MA> When I run "git svn rebase" (trace below) *from a working directory somewhere MA> deep in the checkout,* the index gets dirty.

  Wow! I just filed a very similar issue at msysGit discussion group,
  with steps to reproduce, etc. See here:
  http://groups.google.com/group/msysgit/browse_thread/thread/c7218c7d1ba8949b
  I could not make interactive rebase work, it just hanged there.
  Going to the root of the repository fixed the problem.
---=====---
 Alexander
Eric Wong· May 26, 2010, 18:51 UTC · re: Matthias Andree · lore

Re: Git svn rebase/dcommit break (index) if not run from directory containing ./.git

Matthias Andree <matthias.andree@gmx.de> wrote:
Show 14 quoted lines
> [resending this with new Subject since there wasn't a reply in 33 days,  
> cc:ing Eric]
>
> === Reproduce ===
>
> 1. Use a git-svn checkout that has at least one subdirectory
>
> 2. cd to that subdirectory
>
> 3. run git svn rebase. It concludes successfully, then:
>
> 4. git diff-index HEAD -> output like the one shown above.
>
> This is on Cygwin 1.7.5 w/ Windows 7 32-bit professional German.
Hi Matthias,

I can't reproduce this on a GNU/Linux system, so I'm guessing this is a weird Cygwin/Windows issue, and I don't know Windows.

-- 
Eric Wong
Matthias Andree· May 27, 2010, 08:13 UTC · re: Eric Wong · lore

Re: Git svn rebase/dcommit break (index) if not run from directory containing ./.git

Am 26.05.2010, 20:51 Uhr, schrieb Eric Wong:
Show 20 quoted lines
> Matthias Andree <matthias.andree@gmx.de> wrote:
>> [resending this with new Subject since there wasn't a reply in 33 days,
>> cc:ing Eric]
>>
>> === Reproduce ===
>>
>> 1. Use a git-svn checkout that has at least one subdirectory
>>
>> 2. cd to that subdirectory
>>
>> 3. run git svn rebase. It concludes successfully, then:
>>
>> 4. git diff-index HEAD -> output like the one shown above.
>>
>> This is on Cygwin 1.7.5 w/ Windows 7 32-bit professional German.
>
> Hi Matthias,
>
> I can't reproduce this on a GNU/Linux system, so I'm guessing this
> is a weird Cygwin/Windows issue, and I don't know Windows.

Do you deem it possible to have the workaround applied in code, i. e. change to the top-level directory up front?

If not, any hints as to debugging facilities and procedures beyond GIT_TRACE?

-- 
Matthias Andree
Eric Wong· May 27, 2010, 21:04 UTC · re: Matthias Andree · lore

Re: Git svn rebase/dcommit break (index) if not run from directory containing ./.git

Matthias Andree <matthias.andree@gmx.de> wrote:
Show 24 quoted lines
> Am 26.05.2010, 20:51 Uhr, schrieb Eric Wong:
>> Matthias Andree <matthias.andree@gmx.de> wrote:
>>> [resending this with new Subject since there wasn't a reply in 33 days,
>>> cc:ing Eric]
>>>
>>> === Reproduce ===
>>>
>>> 1. Use a git-svn checkout that has at least one subdirectory
>>>
>>> 2. cd to that subdirectory
>>>
>>> 3. run git svn rebase. It concludes successfully, then:
>>>
>>> 4. git diff-index HEAD -> output like the one shown above.
>>>
>>> This is on Cygwin 1.7.5 w/ Windows 7 32-bit professional German.
>>
>> Hi Matthias,
>>
>> I can't reproduce this on a GNU/Linux system, so I'm guessing this
>> is a weird Cygwin/Windows issue, and I don't know Windows.
>
> Do you deem it possible to have the workaround applied in code, i. e.  
> change to the top-level directory up front?

"git rebase" (invoked by "git svn") already does that. This could be a bug in "git rebase" itself...

> If not, any hints as to debugging facilities and procedures beyond  
> GIT_TRACE?

Well I usually use "strace -f", but that's Linux-only. Maybe there's something similar for Cygwin.

-- 
Eric Wong

← back to recent threads