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:
authorKevin Ballard <kevin@sb.org>2010-03-30 06:46:38 +0400
committerJunio C Hamano <gitster@pobox.com>2010-03-30 08:22:37 +0400
commit657ab61efa918f46f1b412613643d1a1bbed2194 (patch)
tree5667119bfd878d0918ccdb5efdc6582241881c64 /builtin-log.c
parente07665e524d0398a34059d605f674182bfeeaf39 (diff)
format-patch: Squelch 'fatal: Not a range." error
Don't output an error on `git format-patch --ignore-if-in-upstream HEAD`. This matches the behavior of `git format-patch HEAD`. Signed-off-by: Kevin Ballard <kevin@sb.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin-log.c')
-rw-r--r--builtin-log.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/builtin-log.c b/builtin-log.c
index e0d5caa61b..76962e1b08 100644
--- a/builtin-log.c
+++ b/builtin-log.c
@@ -1106,8 +1106,15 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix)
return 0;
}
- if (ignore_if_in_upstream)
+ if (ignore_if_in_upstream) {
+ /* Don't say anything if head and upstream are the same. */
+ if (rev.pending.nr == 2) {
+ struct object_array_entry *o = rev.pending.objects;
+ if (hashcmp(o[0].item->sha1, o[1].item->sha1) == 0)
+ return 0;
+ }
get_patch_ids(&rev, &ids, prefix);
+ }
if (!use_stdout)
realstdout = xfdopen(xdup(1), "w");