author | Gustaf Hendeby <hendeby@isy.liu.se> | |
Thu, 22 May 2008 21:59:42 +0000 (23:59 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Fri, 23 May 2008 21:47:02 +0000 (14:47 -0700) | ||
commit | 205ffa94be8f6492eef4bdaa3315e7fdc7e64e0b | |
tree | d07e6fe05a1ee5914c19bb01906ce79a5463e4db | tree | snapshot |
parent | 38ed1d89f759699de56004b08668e1764613f47b | commit | diff |
Make git add -n and git -u -n output consistent
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.
This changes the output from "git add -n $paths" but as a general
principle, output from Porcelain commands is a fair game for improvements
and not for script consumption.
Signed-off-by: Gustaf Hendeby <hendeby@isy.liu.se>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
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.
This changes the output from "git add -n $paths" but as a general
principle, output from Porcelain commands is a fair game for improvements
and not for script consumption.
Signed-off-by: Gustaf Hendeby <hendeby@isy.liu.se>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin-add.c | diff | blob | history |