From: Junio C Hamano <gitster@pobox.com>
To: Clemens Buchacher <drizzd@aon.at>
Cc: Finn Arne Gangstad <finnag@pvv.org>,
Tim Olsen <tim@brooklynpenguin.com>,
git@vger.kernel.org
Subject: Re: different git-merge behavior with regard to submodules in 1.6.2.4 vs. 1.6.2.1
Date: Wed, 29 Apr 2009 11:54:45 -0700 [thread overview]
Message-ID: <7vskjrb896.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: 20090429084209.GA24064@localhost
Clemens Buchacher <drizzd@aon.at> writes:
> The fatal error is indeed caused by 0eb6574 (update cache for conflicting
> submodule entries). The problem is also documented by t7405. The test
> exposes a problem even previous to this commit, wherein "git diff" aborts
> with
>
> fatal: read error 'sub'
>
> which is why I thought this was broken anyways. Only I see now that I have
> made things worse.
Your "git diff" calls into the combine-diff logic, and it was not updated
when the "gitlink" was added. With your change you are merely hiding the
issue under the rug. I've sent a fix as a separate patch.
How about doing this to fix the merge-recursive part? Looks a lot simpler;
I haven't tested it very much, though.
-- >8 --
From: Junio C Hamano <gitster@pobox.com>
Date: Wed, 29 Apr 2009 11:08:18 -0700
Subject: [PATCH] merge-recursive: do not die on a conflicting submodule
We cannot represent the 3-way conflicted state in the work tree
for these entries, but it is normal not to have commit objects
for them in our repository. Just update the index and the life
will be good.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
merge-recursive.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/merge-recursive.c b/merge-recursive.c
index d6f0582..a3721ef 100644
--- a/merge-recursive.c
+++ b/merge-recursive.c
@@ -520,8 +520,12 @@ static void update_file_flags(struct merge_options *o,
unsigned long size;
if (S_ISGITLINK(mode))
- die("cannot read object %s '%s': It is a submodule!",
- sha1_to_hex(sha), path);
+ /*
+ * We may later decide to recursively descend into
+ * the submodule directory and update its index
+ * and/or work tree, but we do not do that now.
+ */
+ goto update_index;
buf = read_sha1_file(sha, &type, &size);
if (!buf)
--
1.6.3.rc3.16.gb37759
prev parent reply other threads:[~2009-04-29 18:56 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-28 17:36 different git-merge behavior with regard to submodules in 1.6.2.4 vs. 1.6.2.1 Tim Olsen
2009-04-28 18:29 ` Junio C Hamano
2009-04-28 21:12 ` Finn Arne Gangstad
2009-04-29 8:42 ` Clemens Buchacher
2009-04-29 12:15 ` Finn Arne Gangstad
2009-04-29 18:53 ` [PATCH] Teach gitlinks to combine-diff Junio C Hamano
2009-04-29 20:26 ` [PATCH v2] diff -c -p: do not die on submodules Junio C Hamano
2009-04-29 21:50 ` Alex Riesen
2009-04-29 22:13 ` Johannes Schindelin
2009-04-29 22:19 ` Alex Riesen
2009-04-29 22:39 ` Johannes Schindelin
2009-04-30 5:47 ` Alex Riesen
2009-04-30 6:07 ` Finn Arne Gangstad
2009-04-29 23:09 ` Junio C Hamano
2009-04-29 18:54 ` Junio C Hamano [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=7vskjrb896.fsf@gitster.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=drizzd@aon.at \
--cc=finnag@pvv.org \
--cc=git@vger.kernel.org \
--cc=tim@brooklynpenguin.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.