Skip to content

Commit 325772f

Browse files
committed
Merge branch 'tb/notes-amlog-doc'
Document "amlog" notes. * tb/notes-amlog-doc: Documentation: mention the amlog in howto/maintain-git.txt
2 parents 5575c71 + ddfb5bc commit 325772f

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

Documentation/howto/maintain-git.txt

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,13 @@ Note that before v1.9.0 release, the version numbers used to be
137137
structured slightly differently. vX.Y.Z were feature releases while
138138
vX.Y.Z.W were maintenance releases for vX.Y.Z.
139139

140+
Because most of the lines of code in Git are written by individual
141+
contributors, and contributions come in the form of e-mailed patches
142+
published on the mailing list, the project maintains a mapping from
143+
individual commits to the Message-Id of the e-mail that resulted in
144+
the commit, to help tracking the origin of the changes. The notes
145+
in "refs/notes/amlog" are used for this purpose, and are published
146+
along with the broken-out branches to the maintainer's repository.
140147

141148
A Typical Git Day
142149
-----------------
@@ -180,6 +187,43 @@ by doing the following:
180187
In practice, almost no patch directly goes to 'master' or
181188
'maint'.
182189

190+
Applying the e-mailed patches using "git am" automatically records
191+
the mappings from 'Message-Id' to the applied commit in the "amlog"
192+
notes. Periodically check that this is working with "git show -s
193+
--notes=amlog $commit".
194+
195+
This mapping is maintained with the aid of the "post-applypatch"
196+
hook found in the 'todo' branch. That hook should be installed
197+
before applying patches. It is also helpful to carry forward any
198+
relevant amlog entries when rebasing, so the following config may
199+
be useful:
200+
201+
[notes]
202+
rewriteRef = refs/notes/amlog
203+
204+
Avoid "cherry-pick", as it does not propagate notes by design. Use
205+
either "git commit --amend" or "git rebase" to make corrections to
206+
an existing commit, even for a single-patch topic.
207+
208+
Make sure that a push refspec for 'refs/notes/amlog' is in the
209+
remote configuration for publishing repositories. A few sample
210+
configurations look like the following:
211+
212+
[remote "github"]
213+
url = https://github.com/gitster/git
214+
pushurl = github.com:gitster/git.git
215+
mirror
216+
217+
[remote "github2"]
218+
url = https://github.com/git/git
219+
fetch = +refs/heads/*:refs/remotes/github2/*
220+
pushurl = github.com:git/git.git
221+
push = refs/heads/maint:refs/heads/maint
222+
push = refs/heads/master:refs/heads/master
223+
push = refs/heads/next:refs/heads/next
224+
push = +refs/heads/seen:refs/heads/seen
225+
push = +refs/notes/amlog
226+
183227
- Review the last issue of "What's cooking" message, review the
184228
topics ready for merging (topic->master and topic->maint). Use
185229
"Meta/cook -w" script (where Meta/ contains a checkout of the

0 commit comments

Comments
 (0)