From: Jens Lehmann <Jens.Lehmann@web.de>
To: Jonathan del Strother <maillist@steelskies.com>
Cc: Junio C Hamano <gitster@pobox.com>,
Git Mailing List <git@vger.kernel.org>
Subject: Re: v1.7.0-rc0 shows lots of "unable to find <sha1>" on git-stash
Date: Sat, 30 Jan 2010 21:44:08 +0100 [thread overview]
Message-ID: <4B649A18.3050907@web.de> (raw)
In-Reply-To: <57518fd11001300836v7f21a8a9qc09953d9091a4513@mail.gmail.com>
Am 30.01.2010 17:36, schrieb Jonathan del Strother:
> On 30 January 2010 14:10, Jens Lehmann <Jens.Lehmann@web.de> wrote:
>> Am 30.01.2010 14:23, schrieb Jonathan del Strother:
>>> On 30 January 2010 12:31, Jens Lehmann <Jens.Lehmann@web.de> wrote:
>>>> I assume you have one or more submodules, maybe even with untracked
>>>> or yet uncommitted modified files in your tree? If so, what does git
>>>> status say in the superproject and in the submodule(s)?
>>>
>>> Yep, I have 10 submodules. However, they're all completely clean with
>>> no tracked or untracked changes shown in git status. Anything else I
>>> can investigate?
>>
>> The change in behavior my patch introduced is that "git status" is
>> called inside each submodule. So i would expect getting the same
>> errors when using this command:
>> git submodule foreach git status -s
>>
>> It should just show
>> Entering '<submodule 1>'
>> Entering '<submodule 2>'
>> Entering '<submodule 3>'
>> Entering '<submodule 4>'
>> Entering '<submodule 5>'
>> Entering '<submodule 6>'
>> Entering '<submodule 7>'
>> Entering '<submodule 8>'
>> Entering '<submodule 9>'
>> Entering '<submodule 10>'
>> when the submodules are not dirty. What do you get?
>>
>
> Correct - I just get that output.
Hm, so nothing unusual there. I really wonder what is the problem here,
as calling "git status" inside the submodules works fine when issued via
"git submodule foreach", but not when done via run_command()!?
So i would like to ask some more questions:
- Under what operating system and on what filesystem is this happening?
- Is there anything unusual about your repo (e.g. using GIT_WORK_TREE
or having the object database somewhere else that in .git in the
superproject or any of the submodules)?
- You are just issuing a "git stash" to stash some changes in the
superproject when that happens, right?
- The hashes that show up as "unable to find" are reachable via "git
show" in the superproject, not in the submodules, right?
- Do these hashes have any relation to the contents you are stashing?
- The following patch should suppress (but not solve) this problem when
applied to a version of git that contains
4d34477f4c5dbebc55aa1362fd705440590a85f1 (git diff: Don't test
submodule dirtiness with --ignore-submodules), e.g. current next.
Could you please verify that?
---8<---
diff --git a/git-stash.sh b/git-stash.sh
index 3a0685f..e9b47b4 100755
--- a/git-stash.sh
+++ b/git-stash.sh
@@ -105,7 +105,7 @@ create_stash () {
w_tree=$(GIT_INDEX_FILE="$TMP-index" git write-tree) ||
die "Cannot save the current worktree state"
- git diff-tree -p HEAD $w_tree > "$TMP-patch" &&
+ git diff-tree --ignore-submodules -p HEAD $w_tree > "$TMP-patch"
test -s "$TMP-patch" ||
die "No changes selected"
prev parent reply other threads:[~2010-01-30 20:44 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-29 15:12 v1.7.0-rc0 shows lots of "unable to find <sha1>" on git-stash Jonathan del Strother
[not found] ` <7vzl3wiz59.fsf@alter.siamese.dyndns.org>
2010-01-30 0:46 ` Jonathan del Strother
2010-01-30 12:31 ` Jens Lehmann
2010-01-30 13:23 ` Jonathan del Strother
2010-01-30 14:10 ` Jens Lehmann
2010-01-30 16:36 ` Jonathan del Strother
2010-01-30 20:01 ` Junio C Hamano
2010-01-30 20:25 ` Junio C Hamano
2010-01-30 20:30 ` [PATCH] is_submodule_modified(): fix breakage with external GIT_INDEX_FILE Junio C Hamano
2010-01-31 19:16 ` v1.7.0-rc0 shows lots of "unable to find <sha1>" on git-stash Jonathan del Strother
2010-01-31 19:21 ` Jonathan del Strother
2010-01-31 19:21 ` Junio C Hamano
2010-01-30 20:44 ` Jens Lehmann [this message]
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=4B649A18.3050907@web.de \
--to=jens.lehmann@web.de \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=maillist@steelskies.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.