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: [Emacs-diffs] xwidget 9fe732a 2/2: Better changelog for xwidgets Date: Mon, 02 Feb 2015 12:45:34 +0900 Message-ID: <871tm9q8m9.fsf@uwakimon.sk.tsukuba.ac.jp> References: <20150201003025.18138.95966@vcs.savannah.gnu.org> <54CDC38C.9080701@yandex.ru> <83siepiqys.fsf@gnu.org> <87y4ohd3d3.fsf@igel.home> <87iofl8vdl.fsf@engster.org> <87twz5d2vr.fsf@igel.home> <87egq98m7w.fsf@engster.org> <878ughqenh.fsf@uwakimon.sk.tsukuba.ac.jp> <54CED985.20703@yandex.ru> <87386pqcxw.fsf@uwakimon.sk.tsukuba.ac.jp> <54CEDF1C.2010504@yandex.ru> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 X-Trace: ger.gmane.org 1422848756 23682 80.91.229.3 (2 Feb 2015 03:45:56 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 2 Feb 2015 03:45:56 +0000 (UTC) Cc: emacs-devel@gnu.org To: Dmitry Gutov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Feb 02 04:45:55 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 1YI7xS-0004g9-RO for ged-emacs-devel@m.gmane.org; Mon, 02 Feb 2015 04:45:54 +0100 Original-Received: from localhost ([::1]:52799 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YI7xS-00012I-9L for ged-emacs-devel@m.gmane.org; Sun, 01 Feb 2015 22:45:54 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44835) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YI7xF-00012D-6c for emacs-devel@gnu.org; Sun, 01 Feb 2015 22:45:42 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YI7xC-0002Wg-0z for emacs-devel@gnu.org; Sun, 01 Feb 2015 22:45:41 -0500 Original-Received: from shako.sk.tsukuba.ac.jp ([130.158.97.161]:38555) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YI7xB-0002Wa-NE for emacs-devel@gnu.org; Sun, 01 Feb 2015 22:45:37 -0500 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 AFE551C385F; Mon, 2 Feb 2015 12:45:34 +0900 (JST) Original-Received: by uwakimon.sk.tsukuba.ac.jp (Postfix, from userid 1000) id 926A51A2CF1; Mon, 2 Feb 2015 12:45:34 +0900 (JST) In-Reply-To: <54CEDF1C.2010504@yandex.ru> X-Mailer: VM undefined under 21.5 (beta34) "kale" acf1c26e3019 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:182230 Archived-At: Dmitry Gutov writes: > On 02/02/2015 04:12 AM, Stephen J. Turnbull wrote: > > > Why do we need to fetch first? Just check against > > > origin/master. If it's outdated, the push will most likely > > > fail anyway. > > > > It didn't this time. > > That means origin/master on Joakim's machine wasn't outdated. Which, > without someone implementing the actual check, doesn't give us anything. The check isn't hard, it's just current=$(git rev-parse origin/master) base=$(git rev-list --first-parent origin/master^..HEAD | tail -1) test "$current" = "$base" (untested). Probably we should be a little more careful about specifying what is proposed for push on the user side than just "HEAD", but that gives the basic computation. Turning that into a hook for receive-pack is something that may be equally trivial, but I don't have the time (or the interest) to investigate hook-writing. In any case, the point of doing the check locally is to avoid a failed push which is annoying and upsetting, especially to users who are used to a different workflow or VCS. If you're doing the check offline or otherwise the fetch of the branch you want to push to fails, sure, fall back to the current state.