From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: VC mode and git Date: Tue, 31 Mar 2015 14:40:13 +0300 Message-ID: <83sicltmxu.fsf@gnu.org> References: <86egoeusg2.fsf@example.com> <87384qzxqy.fsf@igel.home> <83bnjen71r.fsf@gnu.org> <871tk6538w.fsf@gnu.org> <838ueezgyk.fsf@gnu.org> <83vbhixty3.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1427802054 3763 80.91.229.3 (31 Mar 2015 11:40:54 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 31 Mar 2015 11:40:54 +0000 (UTC) Cc: sva-news@mygooglest.com, mikegerwitz@gnu.org, schwab@suse.de, rms@gnu.org, emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Mar 31 13:40:44 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 1YcuX8-00030h-EA for ged-emacs-devel@m.gmane.org; Tue, 31 Mar 2015 13:40:38 +0200 Original-Received: from localhost ([::1]:38183 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YcuX7-0000Er-MS for ged-emacs-devel@m.gmane.org; Tue, 31 Mar 2015 07:40:37 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40329) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YcuX1-0000EQ-DZ for emacs-devel@gnu.org; Tue, 31 Mar 2015 07:40:32 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YcuWx-0001oi-D0 for emacs-devel@gnu.org; Tue, 31 Mar 2015 07:40:31 -0400 Original-Received: from mtaout26.012.net.il ([80.179.55.182]:59697) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YcuWw-0001oc-R7; Tue, 31 Mar 2015 07:40:27 -0400 Original-Received: from conversion-daemon.mtaout26.012.net.il by mtaout26.012.net.il (HyperSendmail v2007.08) id <0NM200700R309400@mtaout26.012.net.il>; Tue, 31 Mar 2015 14:41:31 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout26.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NM200LT0R56RMA0@mtaout26.012.net.il>; Tue, 31 Mar 2015 14:41:31 +0300 (IDT) In-reply-to: X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 80.179.55.182 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:184605 Archived-At: > From: Stefan Monnier > Date: Mon, 30 Mar 2015 16:37:48 -0400 > Cc: sva-news@mygooglest.com, mikegerwitz@gnu.org, emacs-devel@gnu.org, > rms@gnu.org, schwab@suse.de > > > Then please write it up, and let's see it in action. > > It was already provided: > > #!/bin/sh > git push || git reset --soft HEAD^ Are you sure this is all that's needed? I have at least 2 potential issues with it: . If the commit fails, will the hook run anyway? (I cannot find any documentation on this.) . If the push fails and the hook runs "git reset", will the commit command exit with a non-zero status? (I'm guessing not, but again found no documentation.) If it exits with a zero status anyway, then "C-x v v" will not know the operation failed, would it?