Re: [PATCH v2 4/4] dir: do not traverse repositories with no commits

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

 



Kyle Meyer <kyle@xxxxxxxxxx> writes:

> The above case is a corner case in an already unusual situation of the
> working tree containing a repository that is not a tracked submodule,
> but we might as well treat anything that looks like a repository
> consistently.

Makes sense.

> As the required update to t3700-add shows, being looser with the check
> means that we're stricter when adding empty repositories to the index:
>
>   % git add repo
>   warning: adding embedded git repository: repo
>   hint: You've added another git repository inside your current repository.
>   hint: [...]
>   error: unable to index file 'repo/'
>   fatal: adding files failed

Hmph, why should we have the initial "warning" with hint?  Shouldn't
the above result in an outright error?  Something like:

    $ git add repo ;# or git add repo/
    error: repo does not have a commit checked out
    fatal: adding files failed

because the entire purpose of "git add repo" (or "git add repo/") when
"repo" is a repository is to register the commit that is checked out
in that sub-repository to the index of the top-level repository, as
part of updating (or starting) a submodule.

I very much like the direction these four patches want to take us.
I just have small troubles here and there in their execution, though
;-)

Thanks.



[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