Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2010-04-18 16:01:45 +0400
committerJunio C Hamano <gitster@pobox.com>2010-04-18 22:41:53 +0400
commit77bc694907bdf517407cc6f79da8adf9a4879cea (patch)
tree12ecf017133b1f6975a325a7a372be25070601ad /git-rebase--interactive.sh
parentf3bd6ab7ea7b35ca5f26f106eb00a00f257716d7 (diff)
rebase-interactive: silence warning when no commits rewritten
If you do a "rebase -i" and don't change any commits, nothing is rewritten, and we have no REWRITTEN_LIST. The shell prints out an ugly message: $ GIT_EDITOR=true git rebase -i HEAD^ /path/to/git-rebase--interactive: 1: cannot open /path/to/repo/.git/rebase-merge/rewritten-list: No such file Successfully rebased and updated refs/heads/master. We can fix it by not running "notes copy" at all if nothing was rewritten. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-rebase--interactive.sh')
-rwxr-xr-xgit-rebase--interactive.sh1
1 files changed, 1 insertions, 0 deletions
diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh
index b817c4a76e..436b7f5977 100755
--- a/git-rebase--interactive.sh
+++ b/git-rebase--interactive.sh
@@ -565,6 +565,7 @@ do_next () {
git diff-tree --stat $(cat "$DOTEST"/head)..HEAD
} &&
{
+ test -s "$REWRITTEN_LIST" &&
git notes copy --for-rewrite=rebase < "$REWRITTEN_LIST" ||
true # we don't care if this copying failed
} &&