X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=builtin-log.c;h=76962e1b08ec6a7e52320c97cc3b54887cc67ef9;hb=cb198b3b67feb2c0a6f22199ec14fa48d18ac1ce;hp=e0d5caa61bac72cb40272ab26aa9b2202d5bb3e8;hpb=f54555ca29146e72d674d090a760d7bfc9afd77f;p=git.git diff --git a/builtin-log.c b/builtin-log.c index e0d5caa61..76962e1b0 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");