summaryrefslogtreecommitdiff
path: root/sequencer.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2016-10-27 21:58:50 (GMT)
committerJunio C Hamano <gitster@pobox.com>2016-10-27 21:58:50 (GMT)
commit650360210afbd585f33ed622d3e700b1941b1ddb (patch)
tree52a6857344b7e569f5fa3557cf4cd7827166f7c9 /sequencer.c
parentcca3be6ea15b07f22dcb1198a8c23193481ae2e7 (diff)
parent2c49f7ffb3063fdccccf2a038ab2eee66e7395e4 (diff)
downloadgit-650360210afbd585f33ed622d3e700b1941b1ddb.zip
git-650360210afbd585f33ed622d3e700b1941b1ddb.tar.gz
git-650360210afbd585f33ed622d3e700b1941b1ddb.tar.bz2
Merge branch 'nd/ita-empty-commit'
When new paths were added by "git add -N" to the index, it was enough to circumvent the check by "git commit" to refrain from making an empty commit without "--allow-empty". The same logic prevented "git status" to show such a path as "new file" in the "Changes not staged for commit" section. * nd/ita-empty-commit: commit: don't be fooled by ita entries when creating initial commit commit: fix empty commit creation when there's no changes but ita entries diff: add --ita-[in]visible-in-index diff-lib: allow ita entries treated as "not yet exist in index"
Diffstat (limited to 'sequencer.c')
-rw-r--r--sequencer.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sequencer.c b/sequencer.c
index a61fe76..5fd75f3 100644
--- a/sequencer.c
+++ b/sequencer.c
@@ -658,7 +658,7 @@ static int do_pick_commit(enum todo_command command, struct commit *commit,
unborn = get_sha1("HEAD", head);
if (unborn)
hashcpy(head, EMPTY_TREE_SHA1_BIN);
- if (index_differs_from(unborn ? EMPTY_TREE_SHA1_HEX : "HEAD", 0))
+ if (index_differs_from(unborn ? EMPTY_TREE_SHA1_HEX : "HEAD", 0, 0))
return error_dirty_index(opts);
}
discard_cache();
@@ -1312,7 +1312,7 @@ int sequencer_continue(struct replay_opts *opts)
if (res)
goto release_todo_list;
}
- if (index_differs_from("HEAD", 0)) {
+ if (index_differs_from("HEAD", 0, 0)) {
res = error_dirty_index(opts);
goto release_todo_list;
}