git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew J <andj2223@gmail.com>
To: Stefan Beller <sbeller@google.com>
Cc: "git@vger.kernel.org" <git@vger.kernel.org>
Subject: Re: Strangeness with git-add and nested repositories
Date: Wed, 27 Apr 2016 23:10:24 -0700	[thread overview]
Message-ID: <CAH6n4TfvybZyAYLkzyjfaP=2ZkirpacTgVQApF3bZT-j8=_Qng@mail.gmail.com> (raw)
In-Reply-To: <CAGZ79kZhATfP1FpXnhivCa_Az-3KADSCReOo68E2Q3s29x5HNw@mail.gmail.com>

Hi Stefan,

On Wed, Apr 27, 2016 at 9:08 AM, Stefan Beller <sbeller@google.com> wrote:
> I think (pure speculation), that it the error is in the context
> (repository) switching logic.
> What happens if you alter the order, i.e. give testfile first and then
> the files in the nested
> repos?

Interestingly, reversing the order produces the same result (the
testfile is added, the nested files are not).

I've also noticed that running something like 'git status testfile
nestedfiles' results in the nested files being omitted from the git
status output; I'd expect them to be printed by git-status as
untracked files. So it appears the problem is not isolated to git-add.

To give some context, my use case is that I have a parent project that
links to numerous chromium libraries, thus my parent project needs
access to many of chromium's headers at build time. I wanted to make
these headers available to other developers without them needing to
check out all of chromium.
So I add all the chromium headers to the parent project with something like:
find deps/chromium/src -name "*.h" | xargs git add --
I was weirded out to find that many of the header files weren't being
added, as I've already described.

I ultimately worked around this by doing:
find chromium/src -name "*.h" | xargs -n 1 git add
Since each file gets added separately, this is quite slow. So it'd be
nice if this little bug was fixed someday :)

As you probably know, Chromium is comprised of many hundreds of nested
repos, so that aided in manifesting this issue.

Thanks,
Andrew

  reply	other threads:[~2016-04-28  6:10 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-27  8:31 Strangeness with git-add and nested repositories Andrew J
2016-04-27 16:08 ` Stefan Beller
2016-04-28  6:10   ` Andrew J [this message]
2016-04-28 16:35     ` Stefan Beller
2016-04-28 16:39   ` Junio C Hamano
2016-04-28 16:48     ` Junio C Hamano
2016-04-29  2:11       ` Andrew J
2016-04-28 16:54     ` Stefan Beller
2016-04-29  2:51     ` Junio C Hamano
2016-04-29  2:54       ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAH6n4TfvybZyAYLkzyjfaP=2ZkirpacTgVQApF3bZT-j8=_Qng@mail.gmail.com' \
    --to=andj2223@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=sbeller@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).