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

Re: [PATCH] filter-branch: return 2 when nothing to rewrite

From
Michele Locati <michele@locati.it>
Date
Mar 15, 2018, 16:18 UTC
Message-ID
<CAGen01hodC=z_74z+7fSSrx2kvPnSbOQaML9kBb9iO6xCvWHQA@mail.gmail.com>
In-Reply-To
<xmqq605x72qs.fsf@gitster-ct.c.googlers.com>
2018-03-15 16:55 GMT+01:00 Junio C Hamano <gitster@pobox.com>:
Show 16 quoted lines
> Jeff King <peff@peff.net> writes:
>
>> Hrm. I took the goal to mean that we used to exit with a failing "1" in
>> this case, and now we would switch to a more-specific "2". And I think
>> that matches the behavior of the patch:
>>
>> -test $commits -eq 0 && die "Found nothing to rewrite"
>> +test $commits -eq 0 && die_with_status 2 "Found nothing to rewrite"
>>
>> Am I missing something?
>
> No, other than that I wrote my response before sufficiently
> caffeinated ;-)
>
> Thanks, then other than the lack of doc updates, I do not see an
> issue.

Great! So, I'm ready to update the patch, including the doc changes, which will be the one suggested by Jeff:

EXIT STATUS -----------

On success, the exit status is `0`. If the filter can't find any commits to rewrite, the exit status is `2`. On any other error, the exit status may be any other non-zero value.

And yes, I'm a brand new contributor, so here's my question: how should I send an updated patch? I can't find anything related to this in https://github.com/git/git/blob/master/Documentation/SubmittingPatches

PS: nice community!

-- Michele

Previous: Junio C HamanoNext: Jeff King
Message 8 of 12 in “filter-branch: return 2 when nothing to rewrite”
  1. filter-branch: return 2 when nothing to rewriteMichele Locati, Mar 15, 2018
  2. Jeff KingMar 15, 2018
  3. Michele LocatiMar 15, 2018
  4. Jeff KingMar 15, 2018
  5. Junio C HamanoMar 15, 2018
  6. Jeff KingMar 15, 2018
  7. Junio C HamanoMar 15, 2018
  8. Michele LocatiMar 15, 2018
  9. Jeff KingMar 15, 2018
  10. filter-branch: return 2 when nothing to rewriteMichele Locati, Mar 15, 2018
  11. Junio C HamanoMar 15, 2018
  12. Jeff KingMar 15, 2018

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.