From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 12BCB431FC0 for ; Mon, 14 Jul 2014 10:52:22 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.1 X-Spam-Level: X-Spam-Status: No, score=-0.1 tagged_above=-999 required=5 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_NONE=-0.0001] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id I3ogT9vhdb64 for ; Mon, 14 Jul 2014 10:52:14 -0700 (PDT) Received: from qmta02.emeryville.ca.mail.comcast.net (qmta02.emeryville.ca.mail.comcast.net [76.96.30.24]) by olra.theworths.org (Postfix) with ESMTP id F2B34431FBC for ; Mon, 14 Jul 2014 10:52:13 -0700 (PDT) Received: from omta10.emeryville.ca.mail.comcast.net ([76.96.30.28]) by qmta02.emeryville.ca.mail.comcast.net with comcast id SFAh1o0040cQ2SLA2HsDrT; Mon, 14 Jul 2014 17:52:13 +0000 Received: from odin.tremily.us ([24.18.63.50]) by omta10.emeryville.ca.mail.comcast.net with comcast id SHsC1o00B152l3L8WHsCK2; Mon, 14 Jul 2014 17:52:13 +0000 Received: by odin.tremily.us (Postfix, from userid 1000) id 23064128C384; Mon, 14 Jul 2014 10:52:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tremily.us; s=odin; t=1405360332; bh=VC+Uml0P4C1slEfmDGiCJHalqmC08etejlV9uq4XJIo=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=dufMYU0jc4ic2nVutANaK1JVW89lL9qejvZqo/DTkeSsrmQLDeZsbOI5+2+b/GsZG VkXxm3ghRrQssDpPyWPJ7uPlJlcHod5tDlA2H1l4Rsj/n6E7/PdK+ZGqkB2Aa0cE79 u9HXHvw2Syxi2PIlfmnixchMTVNiuy8wzpjvVT3c= Date: Mon, 14 Jul 2014 10:52:12 -0700 From: "W. Trevor King" To: David Bremner Subject: Re: [PATCH 2/2] nmbug-status: Use 'show-ref --heads' for loading configs Message-ID: <20140714175211.GF23983@odin.tremily.us> References: <7ddcf7368895768aa0a2d37dac0d4f96e9666f16.1399749244.git.wking@tremily.us> <87tx6lfnjz.fsf@maritornes.cs.unb.ca> <20140713181339.GB23983@odin.tremily.us> <87pph8b751.fsf@maritornes.cs.unb.ca> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="wtjvnLv0o8UUzur2" Content-Disposition: inline In-Reply-To: <87pph8b751.fsf@maritornes.cs.unb.ca> OpenPGP: id=39A2F3FA2AB17E5D8764F388FC29BDCDF15F5BE8; url=http://tremily.us/pubkey.txt User-Agent: Mutt/1.5.23 (2014-03-12) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net; s=q20140121; t=1405360333; bh=C7TwcCkcQkwlHmEiO3iYu+O3BFktf+WC4SkgGY5tacE=; h=Received:Received:Received:Date:From:To:Subject:Message-ID: MIME-Version:Content-Type; b=Yuy7wSTy1WqtgQ2Ms6jwqPo8Rxyuf+n8xid6VabLh9k5XYKE1WglY3tfJD4huCje/ fTDP9YIkRVFiox/cxtBVeOGNCiTCsTR8dO9d6JOTgNFZQo/NX/UjaXKn4E5jYBASwH qdJtz6THe5EnsS403ioBEudWd2XBT9erA2KB9Sjm3VYXVRm8QN3nVuP+AG4A0MHbOS kwsjcTWkutS6ze4KtbDMiFXd6oorlJHWDSQLZ7YPrBZBWROfofe3TgXEWCp0Y9+7QY ZhSxfC9/oahPoPyxTBobiH9z4TZzC7XDFiWCShRWJo6lWFJnCei9FqkRKueStRDL0x vgUAKLU+Ay/qQ== Cc: notmuch@notmuchmail.org X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Jul 2014 17:52:22 -0000 --wtjvnLv0o8UUzur2 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jul 14, 2014 at 06:51:22AM -0300, David Bremner wrote: > W. Trevor King writes: > > On Sun, Jul 13, 2014 at 09:30:56AM -0300, David Bremner wrote: > >> I consider it a useful feature that it works without the user > >> configuring a local branch. I agree that in more complex setups > >> this ambiguity is not as nice, but I'd rather it was only the > >> minority of users with unusual setups (e.g. multiple remotes) > >> have to do configuration. > > > > I could work up a patch that tried =E2=80=98git show-ref -s config=E2= =80=99 first, > > and only fell back to =E2=80=98show-ref -s --heads=E2=80=99 if there we= re multiple > > matches. That way folks with only origin/config wouldn't need a > > local branch, but folks with multiple config-carrying remotes (or > > a single config-carrying remote and a local branch) would have to > > have a local config to break the tie. That's possible, and not > > *too* complicated, but I personally prefer the consistency of just > > requiring a local config branch. > > It might be simpler to implement (and understand) to try first the > local config branch and then fall back to "origin/config". I'd rather avoid hard-coding an upstream name here. We do hard-code =E2=80=98origin=E2=80=99 as the default remote for =E2=80=98fetch=E2=80=99,= =E2=80=98pull=E2=80=99, and =E2=80=98push=E2=80=99. I'd rather drop those in favor of the configured Git defaults (for example, running a bare =E2=80=98git fetch=E2=80=99 if the user doesn't spe= cify a remote). For most configurations, falling back to =E2=80=9CIs =E2=80=98git= show-ref -s config=E2=80=99 a unique hash?=E2=80=9D should be equivalent to hard-cod= ing =E2=80=98git show-ref -s origin/config=E2=80=99. Cheers, Trevor --=20 This email may be signed or encrypted with GnuPG (http://www.gnupg.org). For more information, see http://en.wikipedia.org/wiki/Pretty_Good_Privacy --wtjvnLv0o8UUzur2 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBAgAGBQJTxBjFAAoJEG8/JgBt8ol8PmIQAIZm0ukpY20SKwS+SEBnn3Nj ue+mHlzd1tyEeumvqSJzkFZ8yHeXA6ODCDjXhxEy+bgp52SeJoHURYwEFplKmtTt WGbYZCq36luDcrp4gBjCqMKVDwwGg43jTZcac4TDxp8+/69i6RTfUyJrg38UCL+N /YSjfDDBgCX/AmU0Z0/JszUCKP8yPN8wrS1irqRxx3JRSUt8zQi72Tmwk3UjfcP6 ZkaxDAKofVA9Oaw0Wv5+FvpOdgSCYGoBgFsHh4zFrJX+e5GLWUzWb7p0pHKeusar qMxpEB0Q0/EVZHu66WFUnvXcYNXin7sK4zAuBGt6HYnKblxDq52ILxDgPSAzPLPS XjyHsgNRYh+F5IWAZTzAD0QgdKusH5eJ5BTUMD11pSx6vwISdJI2O/hsZqNrDxF+ GJl3wTtV7FW6Jk4dDd7miSs2sP3b4eJkRpxoD1GzJmaOhlYHHsnf7Vp9qMw+oKva ewcxL/e2xiz9tVA045PfMTCEuF7BbuwhX4AJ4gduDGNpmeYTh0pd8g7xU/qcD3pW xUSK6X9f/VhHU+eJXVH5eRjhebd90KEqa8oli/0STlcIayXAmkTOxRC8VYp8ccc+ j/Knf6xFZaNf1fuq89CaXhBtqgcyBIedQZXCLAxB15KKshcLYfSjQnq2ib/fbB7S 9Y7cSZFaYt5Oi2XKti49 =AqC+ -----END PGP SIGNATURE----- --wtjvnLv0o8UUzur2--