Re: Better cooperation between checkouts and stashing
- From
Michael Witten <mfwitten@gmail.com>
- Date
- Mar 2, 2010, 01:41 UTC
- Message-ID
- <b4087cc51003011741w29023914wec78f9acd6efb516@mail.gmail.com>
- In-Reply-To
- <4B8C2F90.8080104@web.de>
On Mon, Mar 1, 2010 at 15:20, Markus Elfring <Markus.Elfring@web.de> wrote:
> > How is this use case different from the other?
The other use case is the one that git already assumes to be popular: People want local modifications to remain in place across branch checkouts.
> Which "problem" have you got in mind?
The "git checkout" command is designed to carry local modifications across branches transparently; when it's not so clear that such transparency is possible, "git checkout" refuses to continue unless the "-m" flag is used to try a 3-way merge involving:
* the local modifications. * the files in the branch being left. * the files in the branch being checked out.
This 3-way merge can get tricky if it ends in conflict, and so a smart use of the stash in this process might help users untangle themselves.
That is what Junio has been thinking about in this thread.