From: Johannes Schindelin Date: Mon, 26 Jun 2006 23:14:59 GMT Subject: [PATCH] format-patch: support really old non-range syntax, with a warning Message-ID: In-Reply-To: <7vk673h62w.fsf@assigned-by-dhcp.cox.net> Now you can say (again) git format-patch Signed-off-by: Johannes Schindelin --- Re: [PATCH 3/2] format-patch: use clear_commit_marks() instead of some adhocery On Mon, 26 Jun 2006, Junio C Hamano wrote: > Johannes Schindelin writes: > > >> > Could you test with "origin..master" instead of "origin master"? > >> > >> Funny you mention that! Now it works ;-) and it even produces the > >> patches I would expect. > > > > The funny thing is: I did something to account for the old syntax, but > > only if you specified _one_ ref, not _two_. It would be easy, but is it > > needed? (I.e. are your fingers so trained on it?) > > If possible I'd rather correct the two syntaxes once and for all now. > Maybe accept two with a warning for deprecation? Here you are. (Tested once -- works great!) builtin-log.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/builtin-log.c b/builtin-log.c index 44d2d13..64b2830 100644 --- a/builtin-log.c +++ b/builtin-log.c @@ -260,6 +260,11 @@ int cmd_format_patch(int argc, const cha if (rev.pending.nr == 1) { rev.pending.objects[0].item->flags |= UNINTERESTING; add_head(&rev); + } else if (rev.pending.nr == 2 + && !(rev.pending.objects[0].item->flags & UNINTERESTING) + && !(rev.pending.objects[1].item->flags & UNINTERESTING)) { + rev.pending.objects[0].item->flags |= UNINTERESTING; + fprintf(stderr, "WARNING: obsolete syntax (no range)!\n"); } if (!use_stdout)