Re: CFT: merge-recursive in C
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Jun 27, 2006, 10:51 UTC
- Message-ID
- <Pine.LNX.4.63.0606271248270.29667@wbgn013.biozentrum.uni-wuerzburg.de>
- In-Reply-To
- <81b0412b0606270158i16ebee20me81ca2b9fa71db5c@mail.gmail.com>
Hi,
On Tue, 27 Jun 2006, Alex Riesen wrote:
Show 8 quoted lines
> On 6/27/06, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote: > > > > > I finally got pis^Witched enough by my platform at work and decided > > > to start the effort of converting Fredriks git-merge-recursive to C. > > > > Darn. I was working on the same thing since a few days. > > I didn't know :)
Vice versa, I guess.
> > - have you considered using run-command() instead of system()? > > No. What run-program?
run-command.c:run_command(). Call it like this:
int return_code = run_command("git-read-tree", sha1_to_hex(sha1), NULL);Show 5 quoted lines
> > - in setup_index(), you set GIT_INDEX_FILE, but I do not think that the > > rest of git picks up on it. environment.cc:get_index_file() checks if > > the variable was set already, but not if it changed. > > Not even sure it's needed. Leftover from conversion
I think it _is_ needed, in order not to mess up the current index. Setting the environment variable works for exec()ed processes, but I think we need to add a set_index_file(const char *) to environment.c.
> > - I always wondered why merge-recursive did not call merge-base, but did > > its own thing. Hmm? > > No idea yet.
Frederik?
Ciao, Dscho