Imagine you have a simple stash like:

  git init
  echo base >file && git add file && git commit -m file
  echo new >file
  git stash

Before this series:

  $ git stash list -p
  stash@{0}: WIP on master: 7a1fd22 file

Er, what? It didn't give me a patch. Oh, that's because stashes are
merge commits, and we need to tell it how to handle merges.

  $ git stash list -p --cc
  stash@{0}: WIP on master: 7a1fd22 file

  diff --cc file
  index df967b9,df967b9..3e75765
  --- a/file
  +++ b/file
  @@@ -1,1 -1,1 +1,1 @@@
  --base
  ++new

Better, though the combined diff is useless, since I didn't touch the
index at all. Here it is after this series:

  $ git stash list -p
  stash@{0}: WIP on master: 7a1fd22 file

  diff --cc file
  index df967b9..3e75765
  --- a/file
  +++ b/file
  @@ -1,1 +1,1 @@
  -base
  +new

Ah, a nice readable diff with no hassle.

  [1/2]: add --simplify-combined-diff option
  [2/2]: stash: default listing to "--cc --simplify-combined-diff"

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

Reply via email to