Re: Bug Report: git add

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

 



On Wed, Apr 06, 2011 at 08:18:54AM +0900, Darren Cook wrote:

> PROBLEM: "git add" adds sub-directories without checking to see if there
> is already a git repository already there.

Sort of...

> EXAMPLE OF PROBLEM
> 
> The problem can arise when people are just dipping their toe into git,
> and decide to try it on just one directory, then later expand its use to
> the whole project.
> 
>   mkdir test
>   cd test
> 
>   mkdir settings
>   cd settings
>   git init
>   touch x
>   git add x
>   git commit -m "xx"
> 
>   (time passes)
> 
>   cd ..
>   git init
>   git add settings/
>    (should complain)

If you do "git add settings" (without the slash) it will add the
repository as a submodule.  Which is not the behavior you asked for, but
is at least reasonable. So the real bug seems to me the fact that "git
add settings/" and "git add settings" behave differently.

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