author | David D. Kilzer <ddkilzer@kilzer.net> | |
Mon, 2 Aug 2010 19:58:19 +0000 (12:58 -0700) | ||
committer | Eric Wong <normalperson@yhbt.net> | |
Mon, 2 Aug 2010 21:21:56 +0000 (21:21 +0000) | ||
commit | 181264ad590ffef9d956fdd023369869c2d0a55f | |
tree | 8f6d3898daaf9f5db56a454ec2357497e073ec99 | tree | snapshot |
parent | 3713e2226bcda64513efd537f370ce4d7f767a1e | commit | diff |
git svn: fix dcommit to work with touched files
The dcommit command fails if an otherwise unmodified file has
been touched in the working directory:
Cannot dcommit with a dirty index. Commit your changes
first, or stash them with `git stash'.
This happens because "git diff-index" reports a difference
between the index and the filesystem:
:100644 100644 d00491...... 000000...... M file
The fix is to run "git update-index --refresh" before
"git diff-index" as is done in git-rebase and
git-rebase--interactive before "git diff-files".
This changes dcommit to display a list of modified files before
exiting.
Also add a similar test case for "git svn rebase".
[ew: rearranged commit message subject]
Signed-off-by: David D. Kilzer <ddkilzer@kilzer.net>
Acked-by: Eric Wong <normalperson@yhbt.net>
The dcommit command fails if an otherwise unmodified file has
been touched in the working directory:
Cannot dcommit with a dirty index. Commit your changes
first, or stash them with `git stash'.
This happens because "git diff-index" reports a difference
between the index and the filesystem:
:100644 100644 d00491...... 000000...... M file
The fix is to run "git update-index --refresh" before
"git diff-index" as is done in git-rebase and
git-rebase--interactive before "git diff-files".
This changes dcommit to display a list of modified files before
exiting.
Also add a similar test case for "git svn rebase".
[ew: rearranged commit message subject]
Signed-off-by: David D. Kilzer <ddkilzer@kilzer.net>
Acked-by: Eric Wong <normalperson@yhbt.net>
git-svn.perl | diff | blob | history | |
t/t9100-git-svn-basic.sh | diff | blob | history |