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-dwim when nothing to commit Date: Tue, 05 May 2015 18:44:15 +0300 Message-ID: <83egmvrpv4.fsf@gnu.org> References: <86egoeusg2.fsf@example.com> <83pp7yp5po.fsf@gnu.org> <87383yqkpc.fsf_-_@lifelogs.com> <838udp997g.fsf@gnu.org> <87pp71pwgi.fsf@lifelogs.com> <83wq197l6r.fsf@gnu.org> <87wq0o6qqc.fsf@lifelogs.com> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1430840682 15034 80.91.229.3 (5 May 2015 15:44:42 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 5 May 2015 15:44:42 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue May 05 17:44:33 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 1Ypf1M-0002cM-Lk for ged-emacs-devel@m.gmane.org; Tue, 05 May 2015 17:44:32 +0200 Original-Received: from localhost ([::1]:40030 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ypf1M-00056D-4S for ged-emacs-devel@m.gmane.org; Tue, 05 May 2015 11:44:32 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60754) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ypf19-000565-2R for emacs-devel@gnu.org; Tue, 05 May 2015 11:44:20 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ypf10-0005kq-V2 for emacs-devel@gnu.org; Tue, 05 May 2015 11:44:18 -0400 Original-Received: from mtaout22.012.net.il ([80.179.55.172]:43426) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ypf10-0005kd-Mg for emacs-devel@gnu.org; Tue, 05 May 2015 11:44:10 -0400 Original-Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0NNV00900VH7A500@a-mtaout22.012.net.il> for emacs-devel@gnu.org; Tue, 05 May 2015 18:44:09 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NNV0092EVPK3U70@a-mtaout22.012.net.il> for emacs-devel@gnu.org; Tue, 05 May 2015 18:44:09 +0300 (IDT) In-reply-to: <87wq0o6qqc.fsf@lifelogs.com> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 X-Received-From: 80.179.55.172 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:186241 Archived-At: > From: Ted Zlatanov > Date: Mon, 04 May 2015 16:18:51 -0400 > > I tried polishing the interaction but I kept coming back to "run eshell > or ansi-term and up-arrow brings up the last 'git push' in the current > directory" which is one keystroke for me. That's because I really, > really want to know if `git push' fails, and which refs it failed to > push. Does it really fail so much for you? I almost never see it fail here. > So maybe the best way to do it for Git is: > > 1) check to see if there's anything to push (local tracking branch is > ahead of remote). If not, do nothing. Why not suggest "git pull" instead? (Only suggest.) > 2) Else, prompt to "git push" and capture the output. This piece should > have its own command history. > > 3) if there was any failure (I don't know if the return code is > sufficient to determine that), bring up eshell or ansi-term with the > failure output pre-inserted Not sure why you want a shell in case of failure. What commands are you likely to invoke in that case? Can't we do that without bringing up a shell?