From: Peter Rabbitson Date: Tue, 19 Jan 2016 21:08:10 +0000 (+0100) Subject: Add the repository-specific git config include (git >= 1.7.10) X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=1f99022a59628403ab2db026216ed890f55b8d90;p=dbsrgits%2FDBIx-Class-Historic.git Add the repository-specific git config include (git >= 1.7.10) !!! NOTE - potential security RISK !!! You *MUST* - check the file is legit: git diff 7eb1f0e165a4 maint/git_config_dbic.inc - copy the file to your .git directory: cp maint/git_config_dbic.inc .git/ - and include it: git config --add include.path git_config_dbic.inc **NEVER** include the file directly from the repository itself, e.g. [include] path = ../maint/git_config_dbic.inc !!! NOTE - potential security RISK !!! Adds extra maint-specific repositories, and defines two gitk shortcuts: `git vis` - showing all current heads/stashes of interest in progress `git prvis` - showing all unattended to github PRs --- diff --git a/maint/git_config_dbic.inc b/maint/git_config_dbic.inc new file mode 100644 index 0000000..7eb1f0e --- /dev/null +++ b/maint/git_config_dbic.inc @@ -0,0 +1,44 @@ +[remote "ghpr"] + url = https://github.com/dbsrgits/DBIx-Class + pushurl = DISALLOWED + fetch = +refs/pull/*/head:refs/remotes/ghpr/* + +[remote "historic"] + url = git://git.shadowcat.co.uk/dbsrgits/DBIx-Class-Historic.git + pushurl = ssh://dbsrgits@git.shadowcat.co.uk/DBIx-Class-Historic.git + fetch = +refs/heads/*:refs/remotes/historic/* + +[remote "debian"] + url = git://anonscm.debian.org/pkg-perl/packages/libdbix-class-perl.git + pushurl = DISALLOWED + fetch = +refs/heads/master:refs/remotes/debian/master + tagopt = --no-tags + +[alias] + # Lines after gitk in order: + # + # --exclude all refs matching the for loop + # all known refs (branches/tags) excepth what we excluded + # add all individual stashes + # add all github PR heads without a matching historic/ghpr/* entry + # + # the /bin/true at the end is there to eat away any args to 'vis' + # ( otherwise they will be treated as commands to execute after the & ) + vis = "!gitk \ + $( for r in historic/ghpr ghpr debian ; do echo "--exclude=refs/remotes/$r/*" ; done ) \ + --all \ + $(git stash list | cut -f 1 -d ':') \ + $(/bin/bash -c \"/usr/bin/comm -23 \ + <(git for-each-ref --sort=objectname --format='%(objectname:short)' refs/remotes/ghpr/ ) \ + <(git for-each-ref --sort=objectname --format='%(objectname:short)' refs/remotes/historic/ghpr/ refs/remotes/origin/ ) \ + \") \ + \"$@\" & /bin/true" + + + # same but only for GitHub PRs + prvis = "!gitk \ + $(/bin/bash -c \"/usr/bin/comm -23 \ + <(git for-each-ref --sort=objectname --format='%(objectname:short)' refs/remotes/ghpr/ ) \ + <(git for-each-ref --sort=objectname --format='%(objectname:short)' refs/remotes/historic/ghpr/ refs/remotes/origin/ ) \ + \") \ + \"$@\" & /bin/true"