git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] format-patch: support really old non-range syntax, with a warning

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Jun 26, 2006, 23:14 UTC
Message-ID
<Pine.LNX.4.63.0606270113360.29667@wbgn013.biozentrum.uni-wuerzburg.de>
In-Reply-To
<7vk673h62w.fsf@assigned-by-dhcp.cox.net>
Now you can say (again)
	git format-patch <theirs> <mine>
Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
---
	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 <Johannes.Schindelin@gmx.de> 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)
Previous: Junio C HamanoNext: Martin Langhoff (CatalystIT)
Message 10 of 20 in “resurrect format-patch's patch id checking”
  1. 0/2 resurrect format-patch's patch id checkingJohannes Schindelin, Jun 25, 2006
  2. 3/2 format-patch: use clear_commit_marks() instead of some adhoceryJohannes Schindelin, Jun 26, 2006
  3. Junio C HamanoJun 26, 2006
  4. Johannes SchindelinJun 26, 2006
  5. Martin LanghoffJun 26, 2006
  6. Johannes SchindelinJun 26, 2006
  7. Martin LanghoffJun 26, 2006
  8. Johannes SchindelinJun 26, 2006
  9. Junio C HamanoJun 26, 2006
  10. format-patch: support really old non-range syntax, with a warningJohannes Schindelin, Jun 26, 2006
  11. Martin Langhoff (CatalystIT)Jun 26, 2006
  12. Johannes SchindelinJun 26, 2006
  13. Johannes SchindelinJun 27, 2006
  14. Martin LanghoffJun 27, 2006
  15. Johannes SchindelinJun 27, 2006
  16. Martin LanghoffJun 27, 2006
  17. Johannes SchindelinJun 27, 2006
  18. Junio C HamanoJun 26, 2006
  19. Johannes SchindelinJun 26, 2006
  20. format-patch: use clear_commit_marks() instead of some adhoceryJohannes Schindelin, Jun 27, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.