Skip to content

Commit 1f99022

Browse files
committed
Add the repository-specific git config include (git >= 1.7.10)
!!! NOTE - potential security RISK !!! You *MUST* - check the file is legit: git diff 7eb1f0e 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
1 parent 7a96e0d commit 1f99022

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

maint/git_config_dbic.inc

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
[remote "ghpr"]
2+
url = https://github.com/dbsrgits/DBIx-Class
3+
pushurl = DISALLOWED
4+
fetch = +refs/pull/*/head:refs/remotes/ghpr/*
5+
6+
[remote "historic"]
7+
url = git://git.shadowcat.co.uk/dbsrgits/DBIx-Class-Historic.git
8+
pushurl = ssh://dbsrgits@git.shadowcat.co.uk/DBIx-Class-Historic.git
9+
fetch = +refs/heads/*:refs/remotes/historic/*
10+
11+
[remote "debian"]
12+
url = git://anonscm.debian.org/pkg-perl/packages/libdbix-class-perl.git
13+
pushurl = DISALLOWED
14+
fetch = +refs/heads/master:refs/remotes/debian/master
15+
tagopt = --no-tags
16+
17+
[alias]
18+
# Lines after gitk in order:
19+
#
20+
# --exclude all refs matching the for loop
21+
# all known refs (branches/tags) excepth what we excluded
22+
# add all individual stashes
23+
# add all github PR heads without a matching historic/ghpr/* entry
24+
#
25+
# the /bin/true at the end is there to eat away any args to 'vis'
26+
# ( otherwise they will be treated as commands to execute after the & )
27+
vis = "!gitk \
28+
$( for r in historic/ghpr ghpr debian ; do echo "--exclude=refs/remotes/$r/*" ; done ) \
29+
--all \
30+
$(git stash list | cut -f 1 -d ':') \
31+
$(/bin/bash -c \"/usr/bin/comm -23 \
32+
<(git for-each-ref --sort=objectname --format='%(objectname:short)' refs/remotes/ghpr/ ) \
33+
<(git for-each-ref --sort=objectname --format='%(objectname:short)' refs/remotes/historic/ghpr/ refs/remotes/origin/ ) \
34+
\") \
35+
\"$@\" & /bin/true"
36+
37+
38+
# same but only for GitHub PRs
39+
prvis = "!gitk \
40+
$(/bin/bash -c \"/usr/bin/comm -23 \
41+
<(git for-each-ref --sort=objectname --format='%(objectname:short)' refs/remotes/ghpr/ ) \
42+
<(git for-each-ref --sort=objectname --format='%(objectname:short)' refs/remotes/historic/ghpr/ refs/remotes/origin/ ) \
43+
\") \
44+
\"$@\" & /bin/true"

0 commit comments

Comments
 (0)