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: Sat, 10 Sep 2022 04:36:35 +0300 Message-ID: References: <268cee0d-465d-b862-d1d6-f5da4d69e737@inventati.org> <9106387a-98cf-396f-bf45-ccb04581787b@yandex.ru> <864k7kfd56.fsf@mail.linkov.net> <86fsr3uen2.fsf@mail.linkov.net> <95d2d999-49ad-13c4-9f25-0935650a1e42@yandex.ru> <8635ktjfll.fsf@mail.linkov.net> <36b963e4-5af7-dd9e-af92-4404541b9f4d@yandex.ru> <86v8xjx45h.fsf@mail.linkov.net> <861qt9h1hh.fsf@mail.linkov.net> <864jy1mrk8.fsf@mail.linkov.net> <86fsh1ll5y.fsf@mail.linkov.net> <87edwlo52t.fsf@melete.silentflame.com> 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="29874"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 To: Sean Whitton , Juri Linkov , 52349@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Sep 10 03:37:10 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 1oWpQj-0007b1-Aw for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 10 Sep 2022 03:37:09 +0200 Original-Received: from localhost ([::1]:50976 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oWpQh-0007Qh-QF for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 09 Sep 2022 21:37:07 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50128) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oWpQc-0007QY-9o for bug-gnu-emacs@gnu.org; Fri, 09 Sep 2022 21:37:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:47298) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oWpQc-0000IY-1g for bug-gnu-emacs@gnu.org; Fri, 09 Sep 2022 21:37:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oWpQb-0003Hx-NF for bug-gnu-emacs@gnu.org; Fri, 09 Sep 2022 21:37:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 10 Sep 2022 01:37:01 +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.166277380912620 (code B ref 52349); Sat, 10 Sep 2022 01:37:01 +0000 Original-Received: (at 52349) by debbugs.gnu.org; 10 Sep 2022 01:36:49 +0000 Original-Received: from localhost ([127.0.0.1]:35997 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oWpQP-0003HU-CL for submit@debbugs.gnu.org; Fri, 09 Sep 2022 21:36:49 -0400 Original-Received: from mail-wr1-f45.google.com ([209.85.221.45]:46817) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oWpQJ-0003HB-Iu for 52349@debbugs.gnu.org; Fri, 09 Sep 2022 21:36:48 -0400 Original-Received: by mail-wr1-f45.google.com with SMTP id e20so5848984wri.13 for <52349@debbugs.gnu.org>; Fri, 09 Sep 2022 18:36:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :sender:from:to:cc:subject:date; bh=a/+dPsSQz8957XUMlYzRaUzS6rhmMO9oy0bJ2nfbOaI=; b=aU4DhRgLZ8gLLX2Fwdf1NycM9PUsiFJ8PLl/58c+MEnSVF/Z6LtVBRoLPimDjTWaSZ oKkTL0JBNSVFRXN1ZcipPTbNPz30Mld+FRmxdpcr/qL/NuZCLNRHpexVm44EJISqwZOn 1aDZtjjO1O3CVoiIujPIimUA9LfebaT9TsiThZs+dZFnzvz+ew2yWezNp6ZvzFrCN+WH uhriGvgh5bL/9SjnhQ8801IBAgGvlIAYIsJFJze4Fd+XNNnW3iYA9yFEmLZPd+Oa8PX4 k1114Bz9pBMc4nfTQD5lqm7fA07F/RgJ9qLF4twnYLGPQXoP0Bj3cExcA/1PXmUR/4HZ C5ug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :sender:x-gm-message-state:from:to:cc:subject:date; bh=a/+dPsSQz8957XUMlYzRaUzS6rhmMO9oy0bJ2nfbOaI=; b=beU4669QwBjq0GUHsRZu9+gCmxK+QkAHxWTLWNqE7Sxh60J0u6Xc1QmnibCJfLC20V cEyXgzJ+5g3yGVro1LiC4ftXguh2ZbS7g48EO9l3SjAwpSvh1O1eewOcoIC3Kac3c2Pm mFHF3v2XkfZJf1OVSI1uqB64NWD8CZwe+c68haMXfXWzyEPuO0saqtELO2B9oD8fh3lw uft38kGKX2D8Pd59vj9HtI/qqbmRwCjPQnGROouGFb0e4ucXYGXa26DjicJ3tBp1XkqS pxYpEZWOnSRNLAqCOMaaXdd/0imP09f9NTl9im17af2C8nv7A0GiP7cMY4hNButQFhSl mAWw== X-Gm-Message-State: ACgBeo1wMtsFfOgroGOWsmwJlS4NNC/hgoUH/G3gBlrd3OkXZeMxscEO A/EAjrySdwqr9dLiXjNWJDs= X-Google-Smtp-Source: AA6agR5DQ2M1+sN4vl7uhdQbS8g/891gUozIKO12levUzrOU5Em5EMYgRGDDSEoO/uT7O0MABCBhJg== X-Received: by 2002:a5d:47c3:0:b0:22a:2e9f:b839 with SMTP id o3-20020a5d47c3000000b0022a2e9fb839mr6345969wrc.72.1662773797563; Fri, 09 Sep 2022 18:36:37 -0700 (PDT) Original-Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id d7-20020a5d5387000000b00228d52b935asm1643688wrv.71.2022.09.09.18.36.36 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 09 Sep 2022 18:36:37 -0700 (PDT) Content-Language: en-US In-Reply-To: <87edwlo52t.fsf@melete.silentflame.com> 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:242047 Archived-At: On 09.09.2022 01:48, Sean Whitton wrote: > Would it be too disruptive to make "registering" a new file with Git a > no-op, and then require the user to commit it by going to VC Dir and > marking it? That's the only alternative I can think of, given that it's > common to have lots of untracked, unignored files around you don't > intend ever to commit. I suppose we could use a more complex check in Git's case: if the diff is non-empty, check that it doesn't intersect with the diff we want to apply, or where it does, the contents are exactly the same. It's more complex than the existing one-liner, though. The commit-and-amend thick is the first that came to my mind too, but the above would be more flexible, I guess. And as for dropping the "registering" step in Git, I suppose that might speed up the overall workflow for some people (myself included, probably), but it still wouldn't allow you to check in new files together with a partial diff in existing one. I think.