git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Piotr Krukowiecki <piotr.krukowiecki@gmail.com>
Cc: Jeff King <peff@peff.net>, git@vger.kernel.org
Subject: Re: git stash: status from current dir not top dir?
Date: Mon, 14 Mar 2011 00:29:51 -0700	[thread overview]
Message-ID: <7v1v2agnww.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <4D7B358A.5010101@gmail.com> (Piotr Krukowiecki's message of "Sat, 12 Mar 2011 09:57:46 +0100")

Piotr Krukowiecki <piotr.krukowiecki@gmail.com> 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 <piotr.krukowiecki@gmail.com>
> ---

Sensible. Thanks.

Don't we want to protect this output with some tests?

  reply	other threads:[~2011-03-14  7:30 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-11 20:49 git stash: status from current dir not top dir? Piotr Krukowiecki
2011-03-11 22:32 ` Jeff King
2011-03-12  8:57   ` Piotr Krukowiecki
2011-03-14  7:29     ` Junio C Hamano [this message]
2011-03-14 19:45       ` Piotr Krukowiecki
2011-03-17 18:13         ` Piotr Krukowiecki
2011-03-17 19:30           ` Junio C Hamano
2011-03-19  9:24             ` Piotr Krukowiecki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7v1v2agnww.fsf@alter.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=peff@peff.net \
    --cc=piotr.krukowiecki@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).