From: "Yin Ping" <pkufranky@gmail.com>
To: "Junio C Hamano" <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] status&commit: Teach them to show commits of modified submodules.
Date: Sun, 4 Nov 2007 17:22:13 +0800 [thread overview]
Message-ID: <46dff0320711040122o271b3da4wb16b0317224d3ac3@mail.gmail.com> (raw)
In-Reply-To: <7vfxzoyz7f.fsf@gitster.siamese.dyndns.org>
On 11/3/07, Junio C Hamano <gitster@pobox.com> wrote:
> "Yin Ping" <pkufranky@gmail.com> writes:
>
> > On 11/3/07, Junio C Hamano <gitster@pobox.com> wrote:
> >> How does this work when you are a toplevel developer and do not
> >> have the submodule cloned and checked out?
> >>
> >> Our code should treat having the submodule directory and not
> >> having it when there is a mode 160000 entry in the index equally
> >> likely. Cloning and checking-out is _not_ the norm (nor the
> >> exception).
> >>
> > When submodule is not cheched out, it is never modified.
>
> How so? Can't you update the index alone?
>
Sorry i have been away and come back just now.
I think it's a rare case that the submodule entry in the index is
different from HEAD when the submodule is not checked out.
This may only happen when git-reset --soft is called. However, it may
be a wrong operation to commit the changed submodule index entry
while the submodule is never checked out.
There is another similar case, 'git pull' update the submodule entry
in both HEAD and index, but the submodule checked out is not updated.
In this case, 'git-log since..until' in the submodule directory will
fail since 'until' commit is not checked out yet. I think it may be
also a user mistake.
In both case, i think the user should be notified about the
inconsistence. My patch handle this by two warning messages as follows
(where $name is module name)
+ cd $name >&/dev/null || { echo " Warning:
fail to chdir to $name" && exit; }
+ if echo "$left$right" | grep 'unknown
revision' >&/dev/null
+ then
+ echo " Warning: $name is not a
repository or dosn't contains commit $headone/$indexone"
+ else
--
franky
next prev parent reply other threads:[~2007-11-04 9:22 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-02 11:53 [PATCH] status&commit: Teach them to show commits of modified submodules Ping Yin
2007-11-02 20:29 ` Junio C Hamano
2007-11-02 23:50 ` Yin Ping
2007-11-03 0:01 ` Junio C Hamano
2007-11-04 9:22 ` Yin Ping [this message]
2007-11-04 9:25 ` Yin Ping
2007-11-04 9:56 ` Yin Ping
[not found] ` <46dff0320711040145k1edb1fcaq1daa5469c1158e81@mail.gmail.com>
2007-11-04 11:41 ` Junio C Hamano
2007-11-04 13:17 ` Yin Ping
2007-11-06 2:22 ` Junio C Hamano
2007-11-07 15:20 ` Yin Ping
-- strict thread matches above, loose matches on Subject: below --
2007-11-10 19:27 Ping Yin
2007-11-10 19:55 ` Sven Verdoolaege
2007-11-10 20:00 ` Sven Verdoolaege
2007-11-11 5:30 ` Yin Ping
2007-11-10 21:14 ` Junio C Hamano
2007-11-11 6:18 ` Yin Ping
2007-11-11 20:34 ` Junio C Hamano
2007-11-12 5:38 ` Ping Yin
2007-11-12 7:26 ` Johannes Sixt
2007-11-12 9:51 ` Johannes Schindelin
2007-11-12 22:39 ` Junio C Hamano
2007-11-12 8:40 ` Johan Herland
2007-11-12 10:03 ` Johannes Sixt
2007-11-11 0:07 ` Lars Hjemli
2007-11-11 6:24 ` Yin Ping
2007-11-11 8:27 ` Lars Hjemli
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=46dff0320711040122o271b3da4wb16b0317224d3ac3@mail.gmail.com \
--to=pkufranky@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.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).