git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Gustaf Hendeby <hendeby@isy.liu.se>
Cc: vmiklos@frugalware.org, git@vger.kernel.org
Subject: Re: [PATCH] Make git add -n and git -u -n output consistent
Date: Thu, 22 May 2008 21:40:59 -0700	[thread overview]
Message-ID: <7vabihtyxw.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <1211493582-13400-1-git-send-email-hendeby@isy.liu.se> (Gustaf Hendeby's message of "Thu, 22 May 2008 23:59:42 +0200")

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.

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.

  reply	other threads:[~2008-05-23  4:42 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 [this message]
2008-05-23  8:14                   ` Gustaf Hendeby

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=7vabihtyxw.fsf@gitster.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=hendeby@isy.liu.se \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).