git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Francis Moreau <francis.moro@gmail.com>
To: Jens Lehmann <Jens.Lehmann@web.de>
Cc: git@vger.kernel.org
Subject: Re: Can't understand the behaviour of git-diff --submodule
Date: Sun, 28 Oct 2012 09:26:27 +0100	[thread overview]
Message-ID: <CAC9WiBim80NgUnjeRMRw9vKQD62TFJ_pxWjO6hzHW4nxcPZ67g@mail.gmail.com> (raw)
In-Reply-To: <508C6823.5060800@web.de>

On Sun, Oct 28, 2012 at 1:02 AM, Jens Lehmann <Jens.Lehmann@web.de> wrote:
> Am 26.10.2012 22:43, schrieb Francis Moreau:
>> On Fri, Oct 26, 2012 at 10:05 PM, Jens Lehmann <Jens.Lehmann@web.de> wrote:
>> [...]
>>>
>>> That is weird, "git diff --submodule" should show that too. Is there
>>> anything unusual about your setup? (The only explanation I can come
>>> up with after checking the code is that your submodule has neither a
>>> .git directory nor a gitfile or the objects directory in there doesn't
>>> contain these commits)
>>
>> Oh now you're asking, I think the submodule has been added by using
>> the --reference option of git-submodule-add.
>>
>>   $ cd configs
>>   $ cat .git
>>   gitdir: ../.git/modules/configs
>
> Thanks, I suspect the --reference option makes the difference here,
> I'll check that as soon as I find some time.

Yes that's fairly easy to reproduce:

$ mkdir super
$ cd super
$ git init
$ git submodule add --reference ~/tmp/git-submodule/public/a.git
~/tmp/git-submodule/public/a.git a
$ git commit -m "Initial creation of super project"
$ cd a
$ date >a.txt
$ git commit -a -m "add to a.txt a random change"
$ cd ..
$ git submodule summary
* a 2f8803a...a1aa4bf (1):
  > add to a.txt a random change
$ git commit -a -m "Include a's changes in super project"
$ git diff --submodule=log HEAD~1 HEAD
Submodule a 2f8803a...a1aa4bf (commits not present)

Thanks
-- 
Francis

  reply	other threads:[~2012-10-28  8:33 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-26 14:07 Can't understand the behaviour of git-diff --submodule Francis Moreau
2012-10-26 19:08 ` Jens Lehmann
2012-10-26 19:54   ` Francis Moreau
2012-10-26 20:05     ` Jens Lehmann
2012-10-26 20:43       ` Francis Moreau
2012-10-27 23:02         ` Jens Lehmann
2012-10-28  8:26           ` Francis Moreau [this message]
2012-10-30 21:17           ` Jens Lehmann
2012-10-31  7:36             ` Francis Moreau

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

  List information: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to=CAC9WiBim80NgUnjeRMRw9vKQD62TFJ_pxWjO6hzHW4nxcPZ67g@mail.gmail.com \
    --to=francis.moro@gmail.com \
    --cc=Jens.Lehmann@web.de \
    --cc=git@vger.kernel.org \
    /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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).