Re: [PATCH] Make git add -n and git -u -n output consistent

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 05/23/2008 06:40 AM, Junio C Hamano wrote:
Gustaf Hendeby <hendeby@xxxxxxxxxx> writes:

Signed-off-by: Gustaf Hendeby <hendeby@xxxxxxxxxx>
---

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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux