Re: "git add -u" broken in git 1.7.4?

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

 



On 02/06/11 06:13, Jeff King wrote:
> On Sun, Feb 06, 2011 at 01:39:32AM +0100, Sebastian Pipping wrote:
> 
>> I just ran into case where
>>
>>   git add -u
>>
>> repetedly did not update the index.  In contrast, picking stuff using
>>
>>   git add -p
>>
>> works just fine.
>>
>> Could it be "git add -u" is broken in git 1.7.4?
> 
> It could be. However, I can think of one such case where you might see
> that behavior. "git add -u" operates from the current subdirectory,
> whereas "git add -p" operates from the top of the project tree (yes,
> this inconsistency confusing, but it's not as serious as "git add -u
> doesn't work").
> 
> You can demonstrate it with:
> 
>   mkdir repo && cd repo && git init
>   mkdir subdir && echo content >file
>   git add . && git commit -m base
>   echo more >>file
> 
>   mkdir subdir && cd subdir
>   git add -u
>   git status ;# still not staged for commit
> 
>   git add -p ;# finds it
> 
> Might you have been in a subdirectory of the project when you saw this
> behavior?

I was and I can confirm the different behaviour with 1.7.4 over here: it
does work on the root directory of the repo as you supposed.

Is that behavior needed to be as is or could you change it to work from
everywhere?  Could it be it has been working from anywhere before?

Best,



Sebastian
--
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]