From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Sean Whitton Newsgroups: gmane.emacs.bugs Subject: bug#60126: 30.0.50; vc-git-checkin: Offer to unstage conflicting changes Date: Thu, 22 Dec 2022 17:12:24 -0700 Message-ID: <87h6xnasgn.fsf@melete.silentflame.com> References: <38d4d719-8f3c-9bb6-b141-f7e9ca66333c@yandex.ru> <871qovjabq.fsf@melete.silentflame.com> <4513ac99-76d1-cdd6-fcc9-59208b5002f3@yandex.ru> <87zgbih8wv.fsf@melete.silentflame.com> <392bbde0-9d6e-83c4-0639-af406e279ef1@yandex.ru> <87h6xqgg65.fsf@melete.silentflame.com> <87zgbh1xkn.fsf@melete.silentflame.com> <4910f545-d7b1-9f6b-8262-fd7fc89d589d@yandex.ru> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11694"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 60126@debbugs.gnu.org, juri@linkov.net To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Dec 23 01:13:29 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1p8Vgm-0002op-9I for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 23 Dec 2022 01:13:28 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p8VgQ-0000NE-Bg; Thu, 22 Dec 2022 19:13:06 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p8VgM-0000Ml-JI for bug-gnu-emacs@gnu.org; Thu, 22 Dec 2022 19:13:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p8VgM-0007rX-5l for bug-gnu-emacs@gnu.org; Thu, 22 Dec 2022 19:13:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p8VgL-0007rr-JG for bug-gnu-emacs@gnu.org; Thu, 22 Dec 2022 19:13:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Sean Whitton Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 23 Dec 2022 00:13:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60126 X-GNU-PR-Package: emacs Original-Received: via spool by 60126-submit@debbugs.gnu.org id=B60126.167175435530230 (code B ref 60126); Fri, 23 Dec 2022 00:13:01 +0000 Original-Received: (at 60126) by debbugs.gnu.org; 23 Dec 2022 00:12:35 +0000 Original-Received: from localhost ([127.0.0.1]:36422 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p8Vfv-0007rW-EI for submit@debbugs.gnu.org; Thu, 22 Dec 2022 19:12:35 -0500 Original-Received: from out3-smtp.messagingengine.com ([66.111.4.27]:50661) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p8Vfr-0007rO-Qf for 60126@debbugs.gnu.org; Thu, 22 Dec 2022 19:12:33 -0500 Original-Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id 885B05C004B; Thu, 22 Dec 2022 19:12:26 -0500 (EST) Original-Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Thu, 22 Dec 2022 19:12:26 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=spwhitton.name; h=cc:cc:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm1; t=1671754346; x=1671840746; bh=dP QLm1eNUGqHlCQSB7BFq+myIxGrzQzgZfKxKoCSVNE=; b=fVS5KKdhcvyKLfgYdf bJHcmyf7Re3ahyZtvuICX89f4RS6iJnKqEMqxAkamxqhhJuwDy7XXwYpv/BopBD1 M8jMGd3b+00StPP0AVkLZCkBaeHorobWO+nzi8A+hZEFfO6Zmr76q3oXqTte+UIp FgarEFA2puCAP2MtKwuW//GgmzU/I4AhK9+xIVUesZ9tPynsEqagTPps/Dejq2Xh XD16wxtG7u/1FA8u4sNgOMyEGrg/e20uItFTLZsjCCrBQP4R/HuCxPkaUCxhU2Wl qxZn10mm8+r05CAgexPk0iZO7RjOF8c5mM/w+4Smg28P8iNoD78kr1IshJ64206K 3n2g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:date:date:feedback-id :feedback-id:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:sender:subject:subject:to:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; t=1671754346; x=1671840746; bh=dPQLm1eNUGqHlCQSB7BFq+myIxGr zQzgZfKxKoCSVNE=; b=QGeAvpxCtgaNVh5il2tr9ufO1jxGybDlgJRhKp0wZVVj TItWwczYS/zPP4dbQf+GWyYStJEg7McHDSUSNF3lxQ0YDHbHLHuw4Yg5RuqRGf3q DwhNt4WMpkBPRlfnVqKF38hh0r6/mp30VtltwkeAxBIFBsLI2R8L4PrvU1YY8vak JdqYq5LMyLv3kltDM7v4RRmNmmYhdCDJf7MOg0Z+X2wBXRHlDk9plK1i2WxKQWBG 9RAdIVst++gDfB5jPo+pjMBnaocmMXkDmtnpU1gcMMUMrHzP0clqyeLURJjCDYC2 5BPj9sTXHbVYaD8eHZm8OPJ0QwsMsHldtHJ2ps0BKw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrhedugddvtdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvfevufgjfhffkfgfgggtsehttddttddtredtnecuhfhrohhmpefuvggrnhcu hghhihhtthhonhcuoehsphifhhhithhtohhnsehsphifhhhithhtohhnrdhnrghmvgeqne cuggftrfgrthhtvghrnhepheetieeffeefvdegieejkefghfdvveeltddttdetgeetjefg keffkeeujeffvdehnecuffhomhgrihhnpehgihhtqdhstghmrdgtohhmpdhsthgrtghkoh hvvghrfhhlohifrdgtohhmnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehm rghilhhfrhhomhepshhpfihhihhtthhonhesshhpfihhihhtthhonhdrnhgrmhgv X-ME-Proxy: Feedback-ID: i23c04076:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 22 Dec 2022 19:12:25 -0500 (EST) Original-Received: by melete.silentflame.com (Postfix, from userid 1000) id B5FA37ED1CC; Thu, 22 Dec 2022 17:12:24 -0700 (MST) In-Reply-To: <4910f545-d7b1-9f6b-8262-fd7fc89d589d@yandex.ru> (Dmitry Gutov's message of "Wed, 21 Dec 2022 01:45:37 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:251691 Archived-At: Hello, On Wed 21 Dec 2022 at 01:45AM +02, Dmitry Gutov wrote: > IIUC the --staged option is indeed limited to the very new Git, but that > option is used when creating a stash (when we want to stash the staging area > only). > > When restoring a stash, to reinstate the stashed index, you would use the > option --index. It's older than --staged (e.g. it's available in Git 2.22.0, > and that's as far back as the docs at git-scm.com/docs go). Not sure if it's > in Debian Stable or not. Ah, thanks for reminding me, I was getting mixed up. Unfortunately it's probably not much use, because 'git stash push -- x' stashes all staged changes, it turns out, not just those in x. > Regarding the alternatives -- double stashing, or the Magit way, it's > hard to form a strong opinion before examining them in detail (I trust > you can make a good choice). > > For completeness, though, here's a way to implement 'git push --staged' with > Git plumbing manually: https://stackoverflow.com/a/72582276/615245 > > And as for a 'git pop --index' substitute, if the stash contains only the > index area stuff, it might be as easy as > > git diff stash@{0}^..stash@{0} > patch.diff > git apply --cached patch.diff > git stash drop These references are helpful. I'll investigate further. -- Sean Whitton