Re: [PATCH 2/4] Resurrect "diff-lib.c: adjust position of i-t-a entries in diff"

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

 



Nguyễn Thái Ngọc Duy  <pclouds@xxxxxxxxx> writes:

> +--shift-ita::
> +	By default entries added by "git add -N" appear as an existing
> +	empty file in "git diff" and a new file in "git diff --cached".
> +	This option makes the entry appear as a new file in "git diff"
> +	and non-existent in "git diff --cached".

I do not think this should exist at the UI level, even though the
use of it in wt-status.c (below) makes a very good sense at least
as a temporary band-aid.

At the philosophical level, I however think this "I-T-A does not
logically exist in the index (yet)" is a mistake, and "an option
controls if I-T-A does or does not exist depending on who calls it"
is even worse; it is a road to insanity.

For example, because I-T-A does not logically exist in the index,
"git reset --hard" should not remove it but make it untracked again
(but I do not think it does).  After "git add -N foo", because "foo"
does not exist in the index, "git clean" should remove it for the
definition of what's in the index to be logically consistent, but
the whole intent of "add -N" is that the user meant it is worth
checking into sometime in the future, which contradicts with its
removal upon "clean".

So, I dunno.
--
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]