From: Matthieu Moy Subject: Re: push.default: current vs upstream Date: Thu, 12 Apr 2012 10:09:35 +0200 Message-ID: References: <20120405131301.GB10293@sigill.intra.peff.net> <20120406071520.GD25301@sigill.intra.peff.net> <20120406080004.GA27940@sigill.intra.peff.net> <4F7FF19B.1060407@alum.mit.edu> <20120407075150.GA18168@sigill.intra.peff.net> <7viphaygsg.fsf@alter.siamese.dyndns.org> <20120412075535.GC31122@sigill.intra.peff.net> Mime-Version: 1.0 Content-Type: text/plain Cc: Junio C Hamano , Michael Haggerty , git@vger.kernel.org To: Jeff King X-From: git-owner@vger.kernel.org Thu Apr 12 10:09:59 2012 Return-path: Envelope-to: gcvg-git-2@plane.gmane.org Received: from vger.kernel.org ([209.132.180.67]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1SIF6M-0003r6-QQ for gcvg-git-2@plane.gmane.org; Thu, 12 Apr 2012 10:09:59 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1762154Ab2DLIJw (ORCPT ); Thu, 12 Apr 2012 04:09:52 -0400 Received: from mx2.imag.fr ([129.88.30.17]:34279 "EHLO rominette.imag.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752935Ab2DLIJu (ORCPT ); Thu, 12 Apr 2012 04:09:50 -0400 Received: from mail-veri.imag.fr (mail-veri.imag.fr [129.88.43.52]) by rominette.imag.fr (8.13.8/8.13.8) with ESMTP id q3C83sQx012010 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NO); Thu, 12 Apr 2012 10:03:54 +0200 Received: from bauges.imag.fr ([129.88.7.32]) by mail-veri.imag.fr with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1SIF60-00027v-2C; Thu, 12 Apr 2012 10:09:36 +0200 In-Reply-To: <20120412075535.GC31122@sigill.intra.peff.net> (Jeff King's message of "Thu, 12 Apr 2012 03:55:35 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.93 (gnu/linux) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.2 (rominette.imag.fr [129.88.30.17]); Thu, 12 Apr 2012 10:03:55 +0200 (CEST) X-IMAG-MailScanner-Information: Please contact MI2S MIM for more information X-MailScanner-ID: q3C83sQx012010 X-IMAG-MailScanner: Found to be clean X-IMAG-MailScanner-SpamCheck: X-IMAG-MailScanner-From: matthieu.moy@grenoble-inp.fr MailScanner-NULL-Check: 1334822637.21806@bl0DTbu/MzNjYnY0iHFATw Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Archived-At: Jeff King writes: > I think it is as simple as applying the usual upstream rules, then > checking the remote name against the local name. Like this: This fails if no upstream is configured. I think applying "current" instead of failing in this case makes perfect sense (i.e. "simple" should fail only if there is an upstream configured, and it has a different name). -- Matthieu Moy http://www-verimag.imag.fr/~moy/