From: Stephan Beyer <s-beyer@gmx.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org,
Johannes Schindelin <Johannes.Schindelin@gmx.de>,
Miklos Vajna <vmiklos@frugalware.org>
Subject: Re: [PATCH] builtin-revert: Make use of merge_recursive()
Date: Tue, 12 Aug 2008 01:47:33 +0200 [thread overview]
Message-ID: <20080811234733.GB28340@leksak.fem-net> (raw)
In-Reply-To: <7v7ianuo8q.fsf@gitster.siamese.dyndns.org>
Hi,
Junio C Hamano wrote:
> I am not absolutely sure if the phoney commit-looking object that has
> nonsense SHA-1 created by make_virtual_commit() would have any unintended
> side effects to the rest of the system, but it does not look like it is
> even inserted into the global object hash table, so this should be Ok.
Hmm, the git-merge-recursive process that was run before, calls get_ref()
and that also used make_virtual_commit() and thus this virtual_id.
So if there is some danger regarding this, then it has also been there
before my patch :-)
> That was the last piece of worry coming from me regarding this "call
> recursive internally" theme.
Well, for simple cherry-pick/revert your other worries can be ignored,
because it only runs merge_recursive() _once_ and the die()s do not
hurt. Wrong?
> Would we need to consolidate this and Miklos's "call recursive internally
> from git-merge wrapper" by making them into three patches?
> I.e.
>
> (1) move bulk of code from builtin-merge-recursive.c to a new file
> merge-recursive.c and introduce merge_recursive_helper() in there so
> that both of you and cmd_merge_recursive() itself can call it;
I'd like to see a "libified" merge-recursive.c, but I wouldn't call the
interesting function merge_recursive_helper(), I'd just take
merge_recursive().
Of course those index locking could be done in it.
Looking at my sequencer code, I'd also be satisfied, if it takes SHAs
as argument and no "struct commit *".
But then this should be more generic, i.e. OBJ_TAG has to be handled
correctly (builtin-revert does that at the beginning at parse-args()).
Hmm, then step (1) is ok. :-)
> (2) make revert.c use merge_recursive_helper();
>
> (3) make builtin-merge.c use merge_recursive_helper().
This is ok then.
Thanks and regards,
Stephan
--
Stephan Beyer <s-beyer@gmx.net>, PGP 0x6EDDD207FCC5040F
next prev parent reply other threads:[~2008-08-11 23:48 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-10 13:20 [PATCH 0/2] Avoid run_command() for recursive in builtin-merge Miklos Vajna
2008-08-10 13:20 ` [PATCH 1/2] merge-recursive: prepare merge_recursive() to be called from builtins Miklos Vajna
2008-08-10 13:20 ` [PATCH 2/2] builtin-merge: avoid run_command_v_opt() for recursive Miklos Vajna
2008-08-11 18:47 ` Junio C Hamano
2008-08-11 19:07 ` Miklos Vajna
2008-08-11 20:03 ` Junio C Hamano
2008-08-11 20:45 ` Miklos Vajna
2008-08-11 20:48 ` [PATCH] Add a new test to ensure merging a submodule is handled properly Miklos Vajna
2008-08-11 15:13 ` [PATCH 1/2] merge-recursive: prepare merge_recursive() to be called from builtins Stephan Beyer
2008-08-11 16:46 ` Miklos Vajna
2008-08-11 19:53 ` Junio C Hamano
2008-08-11 20:46 ` Stephan Beyer
2008-08-11 15:03 ` [PATCH] builtin-revert.c: Make use of merge_recursive() Stephan Beyer
2008-08-11 15:47 ` Johannes Schindelin
2008-08-11 19:01 ` Stephan Beyer
2008-08-11 19:09 ` Miklos Vajna
2008-08-11 21:44 ` [PATCH] builtin-revert: " Stephan Beyer
2008-08-11 21:46 ` Stephan Beyer
2008-08-11 22:33 ` Junio C Hamano
2008-08-11 23:27 ` Junio C Hamano
2008-08-11 23:47 ` Stephan Beyer [this message]
2008-08-11 23:52 ` Junio C Hamano
2008-08-12 16:45 ` [PATCH] Split out merge_recursive() to merge-recursive.c Miklos Vajna
2008-08-12 17:56 ` Stephan Beyer
2008-08-12 21:40 ` Miklos Vajna
2008-08-12 20:13 ` [PATCH (1b)] merge-recursive.c: Add more generic merge_recursive_generic() Stephan Beyer
2008-08-12 20:14 ` [PATCH (2)] Make builtin-revert.c use merge_recursive_generic() Stephan Beyer
2008-08-12 21:44 ` [PATCH (1b)] merge-recursive.c: Add more generic merge_recursive_generic() Miklos Vajna
2008-08-13 17:26 ` Stephan Beyer
2008-08-13 20:13 ` Miklos Vajna
2008-08-13 3:17 ` Daniel Barkalow
2008-08-13 17:29 ` Stephan Beyer
2008-08-13 17:54 ` Daniel Barkalow
2008-08-13 19:55 ` Junio C Hamano
2008-08-13 20:05 ` Stephan Beyer
2008-08-13 20:36 ` Daniel Barkalow
2008-08-13 21:45 ` Junio C Hamano
2008-08-14 3:17 ` [PATCH] Split out merge_recursive() to merge-recursive.c 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=20080811234733.GB28340@leksak.fem-net \
--to=s-beyer@gmx.net \
--cc=Johannes.Schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=vmiklos@frugalware.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.
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).