Re: [PATCH 2/2] nmbug-status: Use 'show-ref --heads' for loading configs
authorW. Trevor King <wking@tremily.us>
Mon, 14 Jul 2014 17:52:12 +0000 (10:52 +1700)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 18:03:37 +0000 (10:03 -0800)
e1/3aff0f0d03c7c0e8e3513faa24db5cd46050d6 [new file with mode: 0644]

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