From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.devel Subject: Re: Git help requested: "git stash pop" is doing an unwanted "git add". Why? Date: Mon, 21 Dec 2015 20:26:21 +0000 Message-ID: <20151221202621.GB14142@acm.fritz.box> References: <20151220220127.GB26401@acm.fritz.box> <83y4coscd1.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1450729475 26653 80.91.229.3 (21 Dec 2015 20:24:35 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 21 Dec 2015 20:24:35 +0000 (UTC) Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Dec 21 21:24:27 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aB70N-0007ZE-9J for ged-emacs-devel@m.gmane.org; Mon, 21 Dec 2015 21:24:27 +0100 Original-Received: from localhost ([::1]:47159 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aB70M-0005p4-JE for ged-emacs-devel@m.gmane.org; Mon, 21 Dec 2015 15:24:26 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46226) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aB708-0005op-69 for emacs-devel@gnu.org; Mon, 21 Dec 2015 15:24:13 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aB705-0005bN-69 for emacs-devel@gnu.org; Mon, 21 Dec 2015 15:24:12 -0500 Original-Received: from mail.muc.de ([193.149.48.3]:15083) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aB704-0005b0-TR for emacs-devel@gnu.org; Mon, 21 Dec 2015 15:24:09 -0500 Original-Received: (qmail 11422 invoked by uid 3782); 21 Dec 2015 20:24:07 -0000 Original-Received: from acm.muc.de (p548A50F8.dip0.t-ipconnect.de [84.138.80.248]) by colin.muc.de (tmda-ofmipd) with ESMTP; Mon, 21 Dec 2015 21:24:05 +0100 Original-Received: (qmail 14322 invoked by uid 1000); 21 Dec 2015 20:26:21 -0000 Content-Disposition: inline In-Reply-To: <83y4coscd1.fsf@gnu.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-Delivery-Agent: TMDA/1.1.12 (Macallan) X-Primary-Address: acm@muc.de X-detected-operating-system: by eggs.gnu.org: FreeBSD 9.x X-Received-From: 193.149.48.3 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:196629 Archived-At: Hello, Eli. On Mon, Dec 21, 2015 at 05:35:06AM +0200, Eli Zaretskii wrote: > > Date: Sun, 20 Dec 2015 22:01:28 +0000 > > From: Alan Mackenzie > > I'm clearing out a "stash stack" in my master repository copy. I've > > just done "git stash pop", expecting git to pop the changes into my > > working directory. > > Well, there were 2 files with conflicts - fair enough. But with all the > > other files, git has had the cheek to do a "git add" (I think the jargon > > for this is "moved the files to the staging area"), leaving me with the > > hassle of doing a "git reset" on quite a lot of files. > > Why has the "git stash pop" done this, and how can I call "git stash > > pop" in the future, avoiding this annoying problem? > It's "git stash pop", yes. You need to "git reset" after "stash pop", > if you want to be sure the changes are not staged (a.k.a. "in the > index"). It looks like it. I've dropped a note to the git mailing list, suggesting that this is a bug. We'll see if anything comes of that. -- Alan Mackenzie (Nuremberg, Germany).