RFC several notes refs, post-rewrite, notes rewriting
Get series with b4
b4 am [email protected]Versions newest first
- v3 RFC Latest12 patches 7 repliesIn review
Patches in v3 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/12 | Support showing notes from more than one notes treeDocumentation/ notes.c notes.h +5 more | +181 | 1 reply | |
| 2/12 | Documentation: document post-rewrite hookDocumentation/ | +36 | 0 replies | |
| 3/12 | commit --amend: invoke post-rewrite hookbuiltin-commit.c git-rebase--interactive.sh t/ | +96 | 1 reply | |
| 4/12 | rebase: invoke post-rewrite hookgit-am.sh git-rebase.sh t/ | +45 | 0 replies | |
| 5/12 | rebase -i: invoke post-rewrite hookgit-rebase--interactive.sh t/ | +117 | 0 replies | |
| 6/12 | notes: implement 'git notes copy --stdin'Documentation/ builtin-notes.c notes.c +2 more | +129 | 1 reply | |
| 7/12 | notes: implement helpers needed for note copying during rewriteDocumentation/ Documentation/ Documentation/ +3 more | +277 | 1 reply | |
| 8/12 | rebase: support automatic notes copyinggit-am.sh git-rebase--interactive.sh git-rebase.sh +2 more | +37 | 0 replies | |
| 9/12 | commit --amend: copy notes to the new commitbuiltin-commit.c t/ | +18 | 0 replies | |
| 10/12 | filter-branch: invoke post-rewrite hookDocumentation/ git-filter-branch.sh t/ | +55 | 0 replies | |
| 11/12 | filter-branch: learn how to filter notesDocumentation/ Documentation/ Documentation/ +2 more | +62 | 0 replies | |
| 12/12 | notes: add shorthand --ref to override GIT_NOTES_REFDocumentation/ builtin-notes.c | +10 | 0 replies |
Reviews trailers per patch
None of the 12 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.
| Patch | Johan Herland |
|---|---|
| Series | A-b A-b A-b A-b A-b A-b A-b A-b A-b A-b A-b A-b A-b A-b |
| 1/12 | |
| 2/12 | |
| 3/12 | |
| 4/12 | |
| 5/12 | |
| 6/12 | |
| 7/12 | |
| 8/12 | |
| 9/12 | |
| 10/12 | |
| 11/12 | |
| 12/12 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [RFC PATCH v3 00/12] several notes refs, post-rewrite, notes rewriting
Quoted 1 line
I'm running out of git time today
I should repeat that incantation more often, it mysteriously freed up more time.
Brief overview of changes since v2, with some inline questions about things that need to be settled:
* new [1/12] "Support showing notes from more than one notes tree" that teaches a "notes.displayRef" option which can glob for notes that should be shown, and can be specified more than once.
- maybe we should default this to "refs/notes/*"?
- currently git-notes and the configs don't agree on what is a valid notes ref. git-notes refuses even *showing* outside of refs/notes/. I tend towards changing git-notes at least as far as reading notes is concerned (show/list), so that remote notes work.
* dropped [5/11] "notes: clean up t3301" as per Junio's comments
* changed [7/12] "notes: implement helpers needed for note copying during rewrite" to support "notes.rewriteRef" as announced earlier. "notes.rewrite.<cmd>" now default to true, so that you only need to enable one, namely set notes.rewriteRef = refs/notes/*.
- do we want a default?
- do we want the rewriteRefs to also implicitly be displayRefs?
- the "notes.rewriteMode = overwrite for notes/volatile/*" hinted at earlier is missing. Does anyone need that?
* new [12/12] "notes: add shorthand --ref to override GIT_NOTES_REF"
I haven't changed [10/12] & [11/12] "filter-branch..." yet, as I'm not really sure what the best format of such a filter would be.
The existing code is probably a neat way of editing the notes, but it creates a new commit to the notes ref for every rewritten commit. If I change the default --notes-filter to cope with multi-rewriting, this means a new notes commit per rewritten commit. Seems rather wasteful just to salvage your notes across an otherwise unrelated filter-branch.
So the obvious fix would seem to be a --post-rewrite addition that just pipes through 'git notes copy --for-rewrite=filter-branch', but that's again not very customizable short of reinventing the whole thing. Any ideas?
Thomas Rast (12):
Support showing notes from more than one notes tree
Documentation: document post-rewrite hook
commit --amend: invoke post-rewrite hook
rebase: invoke post-rewrite hook
rebase -i: invoke post-rewrite hook
notes: implement 'git notes copy --stdin'
notes: implement helpers needed for note copying during rewrite
rebase: support automatic notes copying
commit --amend: copy notes to the new commit
filter-branch: invoke post-rewrite hook
filter-branch: learn how to filter notes
notes: add shorthand --ref to override GIT_NOTES_REF
Documentation/config.txt | 40 +++++++- Documentation/git-filter-branch.txt | 20 +++- Documentation/git-notes.txt | 20 +++- Documentation/githooks.txt | 40 +++++++ builtin-commit.c | 49 ++++++++ builtin-notes.c | 168 +++++++++++++++++++++++++++- builtin.h | 16 +++ git-am.sh | 13 ++ git-filter-branch.sh | 37 ++++++ git-rebase--interactive.sh | 45 +++++++- git-rebase.sh | 6 + notes.c | 125 +++++++++++++++++++- notes.h | 16 +++ pretty.c | 6 +- refs.c | 4 +- refs.h | 5 + t/t3301-notes.sh | 213 ++++++++++++++++++++++++++++++++-- t/t3306-notes-prune.sh | 6 +- t/t3400-rebase.sh | 17 +++ t/t3404-rebase-interactive.sh | 11 ++ t/t5407-post-rewrite-hook.sh | 188 ++++++++++++++++++++++++++++++ t/t7003-filter-branch.sh | 22 ++++ t/t7501-commit.sh | 12 ++ 23 files changed, 1046 insertions(+), 33 deletions(-) create mode 100755 t/t5407-post-rewrite-hook.sh