Web lists-archives.com

git stash changes ORIG_HEAD




Hi,

I monitor a couple of Git repos by reviewing changes via:

% git pull
% git log -p -w --no-merges ORIG_HEAD..

This works wonderfully for me.  However, sometimes I have pending
changes in my repo (because I did not yet committed them to a new
branch).  I thought I could simply use

% git pull --rebase --autostash
% git log -p -w --no-merges ORIG_HEAD..

However, this does not work as intended because stashing moves
ORIG_HEAD.  Right now I use

% orig=$(git rev-parse HEAD)
% git pull --rebase --autostash
% git log -p -w --no-merges orig..

Is it really necessary that ORIG_HEAD is moved while stashing? This
does defeat it's purpose because it's always identical to HEAD after
the stash is applied. Or could we have an option to not do that? Or is
there already another symbolic
name I could use?

Best,
  Norbert