From: Junio C Hamano <junkio@cox.net>
To: Petr Baudis <pasky@suse.cz>
Cc: git@vger.kernel.org
Subject: Re: Bottlenecks in git merge
Date: Tue, 31 Jan 2006 16:43:51 -0800 [thread overview]
Message-ID: <7vvevzoqm0.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: <20060131233504.GB31278@pasky.or.cz> (Petr Baudis's message of "Wed, 1 Feb 2006 00:35:04 +0100")
Petr Baudis <pasky@suse.cz> writes:
> What about letting the file-handler actually tell merge-index what to
> do? merge-index could make a fifo at fd 3 for it (we might fork a
> special buffering process for it to avoid PIPE_BUF issues) and let it
> write there a sequence of lines like...
Yes. That is sensible.
A merge handler that is willing to look at the current index
stages (and merge-recursive certainly is capable of doing that)
can open an outgoing pipe to 'git-update-index --index-info' and
drive it. The command syntax is a bit different from what you
wrote in your message and I think if we go this route we should
make --index-info a bit easier to use by allowing it to accept
stage 0 entries.
-- >8 --
update-index --index-info: allow stage 0 entries.
Somehow we did not allow stuffing the index with stage 0 entries
through --index-info interface. I do not think of a reason to
forbid it offhand.
Signed-off-by: Junio C Hamano <junkio@cox.net>
---
diff --git a/update-index.c b/update-index.c
index 2361e41..94436dd 100644
--- a/update-index.c
+++ b/update-index.c
@@ -303,7 +303,7 @@ static void read_index_info(int line_ter
if (!tab || tab - ptr < 41)
goto bad_line;
- if (tab[-2] == ' ' && '1' <= tab[-1] && tab[-1] <= '3') {
+ if (tab[-2] == ' ' && '0' <= tab[-1] && tab[-1] <= '3') {
stage = tab[-1] - '0';
ptr = tab + 1; /* point at the head of path */
tab = tab - 2; /* point at tail of sha1 */
next prev parent reply other threads:[~2006-02-01 0:43 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-01-31 21:33 Bottlenecks in git merge Peter Eriksen
2006-01-31 23:06 ` Junio C Hamano
2006-01-31 23:35 ` Petr Baudis
2006-02-01 0:43 ` Junio C Hamano [this message]
2006-01-31 23:45 ` Linus Torvalds
2006-02-01 0:50 ` Petr Baudis
2006-02-01 1:04 ` Linus Torvalds
2006-01-31 23:27 ` Petr Baudis
2006-02-04 7:31 ` [PATCH] read-tree --aggressive Junio C Hamano
2006-02-04 11:52 ` Peter Eriksen
2006-02-04 12:56 ` 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=7vvevzoqm0.fsf@assigned-by-dhcp.cox.net \
--to=junkio@cox.net \
--cc=git@vger.kernel.org \
--cc=pasky@suse.cz \
/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).