summaryrefslogtreecommitdiff
path: root/git-format-patch.sh
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2005-11-05 10:47:07 (GMT)
committerJunio C Hamano <junkio@cox.net>2005-11-05 10:48:29 (GMT)
commitbd7c8aab7098e6e340060c0d7f1fab8595905b2d (patch)
tree1716c8cab10ebda830a9678368c6bd973d2f0936 /git-format-patch.sh
parentfdd089793c1d694fa742da51dfbf0227d61d4c0e (diff)
downloadgit-bd7c8aab7098e6e340060c0d7f1fab8595905b2d.zip
git-bd7c8aab7098e6e340060c0d7f1fab8595905b2d.tar.gz
git-bd7c8aab7098e6e340060c0d7f1fab8595905b2d.tar.bz2
format-patch: "rev1.." should mean "rev1..HEAD"
"rev1.." should mean "rev1..HEAD"; git-diff users are familiar with that syntax. Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'git-format-patch.sh')
-rwxr-xr-xgit-format-patch.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/git-format-patch.sh b/git-format-patch.sh
index 0207ab1..5b93ff8 100755
--- a/git-format-patch.sh
+++ b/git-format-patch.sh
@@ -92,11 +92,18 @@ filelist=$tmp-files
# 3. "rev1" "rev2 is equivalent to "rev1..rev2"
#
# We want to take a sequence of "rev1..rev2" in general.
+# Also, "rev1.." should mean "rev1..HEAD"; git-diff users are
+# familiar with that syntax.
case "$#,$1" in
1,?*..?*)
# single "rev1..rev2"
;;
+1,?*..)
+ # single "rev1.." should mean "rev1..HEAD"
+ set x "$1"HEAD"
+ shift
+ ;;
1,*)
# single rev1
set x "$1..HEAD"