All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nanako Shiraishi <nanako3@lavabit.com>
To: "Junio C Hamano" <gitster@pobox.com>
Cc: "Jonathan del Strother" <maillist@steelskies.com>,
	"Johannes Sixt" <j.sixt@viscovery.net>,
	"Larry Finger" <Larry.Finger@lwfinger.net>,
	git@vger.kernel.org
Subject: Re: Re*: Peculiar behavior of git 1.5.6
Date: Thu, 04 Sep 2008 19:20:08 +0900	[thread overview]
Message-ID: <20080904192008.6117@nanako3.lavabit.com> (raw)
In-Reply-To: <7v3akg5jul.fsf_-_@gitster.siamese.dyndns.org>

Quoting Junio C Hamano <gitster@pobox.com>:

> In any case, I think this should fix the unrelated issue.
>
> -- >8 --
> stash: refresh the index before deciding if the work tree is dirty
>
> Unlike the case where the user does have a real change in the work tree,
> refusing to work because of unclean stat information is not very helpful.
>
> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Acked-by: Nanako Shiraishi <nanako3@lavabit.com>

> ---
>  git-stash.sh |    3 +++
>  1 files changed, 3 insertions(+), 0 deletions(-)
>
> diff --git c/git-stash.sh w/git-stash.sh
> index e15c12a..d799c76 100755
> --- c/git-stash.sh
> +++ w/git-stash.sh
> @@ -39,6 +39,7 @@ clear_stash () {
>  create_stash () {
>  	stash_msg="$1"
>  
> +	git update-index -q --refresh
>  	if no_changes
>  	then
>  		exit 0
> @@ -101,6 +102,7 @@ save_stash () {
>  
>  	stash_msg="$*"
>  
> +	git update-index -q --refresh
>  	if no_changes
>  	then
>  		echo 'No local changes to save'
> @@ -150,6 +152,7 @@ show_stash () {
>  }
>  
>  apply_stash () {
> +	git update-index -q --refresh &&
>  	git diff-files --quiet --ignore-submodules ||
>  		die 'Cannot restore on top of a dirty state'
>  

-- 
Nanako Shiraishi
http://ivory.ap.teacup.com/nanako3/

  reply	other threads:[~2008-09-04 10:21 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-04  5:43 Peculiar behavior of git 1.5.6 Larry Finger
2008-09-04  8:09 ` Johannes Sixt
2008-09-04  8:35   ` Junio C Hamano
2008-09-04  9:11     ` Jonathan del Strother
2008-09-04  9:41       ` Re*: " Junio C Hamano
2008-09-04 10:20         ` Nanako Shiraishi [this message]
2008-09-04 16:05         ` Larry Finger

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=20080904192008.6117@nanako3.lavabit.com \
    --to=nanako3@lavabit.com \
    --cc=Larry.Finger@lwfinger.net \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=j.sixt@viscovery.net \
    --cc=maillist@steelskies.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.