From: Junio C Hamano Date: Mon, 14 Mar 2011 07:29:51 GMT Subject: Re: git stash: status from current dir not top dir? Message-ID: <7v1v2agnww.fsf@alter.siamese.dyndns.org> In-Reply-To: <4D7B358A.5010101@gmail.com> Piotr Krukowiecki writes: > Subject: [PATCH] git stash: show status relative to current directory > > git status shows modified paths relative to current directory, so it's > possible to copy&paste them directly, even if you're in a subdirectory. > > But "git stash apply" always shows status from root of git repository. > This is misleading because you can't use the paths without modifications. > > This is caused by changing directory to root of repository at the > beginning of git stash. > > This patch makes git stash show status relative to current directory. > Instead of removing the "cd to toplevel", which would affect whole > script and might have other side-effects, the fix is to change directory > temporarily back to original dir just before displaying status. > > Signed-off-by: Piotr Krukowiecki > --- Sensible. Thanks. Don't we want to protect this output with some tests?