|
0 |
gbp clone
|
|
1 |
---------
|
0 | 2 |
|
1 | |
git-tuneclone.sh
|
2 | |
----------------
|
|
3 |
Starting with gbp>0.8.1, here's an simple way to automatically fine-tune the
|
|
4 |
repository in the following ways:
|
|
5 |
- make git ignore any .pc/ directory (created by quilt)
|
|
6 |
- enable the "--follow-tags" when running 'git-push', so it's harder
|
|
7 |
to forget to push packaging tags along with the branches.
|
3 | 8 |
|
4 | |
This package comes with a script 'debian/git-tuneclone.sh'.
|
5 | |
Running it after a fresh clone of the packaging repository
|
6 | |
will fine-tune your local copy, namely:
|
7 | |
- make git ignore any .pc/ directory (created by quilt)
|
8 | |
- enable the "-follow-tags" when running 'git-push', so it's harder
|
9 | |
to forget to push packaging tags along with the branches.
|
10 | |
- do an initial checkout of the 3 packaging branches (master, pristine-tar,
|
11 | |
upstream)
|
12 | |
The script only needs to run once (though running it multiple times shouldn't
|
13 | |
matter).
|
14 | |
You are of course free to *not* run the script, if you prefer.
|
|
9 |
To enable this for ALL repositories cloned via 'gbp' (in the future), do
|
|
10 |
something like the following:
|
15 | 11 |
|
16 | |
-- IOhannes m zmölnig (Debian/GNU) <umlaeute@debian.org> Tue, 11 Nov 2015 11:11:03 +0100
|
|
12 |
~~~
|
|
13 |
$ mkdir -p ~/bin
|
|
14 |
$ cat >> ~/bin/gbphook-postclone <<EOF
|
|
15 |
#!/bin/sh
|
|
16 |
## script to initialize a cloned repository
|
17 | 17 |
|
|
18 |
# - enable the "--follow-tags" mode for pushing
|
|
19 |
echo "tuning git-repository for ${NAME}"
|
|
20 |
git config push.followTags true && echo "enabled push.followTags"
|
|
21 |
|
|
22 |
# - ignore quilt's .pc/ directory
|
|
23 |
GITEXCLUDE=".git/info/exclude"
|
|
24 |
egrep "^/?\.pc/?$" "${GITEXCLUDE}" >/dev/null 2>&1 \
|
|
25 |
|| (echo "/.pc/" >> "${GITEXCLUDE}" && echo "ignoring /.pc/")
|
|
26 |
EOF
|
|
27 |
|
|
28 |
$ chmod u+x ~/bin/gbphook-postclone
|
|
29 |
$ cat >> ~/.gbp.conf <<EOF
|
|
30 |
[clone]
|
|
31 |
postclone = ~/bin/gbphook-postclone
|
|
32 |
EOF
|
|
33 |
|
|
34 |
$ gbp clone ...
|
|
35 |
~~~
|
|
36 |
|
|
37 |
-- IOhannes m zmölnig (Debian/GNU) <umlaeute@debian.org> Mon, 1 Aug 2016 12:15:50 +0200
|