From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Stephen J. Turnbull" Newsgroups: gmane.emacs.devel Subject: Re: VC mode and git Date: Tue, 31 Mar 2015 13:03:33 +0900 Message-ID: <87619hke3u.fsf@uwakimon.sk.tsukuba.ac.jp> References: <86egoeusg2.fsf@example.com> <87384qzxqy.fsf@igel.home> <83bnjen71r.fsf@gnu.org> <871tk6538w.fsf@gnu.org> <838ueezgyk.fsf@gnu.org> <878ueejnjz.fsf@uwakimon.sk.tsukuba.ac.jp> <83twx2xoc8.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 X-Trace: ger.gmane.org 1427774644 1740 80.91.229.3 (31 Mar 2015 04:04:04 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 31 Mar 2015 04:04:04 +0000 (UTC) Cc: rms@gnu.org, sva-news@mygooglest.com, schwab@suse.de, emacs-devel@gnu.org, mikegerwitz@gnu.org, monnier@iro.umontreal.ca To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Mar 31 06:03:54 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 1YcnP7-0007D5-3u for ged-emacs-devel@m.gmane.org; Tue, 31 Mar 2015 06:03:53 +0200 Original-Received: from localhost ([::1]:36741 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YcnP1-0004lv-CQ for ged-emacs-devel@m.gmane.org; Tue, 31 Mar 2015 00:03:47 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57995) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YcnOw-0004lo-ET for emacs-devel@gnu.org; Tue, 31 Mar 2015 00:03:43 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YcnOv-0003qU-Eq for emacs-devel@gnu.org; Tue, 31 Mar 2015 00:03:42 -0400 Original-Received: from shako.sk.tsukuba.ac.jp ([130.158.97.161]:34786) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YcnOr-0003pN-ND; Tue, 31 Mar 2015 00:03:37 -0400 Original-Received: from uwakimon.sk.tsukuba.ac.jp (uwakimon.sk.tsukuba.ac.jp [130.158.99.156]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by shako.sk.tsukuba.ac.jp (Postfix) with ESMTPS id 14DC01C385A; Tue, 31 Mar 2015 13:03:34 +0900 (JST) Original-Received: by uwakimon.sk.tsukuba.ac.jp (Postfix, from userid 1000) id EE102120EC9; Tue, 31 Mar 2015 13:03:33 +0900 (JST) In-Reply-To: <83twx2xoc8.fsf@gnu.org> X-Mailer: VM undefined under 21.5 (beta34) "kale" 83e5c3cd6be6 XEmacs Lucid (x86_64-unknown-linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 130.158.97.161 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:184585 Archived-At: Eli Zaretskii writes: > If it needs to cater to non-experts, let alone people who cannot > afford or be bothered to learn enough of Git, it should also make sure > the repository is left in a state from which it is easy to proceed > with fixing whatever problems are left after backing out the commit. > I'm not sure this is easy. "Easy to proceed with fixing" is an impossible standard, when you're talking about people who don't follow instructions to the letter and probably don't remember exactly what they did. For example, I have no fscking idea how Richard put his workspace into a state where git thinks a zillion source files are modified. The burden of resolving that should not be placed on git or on the Emacs workflow. What can be done is revert to the exact state in which "git commit" was invoked. I explained in general how to do that. I am rather sure that approach works. The problems are (1) I lack the *shell-foo* to script it reliably (including cleaning up leftover stashes or temporary branches etc), and (2) I really don't think it will be used by anybody but Richard, and I've got a plane to catch so for the foreseeable future I'm not going to spend effort on making it robust. > But if someone who knows their ways around Git comes up with such a > script, I'll be the first to applaud. As Stefan posted, put "git push || git reset --soft HEAD^" in the post-commit hook. Richard should try that. He may or may not ever be back complaining that it forgot about a "git add". In the meantime, you can worry about fixing that problem (or finding somebody to test my suggestions about stash and branching for you).