Re: Git add documentation error

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

 



Hi,
On 27/10/2022 12:53, Angelo Borsotti wrote:
> Hello,
>
> the reference manual for the "git add" command does not
> specify what that command does when applied to an
> unmodified file.

I presume that this file is already tracked..
> By testing this, I have seen that it does not add the file
> to the index, 

How was this tested?

If you have no changes, thaen the status diff will have no mention of
that file.
Perhaps change the tracked mode bits to see if that is noticed (note
though, not all mode bits are tracked..)
> and consequently it does not add it when a
> subsequent commit is done.

I suspect this is a subtle mental model misunderstanding about the
distinction between a commit as a snapshot, and a commit being reported
as the diff relative to its parent (and here, there is none, if the file
is unmodified)
> I think that this should be documented.

A test script with sample output would help here.
--
Philip





[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