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

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

 



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?

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