From: "Øystein Walle" <oystwa@gmail.com>
To: git@vger.kernel.org
Subject: Re: [PATCH] for-each-ref: add option to omit newlines
Date: Fri, 14 Feb 2014 23:03:21 +0000 (UTC) [thread overview]
Message-ID: <loom.20140215T000328-538@post.gmane.org> (raw)
In-Reply-To: xmqq38jlk6a1.fsf@gitster.dls.corp.google.com
Junio C Hamano <gitster <at> pobox.com> writes:
>
> I very well understand that. All other commands that support "-z"
> to give you NUL terminated output do not consider that a downside.
> Why should for-each-ref be special?
>
After I discovered log also has this there is nothing special about
for-each-ref any longer, so my patch as-is would only make things less
consistent. What is "special" is that they give you the option of
supplying a format string.
ls-files, diff and others print a specific list of items (paths, shas,
...) and there's no question about how they are presented other than the
delimiter between each item, to which a selection of either a newline or
a null byte is plenty.
With log, for-each-ref and rev-list (any others?) that sort of breaks
down. With the format string you're given the power to make the command
print basically anything you like, however you like; no longer only a
question of mere delimiters. It only makes sense then (to me, at least)
that the command does not meddle with the format the user has chosen.
Maybe it's all subjective... I'm okay with just leaving things as they
are. There are ways around it.
next prev parent reply other threads:[~2014-02-14 23:03 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-13 18:00 [PATCH] for-each-ref: add option to omit newlines Øystein Walle
2014-02-13 18:15 ` Øystein Walle
2014-02-13 20:10 ` Junio C Hamano
2014-02-14 8:11 ` Øystein Walle
2014-02-14 16:28 ` Junio C Hamano
2014-02-14 23:03 ` Øystein Walle [this message]
2014-02-14 23:24 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=loom.20140215T000328-538@post.gmane.org \
--to=oystwa@gmail.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.