From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21724 invoked by alias); 9 Apr 2013 20:37:17 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 31248 Received: (qmail 3220 invoked from network); 9 Apr 2013 20:37:15 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-3.3 required=5.0 tests=BAYES_00,DKIM_ADSP_ALL, DKIM_SIGNED,RCVD_IN_DNSWL_MED,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham version=3.3.2 Received-SPF: none (ns1.primenet.com.au: domain at spodhuis.org does not designate permitted sender hosts) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=spodhuis.org; s=d201210; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date; bh=KOmUcvB2kkpuAqPz7m4rmdiSDlSOfzwr4mEg96+DY3s=; b=YXTnMVcCLPRwJ2RFnw9xESN429OuOkEo29nJfGSmji5GTYlrEg4emyTiM0SLMbLl03rB7SdzeCeWrHgQX5kZg+5D9MPLCZXfZ6s8oy/OHpHufu2vtifgDUDVjzktTKGVUU1qFr8m+cLlEWGOCWZs7FlcQ2AGWpOxanT88iPS32w=; Date: Tue, 9 Apr 2013 16:18:52 -0400 From: Phil Pennock To: Simon Ruderich Cc: zsh-workers@zsh.org Subject: Re: version.h and ChangeLog Message-ID: <20130409201852.GA58314@redoubt.spodhuis.org> Mail-Followup-To: Simon Ruderich , zsh-workers@zsh.org References: <130407103829.ZM487@torch.brasslantern.com> <20130407192324.5bde3a2b@pws-pc.ntlworld.com> <87bo9pnr1n.fsf@ft.bewatermyfriend.org> <20130408203413.43e20021@pws-pc.ntlworld.com> <20130408220207.4c02af51@pws-pc.ntlworld.com> <20130409164722.GA24778@ruderich.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-ripemd160; protocol="application/pgp-signature"; boundary="k1lZvvs/B4yU6o8G" Content-Disposition: inline In-Reply-To: <20130409164722.GA24778@ruderich.org> --k1lZvvs/B4yU6o8G Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On 2013-04-09 at 18:47 +0200, Simon Ruderich wrote: > Appending something like "-local-" is difficult because > what's considered local depends on how Git is used. We could > check "origin"/master but what if I call the remote branch > "upstream"? At some point, the onus of work shifts to the person who is violating convention. I mean, I might have used stty to remap intr to ^R. Most tools are entitled to assume that intr is ^C without bothering to check. Still, robust tooling might support the unusual. My normal approach here is to use a variable which can be overriden from the environment: : ${ZSH_GIT_ORIGIN_REMOTENAME:=origin} Then if someone really wants to work with a different name, for another tooling environment, they can `export ZSH_GIT_ORIGIN_REMOTENAME=upstream` A more git-like approach is be to stash the config in a zsh section of the git config, so that it can be set on a per-repo basis or "globally" if needed for an environment. This might be more to taste, avoiding 25-character environment variable names? % git config zsh.master origin % git config --get-regexp zsh\..+ zsh.master origin % git config --get zsh.master origin % tail -2 .git/config [zsh] master = origin % Since this config is not sync'd from any remote, it's entirely available for local overrides. -Phil --k1lZvvs/B4yU6o8G Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- iEYEAREDAAYFAlFkd6QACgkQQDBDFTkDY3/g1wCdFIVIxcpBHwc6nWItGpsBb2E5 Ch8AniTDXs34UVbrcPYe28KfogUfMrZI =iC3v -----END PGP SIGNATURE----- --k1lZvvs/B4yU6o8G--