Re: [PATCH] builtin-revert: Make use of merge_recursive()
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Aug 11, 2008, 23:52 UTC
- Message-ID
- <7vvdy7t8i7.fsf@gitster.siamese.dyndns.org>
- In-Reply-To
- <20080811234733.GB28340@leksak.fem-net>
Stephan Beyer <s-beyer@gmx.net> writes:
Show 25 quoted lines
>> 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.
Let me try to be a bit more explicit to avoid confusion.
I won't queue this round of patch (neither this nor Miklos's), as we are not in a hurry during the 1.6.0-rc period anyway, but expect (1) to happen first, Ok?