summaryrefslogtreecommitdiff
path: root/builtin-log.c
diff options
context:
space:
mode:
authorJohannes Schindelin <Johannes.Schindelin@gmx.de>2006-05-06 20:56:38 (GMT)
committerJunio C Hamano <junkio@cox.net>2006-05-06 21:43:33 (GMT)
commite686eb9870d6b382f0760e3e859e93c8c2dfb31b (patch)
treedc2e0a4d1fa970c1dd8d9252536d8496e785bf4b /builtin-log.c
parentc66b6c067e49c5ec80f1254daef79aa1c7f5ffce (diff)
downloadgit-e686eb9870d6b382f0760e3e859e93c8c2dfb31b.zip
git-e686eb9870d6b382f0760e3e859e93c8c2dfb31b.tar.gz
git-e686eb9870d6b382f0760e3e859e93c8c2dfb31b.tar.bz2
fmt-patch: understand old <his> notation
When calling "git fmt-patch HEAD~5", you now get the same as if you would have said "git fmt-patch HEAD~5..". This makes it easier for my fingers which are so used to the old syntax. Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'builtin-log.c')
-rw-r--r--builtin-log.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/builtin-log.c b/builtin-log.c
index 0027998..d5bbc1c 100644
--- a/builtin-log.c
+++ b/builtin-log.c
@@ -11,6 +11,9 @@
#include "log-tree.h"
#include "builtin.h"
+/* this is in builtin-diff.c */
+void add_head(struct rev_info *revs);
+
static int cmd_log_wc(int argc, const char **argv, char **envp,
struct rev_info *rev)
{
@@ -185,6 +188,11 @@ int cmd_format_patch(int argc, const char **argv, char **envp)
if (argc > 1)
die ("unrecognized argument: %s", argv[1]);
+ if (rev.pending_objects && rev.pending_objects->next == NULL) {
+ rev.pending_objects->item->flags |= UNINTERESTING;
+ add_head(&rev);
+ }
+
if (!use_stdout)
realstdout = fdopen(dup(1), "w");