Re: [PATCH] builtin-clone: fix for new unpack_trees() semantics

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Sun, 9 Mar 2008, Daniel Barkalow wrote:

> On Sun, 9 Mar 2008, Johannes Schindelin wrote:
> 
> > In git.git's "next" branch, unpack_trees() must specify source and target 
> > index.
> > 
> > Signed-off-by: Johannes Schindelin <johannes.schindelin@xxxxxx>
> > ---
> > 
> > 	To be squashed into 10/11
> > 
> >  builtin-clone.c |    2 ++
> >  1 files changed, 2 insertions(+), 0 deletions(-)
> > 
> > diff --git a/builtin-clone.c b/builtin-clone.c
> > index e4047ed..3890e12 100644
> > --- a/builtin-clone.c
> > +++ b/builtin-clone.c
> > @@ -534,6 +534,8 @@ int cmd_clone(int argc, const char **argv, const char *prefix)
> >  		opts.verbose_update = !option_quiet;
> >  		opts.merge = 1;
> >  		opts.fn = twoway_merge;
> > +		opts.src_index = &the_index;
> > +		opts.dst_index = &the_index;
> 
> Actually, I think the sensible thing is to just not do a merge here, since 
> we know there's no index beforehand and the two trees are the same.
> 
> I think the odd twoway merge of two copies of HEAD is just an artifact of 
> clone originally just doing "git checkout HEAD", and that got translated 
> various times failing to notice the special cases.

Okay, but would oneway_merge not want to write the index, too (rightfully 
so)?

Ciao,
Dscho

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux