git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: git stash apply usability issues

From
Karl Hasselström <kha@treskal.com>
Date
Oct 19, 2007, 13:27 UTC
Message-ID
<20071019132753.GA23765@diana.vm.bytemark.co.uk>
In-Reply-To
<20071019013156.GU14735@spearce.org>
On 2007-10-18 21:31:56 -0400, Shawn O. Pearce wrote:
> Johannes Sixt <j.sixt@viscovery.net> wrote:
Show 12 quoted lines
> > (2) when 'git stash apply' runs merge-recursive, it treats the
> > current state as 'ours' and the stash as 'theirs'. IMHO it should
> > be the other way round: I have stashed away changes to a binary
> > file. Then committed a different modification to it, and now want
> > to apply the stash. This results in a conflict that leaves the
> > current state in the working tree, but I had preferred that the
> > stashed binary file were in the working tree now.
> >
> > What do other git-stash users think about changing the order?
>
> The current order is the same order that git-rebase uses. I'm not
> saying its correct, just that its the same as rebase.

FWIW, StGit push works the same way. The idea being that the current HEAD is our current state ("ours"), and the patch we're pushing is some change we want to apply ("theirs"). I always felt that this was a very natural order of things. But I guess the philosophy in the "stash" case is subtly different, so maybe the change is warranted there.

-- 
Karl Hasselström, kha@treskal.com
      www.treskal.com/kalle
Previous: Shawn O. PearceNext: David Kastrup
Message 4 of 8 in “git stash apply usability issues”
  1. Johannes SixtOct 18, 2007
  2. Steven GrimmOct 18, 2007
  3. Shawn O. PearceOct 19, 2007
  4. Karl HasselströmOct 19, 2007
  5. David KastrupOct 19, 2007
  6. Avoid invoking diff drivers during git-stashShawn O. Pearce, Oct 19, 2007
  7. Johannes SixtOct 19, 2007
  8. Shawn O. PearceOct 19, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.