From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#52349: 29.0.50; vc-git and diff-mode: stage hunks Date: Wed, 8 Dec 2021 05:29:11 +0300 Message-ID: References: <268cee0d-465d-b862-d1d6-f5da4d69e737@inventati.org> <9106387a-98cf-396f-bf45-ccb04581787b@yandex.ru> <864k7kfd56.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="22427"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 Cc: Manuel Uberti , 52349@debbugs.gnu.org To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Dec 08 03:31:11 2021 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 1mumjf-0005ht-EZ for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 08 Dec 2021 03:31:11 +0100 Original-Received: from localhost ([::1]:52522 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mumjd-0003HN-IY for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 07 Dec 2021 21:31:09 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:43690) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mumjW-0003H8-Q2 for bug-gnu-emacs@gnu.org; Tue, 07 Dec 2021 21:31:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:55955) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mumjW-00076q-Ik for bug-gnu-emacs@gnu.org; Tue, 07 Dec 2021 21:31:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mumjW-0001Qb-3Q for bug-gnu-emacs@gnu.org; Tue, 07 Dec 2021 21:31:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 08 Dec 2021 02:31:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 52349 X-GNU-PR-Package: emacs Original-Received: via spool by 52349-submit@debbugs.gnu.org id=B52349.16389306155434 (code B ref 52349); Wed, 08 Dec 2021 02:31:02 +0000 Original-Received: (at 52349) by debbugs.gnu.org; 8 Dec 2021 02:30:15 +0000 Original-Received: from localhost ([127.0.0.1]:39268 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mumil-0001Pa-2u for submit@debbugs.gnu.org; Tue, 07 Dec 2021 21:30:15 -0500 Original-Received: from mail-lf1-f49.google.com ([209.85.167.49]:45978) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mumih-0001OG-8C for 52349@debbugs.gnu.org; Tue, 07 Dec 2021 21:30:14 -0500 Original-Received: by mail-lf1-f49.google.com with SMTP id m27so2504326lfj.12 for <52349@debbugs.gnu.org>; Tue, 07 Dec 2021 18:30:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=6dfDpCsvcJiFOW43EgpSz6QLN3CZICH8M0v5EmRFr9c=; b=ZgusflCiiFpytZXld/57+nGd7rSnjPMpdtwWk5cWi8FlOfcLgH9JVLbEwMwQHxZikp DAMx2uKUWzGpJ+e4KkPckJKC0DleXNjm2X89NFwxF3stltTMakbS4I+SZAYtTGPdVeog Z97Wv3WP39mfw+6wydSjP3AQijWpCwioiCm3jwgdfVS0W4tu0jTbUI/qQT2O+tEv/edY O3CMQrPVjLk2JTJA1/Jir2ACvzQvKaSC9l1d07f/VjwDtVoqgV+vQMJEB+w2k3sc6wYM aymtYolP1QadFQj1YbrZkxzkwPwTQ+g5yQmMIMoXEMeLemFq5HUYP0Dmmy6XQXb7iW+7 Y+Vg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=6dfDpCsvcJiFOW43EgpSz6QLN3CZICH8M0v5EmRFr9c=; b=SfVgFZCUn3ClNo5I6axPHPo16+TO6QaXUx9KHMk1+O/ALynHC6/VAPROrvCLumE1I5 BLw1DldRJsfiylV0+FvF2z3kI2NWyv+5Njs70aWvksZEz0KJpyGwt+rkNfdDN31qy1en pmv09NOqifdJF4JBfBSkyvkKqBhQ4OFqH7SYZ87nH1dtI16ZIxHZQqDnDby+FMrSGEkd M8LT5OIFT5+brMSKtH3QJs++dzKOVRMMzb3KVCH8W8XoyATlmqI0jRTODb6wASc1xuoK SPwWARb4/znWpprYgHcx655auv7GQMDs2w21U8RpNipCWUR4BRgf1j7as5y576dzu7IA Xz4g== X-Gm-Message-State: AOAM5319apSL1U9GSjoVda8zxzpVSZhzF+us5cjrPAcKFLQrwkqo4DZ2 R3KfX6p10fENHWFje4uifoYK5agHMCs= X-Google-Smtp-Source: ABdhPJzkET/PAr3SecQ1oWLL+acwXQvP0TTRFI4tCX9ANHIQ4YOpssMrRnYsEy0xKxplmm2CTVJWug== X-Received: by 2002:a19:c7d2:: with SMTP id x201mr44577811lff.684.1638930604936; Tue, 07 Dec 2021 18:30:04 -0800 (PST) Original-Received: from [192.168.0.103] ([5.18.233.185]) by smtp.googlemail.com with ESMTPSA id 190sm131205ljf.4.2021.12.07.18.30.04 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 07 Dec 2021 18:30:04 -0800 (PST) In-Reply-To: <864k7kfd56.fsf@mail.linkov.net> Content-Language: en-US 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" Xref: news.gmane.io gmane.emacs.bugs:221902 Archived-At: On 07.12.2021 22:06, Juri Linkov wrote: > The problem is that 'git apply --cached' doesn't perform the merge > with other changes in the same file, whereas 'git stash pop' > merges committed changes with uncommitted changes. This seems to address our previous discussion, rather than the difference vs. diff-hl. Anyway, I don't know if it is a problem. E.g., you might want to edit a diff (if you know how, which is a significant "if") to commit a slightly different change than what the current file contents show. But then, I'm not sure you'll want the applied change to be reflected in the file on disk too (as opposed to being saved in the commit). I probably won't (and it would let us avoid the awkward step of seeing the stashing operation temporarily reflected in the file contents, as well as any possible conflicts). Either way, the editing of the diff that's more complex than splitting hunks and deleting some of them will probably be very rare. So the behavior in this scenario doesn't have to affect our choice of implementation.