git merge --abort? [was: Re: [PATCHv4 00/21] git notes merge]

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

 



On Friday 22 October 2010, Junio C Hamano wrote:
> Sverre Rabbelier <srabbelier@xxxxxxxxx> writes:
> > Can someone comment on whether "git reset --merge" is a good
> > implementation of "git merge --abort"? If we can get an Ack from
> > someone I'd love to see this implemented.
>
> I think it depends on in what state you started from and how the
> merge operation stopped.  If your index was clean, probably yes, but
> "git reset --merge" may not be something you may want to do if the
> merge stopped because you had previously added something.

Does this mean that there are situations where you simply _cannot_ get 
back to the pre-merge state (using 'git reset --merge' or otherwise)?

Is this something we should detect and warn about when starting the 
merge? Something like:

  $ git merge bar
  I'm sorry, Dave. I'm afraid I can't merge with and unclean index.
  Use -f to force the merge anyway, but then 'git merge --abort' will
  lose your staged changes.

Or could we solve it simply by making a backup of the pre-merge index 
that can later be restored by 'git merge --abort'?


...Johan

-- 
Johan Herland, <johan@xxxxxxxxxxx>
www.herland.net
--
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]