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

Re: [PATCH] rebase: Squelch the "fatal: Not an error." message

From
Kevin Ballard <kevin@sb.org>
Date
Mar 27, 2010, 00:08 UTC
Message-ID
<46BEF37C-3E3F-4490-9CE6-C0109438C181@sb.org>
In-Reply-To
<F8E395F5-C248-4A95-B2EF-A36E941FFDCF@sb.org>
On Mar 26, 2010, at 4:31 PM, Kevin Ballard wrote:
Show 8 quoted lines
> On Mar 26, 2010, at 12:25 PM, Junio C Hamano wrote:
> 
>> Hmm, since "git format-patch HEAD" simply exits with success, I am
>> inclined to think that we should fix "format-patch HEAD..HEAD" to do the
>> same instead.  I didn't check how involved such a change might be,
>> though.
> 
> Actually it doesn't. The line `git format-patch --ignore-if-in-upstream HEAD` gives the same error (the flag seems to be necessary to get the error in the first place). In any case, I'll see if I can't figure out why it's giving that error.
Hmm, it seems like the easiest fix is just to comment out the following block in log.c (in get_patch_ids, line 645 on current next):
	if ((flags1 & UNINTERESTING) == (flags2 & UNINTERESTING))
		die("Not a range.");
Without that line, `git format-patch --ignore-if-in-upstream HEAD` returns the expected empty output. I also ran the complete test suite (excluding SVN tests) and there were no breakages. However I don't understand the purpose behind that assertion in the first place (as I am not familiar with the workings of rev_info or patch_ids) so I don't know if this change is really appropriate (though I would assume that if it wasn't, a test somewhere would break).
-Kevin Ballard
-- 
Kevin Ballard
http://kevin.sb.org
kevin@sb.org
http://www.tildesoft.com
Previous: Kevin BallardNext: Kevin Ballard
Message 5 of 6 in “rebase: Squelch the "fatal: Not an error." message”
  1. rebase: Squelch the "fatal: Not an error." messageKevin Ballard, Mar 24, 2010
  2. Kevin BallardMar 25, 2010
  3. Junio C HamanoMar 26, 2010
  4. Kevin BallardMar 26, 2010
  5. Kevin BallardMar 27, 2010
  6. format-patch: Squelch 'fatal: Not a range." errorKevin Ballard, Mar 30, 2010

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.