summaryrefslogtreecommitdiff
path: root/git-rebase.sh
diff options
context:
space:
mode:
authorDavid D. Kilzer <ddkilzer@kilzer.net>2010-07-28 08:20:16 (GMT)
committerJunio C Hamano <gitster@pobox.com>2010-07-28 20:57:36 (GMT)
commit25e932504096ad5cba21978a0b9a13e2708bae87 (patch)
treee5742063c2b6de345882d8abf0095b1dc83e8acf /git-rebase.sh
parent5bc0e247c4f281b44cfb72a5b31f479233a981f5 (diff)
downloadgit-25e932504096ad5cba21978a0b9a13e2708bae87.zip
git-25e932504096ad5cba21978a0b9a13e2708bae87.tar.gz
git-25e932504096ad5cba21978a0b9a13e2708bae87.tar.bz2
Fix git rebase --continue to work with touched files
When performing a non-interactive rebase, sometimes "git rebase --continue" will fail if an unmodified file is touched in the working directory: You must edit all merge conflicts and then mark them as resolved using git add This is caused by "git diff-files" reporting 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-files" as is done in git-rebase--interactive. Signed-off-by: David D. Kilzer <ddkilzer@kilzer.net> Acked-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-rebase.sh')
-rwxr-xr-xgit-rebase.sh1
1 files changed, 1 insertions, 0 deletions
diff --git a/git-rebase.sh b/git-rebase.sh
index ab4afa7..2d88742 100755
--- a/git-rebase.sh
+++ b/git-rebase.sh
@@ -208,6 +208,7 @@ do
test -d "$dotest" -o -d "$GIT_DIR"/rebase-apply ||
die "No rebase in progress?"
+ git update-index --ignore-submodules --refresh &&
git diff-files --quiet --ignore-submodules || {
echo "You must edit all merge conflicts and then"
echo "mark them as resolved using git add"