All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gustaf Hendeby <hendeby@isy.liu.se>
To: Jacob Helwig <jacob.helwig@gmail.com>
Cc: git@vger.kernel.org, Jens.Lehmann@web.de
Subject: Re: Unmodified submodules shows up as dirty with 1.6.6.443.gd7346
Date: Mon, 18 Jan 2010 17:54:44 +0100	[thread overview]
Message-ID: <4B549254.5090206@isy.liu.se> (raw)
In-Reply-To: <8c9a061001180802t5ec0d389j2cae9f1771130c36@mail.gmail.com>

Jacob Helwig wrote:
> On Mon, Jan 18, 2010 at 07:30, Gustaf Hendeby <hendeby@isy.liu.se> wrote:
>> Hi!
>>
>> I have been using submodules for a while, and been quite happy with
>> them.  Just updating to the latest next (1.6.6.443.gd7346), a strange
>> problem has occurred.  All my submodules (which are in fact unmodified)
>> show as modified and dirty
>>
>> diff --git a/extern/utils b/extern/utils
>> --- a/extern/utils
>> +++ b/extern/utils
>> @@ -1 +1 @@
>> -Subproject commit 6bad20e1419f1ca61bd5a6eef9b5937122e006f1
>> +Subproject commit 6bad20e1419f1ca61bd5a6eef9b5937122e006f1-dirty
>>
>>
> Do you have any untracked files in the submodule?  git status is
> working as I would expect with the same version (1.6.6.443.gd7346).

Yes, I do.

> 
> If there is no output from git status in the submodule, then git
> status in the superproject shows the submodule as being clean.
> However, if there is _any_ output from git status (untracked files,
> modified files, deleted files, new files), then the superproject shows
> the submodule as being dirty.
> 

Then the behavior of this feature differs from the one provided by
GIT-VERSION-GEN that is used as part of the git build process.  This is
not an argument itself, but personally, I don't like this behavior, and
think it should be reconsidered before inclusion into master.

I have the following use case, which is affected.  I have with in a
submodule some code that needs to be compiled, and hence generate some
object files and other files in the process.  I don't want to include
these files in a .gitignore as they are named differently on different
systems.  Hence, I include them in my .git/info/exclude file, where I am
developing the module.  So now, unless I do the same thing for all
places I checkout the repo as submodule, I end up with the module
indicated as dirty after I compile it.  This is a bit inconvenient.

Am I the only one who uses submodules this way?  Is there a better way
to solve my problem that would provide a better work pattern in this case?

/Gustaf

  reply	other threads:[~2010-01-18 16:54 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-18 15:30 Unmodified submodules shows up as dirty with 1.6.6.443.gd7346 Gustaf Hendeby
2010-01-18 16:02 ` Jacob Helwig
2010-01-18 16:54   ` Gustaf Hendeby [this message]
2010-01-18 17:14     ` Jacob Helwig
2010-01-18 17:27       ` Gustaf Hendeby
2010-01-18 17:22     ` Junio C Hamano
2010-01-18 20:50       ` Jens Lehmann
2010-01-19  7:13   ` Johannes Sixt
2010-01-19  8:23     ` Gustaf Hendeby
2010-01-19 14:31     ` Jacob Helwig
2010-01-19 17:29     ` 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=4B549254.5090206@isy.liu.se \
    --to=hendeby@isy.liu.se \
    --cc=Jens.Lehmann@web.de \
    --cc=git@vger.kernel.org \
    --cc=jacob.helwig@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.