Skip to content

Commit

Permalink
Merge branch 'master' into next
Browse files Browse the repository at this point in the history
* master:
  Merge fixes early for next maint series.
  Merge branch 'fix' into maint
  git-am: do not allow empty commits by mistake.
  • Loading branch information
Junio C Hamano committed Feb 24, 2006
2 parents 7465ef5 + a68de95 commit 1b1ad31
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions git-am.sh
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ do
} >"$dotest/final-commit"
;;
*)
case "$resolved,$interactive" in
case "$resolved$interactive" in
tt)
# This is used only for interactive view option.
git-diff-index -p --cached HEAD >"$dotest/patch"
Expand Down Expand Up @@ -364,6 +364,12 @@ do
# trust what the user has in the index file and the
# working tree.
resolved=
changed="$(git-diff-index --cached --name-only HEAD)"
if test '' = "$changed"
then
echo "No changes - did you forget update-index?"
stop_here $this
fi
apply_status=0
;;
esac
Expand All @@ -374,7 +380,7 @@ do
then
# Applying the patch to an earlier tree and merging the
# result may have produced the same tree as ours.
changed="$(git-diff-index --cached --name-only -z HEAD)"
changed="$(git-diff-index --cached --name-only HEAD)"
if test '' = "$changed"
then
echo No changes -- Patch already applied.
Expand Down

0 comments on commit 1b1ad31

Please sign in to comment.