Re: [RFC 3/3] reset: Change the default behavior to use --merge during a merge

2014-03-10 Thread Andrew Wong
On 02/26/14 15:53, Junio C Hamano wrote: - start warning against reset (no mode specifier) and reset --mixed when the index is unmerged *and* MERGE_HEAD exists; and then Why do we also want to check if index is unmerged? This situation can happen regardless of having conflicts or not

Re: [RFC 3/3] reset: Change the default behavior to use --merge during a merge

2014-02-26 Thread Matthieu Moy
Andrew Wong andrew.k...@gmail.com writes: If the user wants to do git reset during a merge, the user most likely wants to do a git reset --merge. This is especially true during a merge conflict and the user had local changes, because git reset would leave the merged changes mixed in with the

Re: [RFC 3/3] reset: Change the default behavior to use --merge during a merge

2014-02-26 Thread Andrew Wong
On Wed, Feb 26, 2014 at 1:21 PM, Matthieu Moy matthieu@grenoble-inp.fr wrote: But this breaks backward compatibility. I sometimes run git reset during a merge to only reset the index and then examine the changes introduced by the merge. With your changes, someone doing so would abort the

Re: [RFC 3/3] reset: Change the default behavior to use --merge during a merge

2014-02-26 Thread Jonathan Nieder
Andrew Wong wrote: Yeah, this breaks compatibility, but like I said, during a merge, I don't see a good reason to do git reset --mixed, and not git reset --merge. Yeah, in principle if it had a different behavior, then plain git reset could be useful during a merge, but as is, I tend to use

Re: [RFC 3/3] reset: Change the default behavior to use --merge during a merge

2014-02-26 Thread Junio C Hamano
Matthieu Moy matthieu@grenoble-inp.fr writes: Andrew Wong andrew.k...@gmail.com writes: If the user wants to do git reset during a merge, the user most likely wants to do a git reset --merge. This is especially true during a merge conflict and the user had local changes, because git

Re: [RFC 3/3] reset: Change the default behavior to use --merge during a merge

2014-02-26 Thread Matthieu Moy
Andrew Wong andrew.k...@gmail.com writes: On Wed, Feb 26, 2014 at 1:21 PM, Matthieu Moy matthieu@grenoble-inp.fr wrote: But this breaks backward compatibility. I sometimes run git reset during a merge to only reset the index and then examine the changes introduced by the merge. With

Re: [RFC 3/3] reset: Change the default behavior to use --merge during a merge

2014-02-26 Thread Andrew Wong
On Wed, Feb 26, 2014 at 3:48 PM, Jonathan Nieder jrnie...@gmail.com wrote: I really don't like the idea of making git reset modal, though. I'd rather that reset --mixed print some advice about how to recover from the mistake, which would also have the advantage of allowing scripts that for

Re: [RFC 3/3] reset: Change the default behavior to use --merge during a merge

2014-02-26 Thread Andrew Wong
On Wed, Feb 26, 2014 at 3:57 PM, Matthieu Moy matthieu@grenoble-inp.fr wrote: If you were to design git reset's interface from scratch, your proposal would make sense. But we're talking about a change, and you can't expect that users never use the current behavior. At the very least, there