From: Gustaf Hendeby <hendeby@isy.liu.se>
To: Junio C Hamano <gitster@pobox.com>
Cc: vmiklos@frugalware.org, git@vger.kernel.org
Subject: Re: [PATCH] Make git add -n and git -u -n output consistent
Date: Fri, 23 May 2008 10:14:48 +0200 [thread overview]
Message-ID: <48367CF8.8040307@isy.liu.se> (raw)
In-Reply-To: <7vabihtyxw.fsf@gitster.siamese.dyndns.org>
On 05/23/2008 06:40 AM, Junio C Hamano wrote:
> Gustaf Hendeby <hendeby@isy.liu.se> writes:
>
>> Signed-off-by: Gustaf Hendeby <hendeby@isy.liu.se>
>> ---
>>
>> This would be one way to go to get a more coherent behavior or the -n
>> switch to git add. It would also unify the implementation somewhat.
>> I'd suggest amending this to your patch, or would the output be likely
>> to be used by scrips? In that case I'd vote for changing the output
>> of git add -n -u,
>
> The commit log message should describe what kind of consistency you are
> talking about to people who are not familiar with the topic.
Point taken, I will try to do better next time.
>
> Output format from "git add -n $path" lists path to blobs that are going
> to be added on a single line, separated with SP. On the other hand, the
> suggested "git add -u -n" shows one path per line, like "add '<file>'\n".
> Of course, these two are inconsistent.
>
> Plain "git add -n" can afford to only say names of paths, as all it does
> is to add (update). However, "git add -u" needs to be able to express
> "remove" somehow. So if we need to have them formatted the same way, we
> need to unify with the "git add -n -u" format. Incidentally, this is
> consistent with how 'update-index' says it.
>
> I do not think we need to worry about people who wrote script around
> output from "git add -n". Output from Porcelain commands is a fair game
> for improvements.
Thanks for the explaination.
/Gustaf
prev parent reply other threads:[~2008-05-23 8:15 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-15 16:08 [BUG] git add -u ignores --dry-run flag Gustaf Hendeby
2008-05-15 16:20 ` [PATCH] Make git add -u honor --dry-run Miklos Vajna
2008-05-15 18:46 ` Gustaf Hendeby
2008-05-15 23:42 ` Re* " Junio C Hamano
2008-05-16 0:13 ` Miklos Vajna
2008-05-19 22:14 ` Gustaf Hendeby
2008-05-22 18:16 ` Junio C Hamano
2008-05-22 19:34 ` Gustaf Hendeby
2008-05-22 20:38 ` Junio C Hamano
2008-05-22 21:12 ` Gustaf Hendeby
2008-05-22 21:59 ` [PATCH] Make git add -n and git -u -n output consistent Gustaf Hendeby
2008-05-23 4:40 ` Junio C Hamano
2008-05-23 8:14 ` Gustaf Hendeby [this message]
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=48367CF8.8040307@isy.liu.se \
--to=hendeby@isy.liu.se \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=vmiklos@frugalware.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.