Thread (41 messages) 41 messages, 5 authors, 2025-03-19

Re: [PATCH 0/4] rev-list: introduce NUL-delimited output mode

From: Jeff King <hidden>
Date: 2025-03-14 02:49:31

On Thu, Mar 13, 2025 at 11:41:56AM -0500, Justin Tobler wrote:
quoted
Though that does mean that these two commands
will behave differently:

  git log --stdin -z
  git rev-list --stdin -z

which seems...not great. My earlier suggestion to tie "-z" to stdin
handling was for consistency with other tools like grep. But if we
already have cases where "-z" is only for output, maybe it is better to
stay consistent with other parts of git. I.e., I was worried about us
painting ourselves into a corner with your patches, but we may have
already done so years ago. ;)
I think to some extent Git is already inconsistent here. IMO it would be
preferable for both input and output to use NUL as the delimiter when
machine parsing in git-rev-list(1) as that is the behavior I would
personally expect. I also agree with Patrick's reasoning else where in
this thread[1].

I'm open to discuss further though :)
Nope, I don't have anything further to add. I just wanted to make sure
my suggestion in the earlier part of the thread was not leading us
accidentally down a bad path. ;) If the inconsistencies have been
considered and we're OK with them, that sounds good to me (and the
option handling in your v2 does seem to faithfully implement that).

Thanks for all your responses.

-Peff
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help