Re: t5403.1 and adding a file that belongs to a submodule

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

 



Nguyen Thai Ngoc Duy <pclouds@xxxxxxxxx> writes:

> touch a b; git commit -am1
> git clone ./. clone2
> GIT_DIR=clone2/.git git add clone2/b

The last one has _always_ meant:

    I am telling with GIT_DIR the directory that contains the repository
    metadata, which is at clone2/.git directory.  I am not saying where
    the working tree is (i.e. no GIT_WORK_TREE and no core.worktree in
    clone2/.git/config) so take my $(pwd) as the root of the working tree,
    and add the contents of clone2/b to the index at the same path,
    i.e. "clone2/b".

It should not add contents of the said file at "b", as there is _nothing_
on the command line that tells us "clone2" is the root of the working
tree.

If the test means to do that, it should be more explicit and do something
like:

	( cd clone2 && git add b )

instead.

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