Skip to content

Commit

Permalink
git am: Display some help text when patch is empty
Browse files Browse the repository at this point in the history
When a patch is found to be empty, prompt the user to use either
--skip or --abort.

Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Ramkumar Ramachandra authored and Junio C Hamano committed Jun 2, 2010
1 parent d2c4631 commit dc267b1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions git-am.sh
Original file line number Diff line number Diff line change
Expand Up @@ -592,6 +592,8 @@ do

test -s "$dotest/patch" || {
echo "Patch is empty. Was it split wrong?"
echo "If you would prefer to skip this patch, instead run \"$cmdline --skip\"."
echo "To restore the original branch and stop patching run \"$cmdline --abort\"."
stop_here $this
}
rm -f "$dotest/original-commit"
Expand Down

0 comments on commit dc267b1

Please sign in to comment.