From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: master 4803fba487 1/2: 'C-x v v' on a diff buffer commits it as a patch (bug#52349) Date: Mon, 29 Aug 2022 22:31:44 +0300 Message-ID: <8335dex2vz.fsf@gnu.org> References: <166171593185.16640.41619657947456727@vcs2.savannah.gnu.org> <20220828194533.23A6BC00889@vcs2.savannah.gnu.org> <87r10znm0y.fsf@gnus.org> <83fshfvvyn.fsf@gnu.org> <83bks3vtf5.fsf@gnu.org> <8735dec0uo.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16534"; mail-complaints-to="usenet@ciao.gmane.io" Cc: dgutov@yandex.ru, larsi@gnus.org, juri@jurta.org, emacs-devel@gnu.org To: Tassilo Horn Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Aug 29 21:33:04 2022 Return-path: Envelope-to: ged-emacs-devel@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 1oSkVM-000495-2v for ged-emacs-devel@m.gmane-mx.org; Mon, 29 Aug 2022 21:33:04 +0200 Original-Received: from localhost ([::1]:60810 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oSkVL-0000Az-1Y for ged-emacs-devel@m.gmane-mx.org; Mon, 29 Aug 2022 15:33:03 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:55128) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oSkTn-0007Bd-AX for emacs-devel@gnu.org; Mon, 29 Aug 2022 15:31:28 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:45772) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oSkTk-0007mE-11; Mon, 29 Aug 2022 15:31:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=+J5X5QaKP8ZlWcjLYuZngqNPNvhmgO5nNIqLwmjc0Zg=; b=HBXpbabq1Mi2 Ke7ozMd8MMZKW8wcV3zaxw6PHG0lIVoFm75WpTta5OuJP2afkf1/FOLAq1vp5GzeZi7AfCAenjXOy inW/HuN2BYUNf1K/SobLw/fFnm+zBmBLpCL5/tqbLLAZCANzcbYBrMS5X8zhjwE0oC9+vPFqYUnKf 5B0q3jfrNW2qWoU3f3nwyVB8+EoZlGq9cbCefOTqwEokkvLVbbG8cVOUBKLR/+7kr45QYhpHY76Zv Bae6wUT6TSMPCYiEnwTbqkJhTaVOF4I2xI69Fkg7xXqwOoNd3l6D7wtlkyFvd0S2cGKSsD3UYPYyM hJzdim94KMg/0MKyrc4rCg==; Original-Received: from [87.69.77.57] (port=3487 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oSkTj-0006Rz-Bu; Mon, 29 Aug 2022 15:31:23 -0400 In-Reply-To: <8735dec0uo.fsf@gnu.org> (message from Tassilo Horn on Mon, 29 Aug 2022 21:03:50 +0200) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:294302 Archived-At: > From: Tassilo Horn > Cc: Dmitry Gutov , larsi@gnus.org, juri@jurta.org, > emacs-devel@gnu.org > Date: Mon, 29 Aug 2022 21:03:50 +0200 > > I think the difference is that "git apply --cached foo.patch" exits > non-zero if the index isn't empty and vc-git-checkin errors when it's > not. That ensures the commit will include only the changes in the patch > and nothing else. > > I guess other VCS impls could just test if the checkout is completely > unmodified and signal an error otherwise. Either that, or compare the list of modified files with the list of patched files produced by Patch. > That would be a bit more restrictive but still useful. Yes, indeed. > >> Personally I hope we discover some popular extension to Mercurial > >> which we'll be able to use in the same way as we do Git's index area > >> here. And then say job well done and keep the less-popular and > >> outdated backends unsupported. > > > > The index thing being the problem because Git needs to have the > > changes in the index before you can commit? Or is there any other > > reason? > > I think the git benefit is that you can have a completely dirty checkout > (hundreds of modified files) but the command will still work fine as > long as you haven't staged other changes yet. It is perfectly fine to have the Git implementation be more flexible and convenient than with other VCSes, which don't support the same granularity/precision. It would still be much better than having no implementation at all for the other VCSes.