All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Adeodato Simó" <dato@net.com.org.es>
To: git@vger.kernel.org
Subject: git stash deletes/drops changes of "assume-unchanged" files
Date: Fri, 4 Jun 2010 17:24:41 +0100	[thread overview]
Message-ID: <AANLkTin-BIxgQE5CO2cLhCYJAGHFxiXPquyozKc308DS@mail.gmail.com> (raw)

Hello (and please CC me on replies).

I was unpleasantly surprised to discover yesterday that doing `git
stash` on a repository where I had previously run `git update-index
--assume-unchanged FOO` completely lost all changes I had in file FOO.

I understand the behavior is logical from the way git-stash is
implemented, but it strikes as very undesirable behavior to me. Does
somebody think something could be done to change it? In my opinion, both
including in the stash changes in FOO, or just leaving them in the
working tree, would be better alternatives.

Thoughts?

-8<-

% git init
% echo file1 contents >file1; echo file2 contents >file2
% git add file1 file2; git commit -m Initial.

% echo changes for file2 >>file2
% echo some other changes to file 1 >>file1
% git update-index --assume-unchanged file1

% git stash
% cat file1
file1 contents
% git stash show -p
--- a/file2
+++ b/file2
@@ -1 +1,2 @@
 file2 contents
+changes for file2

-8<-

-- 
- Are you sure we're good?
- Always.
        -- Rory and Lorelai

             reply	other threads:[~2010-06-04 16:34 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-04 16:24 Adeodato Simó [this message]
2013-05-23 16:57 ` git stash deletes/drops changes of Jim Greenleaf
2013-05-23 22:10   ` Thomas Rast
2013-05-23 22:49     ` Junio C Hamano
2013-05-23 22:56       ` Thomas Rast
2013-05-23 23:20         ` Junio C Hamano
2013-05-24 15:25           ` Phil Hord
2013-05-24 15:34             ` Jim Greenleaf
2013-05-24 15:38               ` John Keeping
2013-05-24 15:42                 ` Jim Greenleaf
2013-05-24 16:01                   ` John Keeping
2013-05-23 23:57         ` Petr Baudis
2013-05-24  8:22           ` John Keeping
2013-05-24  9:40             ` Petr Baudis
2013-05-24 10:06               ` John Keeping
2013-05-24 10:14                 ` Petr Baudis
2013-05-24 10:40                   ` John Keeping
2013-05-24 11:03                     ` Petr Baudis
2013-05-24 12:42                       ` John Keeping
2013-05-24 14:26         ` Stephen Bash

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=AANLkTin-BIxgQE5CO2cLhCYJAGHFxiXPquyozKc308DS@mail.gmail.com \
    --to=dato@net.com.org.es \
    --cc=git@vger.kernel.org \
    /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.