Skip to content

Commit abc03c0

Browse files
committed
Tweaking this a bit and adding more options for specifying configuration file via: - command line option "--config <path>" - environment variable GIT_NOTIFIER_CONFIG
2 parents f73dd62 + 38e38b7 commit abc03c0

7 files changed

+210
-68
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
.*.sw?
12
test-repo.git
23
*.tar.gz
34
README.html

CHANGES

+21
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,25 @@
11

2+
0.6-22 | 2015-06-19 17:35:36 -0700
3+
4+
* Added a configuration option "gitbasedir" for specifying the base
5+
directory in the file system that holds the git repository. (Jed
6+
Liu)
7+
8+
* Support the following substitutions in user-specified
9+
repositories: '%u' for username, '%h' for hostname, '%r' for repo
10+
name. (Jed Liu)
11+
12+
* Ignore vim swap files. (Jed Liu)
13+
14+
* Abstracted the functionality for obtaining the repository name.
15+
(Jed Liu)
16+
17+
* Added configuration file support. See the README for specifics.
18+
(Jed Liu/Robin Sommer)
19+
20+
* Use email package to better ensure RFC-compliance, and to better
21+
automate QP encoding of message bodies. (Jed Liu)
22+
223
0.6-11 | 2015-05-17 03:05:08 -0700
324

425
* New option --update-only for github-notifier. This only updates

README.rst

+29-5
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
.. |date| date::
44

55
.. Version number is filled in automatically.
6-
.. |version| replace:: 0.6-11
6+
.. |version| replace:: 0.6-22
77

88
git-notifier
99
============
@@ -124,10 +124,30 @@ option below.
124124
Usage
125125
-----
126126

127-
``git-notifier`` supports the options below. Alternatively to
128-
giving them on the command line, all of them can alse be set via
129-
``git config hooks.<option>``. For example, to set a recipient
130-
address, do ``git config hooks.mailinglist [email protected]``:
127+
``git-notifier`` supports the options below. Options can be either set
128+
on the command line, by editing a configuration file, or on a
129+
per-repository basis via ``git config hooks.<option>`` (this order
130+
also defines the priority when the same option appears multiple
131+
times). For example, to set a recipient address, do ``git config
132+
hooks.mailinglist [email protected]``:
133+
134+
``git-notifier`` looks for a configuration file in three places, in
135+
this order:
136+
137+
* A configuration file can be specified on the command line
138+
through ``--config <path>``.
139+
140+
* A configuration file can be specified by setting the environment
141+
variable ``GIT_NOTIFIER_CONFIG`` to the path of the file.
142+
143+
* If neither of these is given, ``git-notifier`` looks for a file
144+
``git-notifier.conf`` in the same directory that the script itself
145+
is located.
146+
147+
The configuration file uses "INI-style", with an example coming with
148+
``git-notifier``.
149+
150+
The options are:
131151

132152
``--allchanges <branches>``
133153
Lists branches for which *all* changes made to them should be
@@ -178,6 +198,10 @@ address, do ``git config hooks.mailinglist [email protected]``:
178198
option is compatible with some of other git notification
179199
scripts.
180200

201+
``--gitbasedir"``
202+
Specifies a base directory for the git repository. If not given,
203+
the current directory is the default.
204+
181205
``--hostname <name>``
182206
Defines the hostname to use when building the repository
183207
path shown in the notification mails. Default is the

VERSION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.6-11
1+
0.6-22

0 commit comments

Comments
 (0)