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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mar 26, 2010, at 4:31 PM, Kevin Ballard wrote:

> 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@xxxxxx
http://www.tildesoft.com



<<attachment: smime.p7s>>


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]