Add --expand to 'git notes get-ref'
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest2 patches 8 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | notes get-ref: --expand expands the output notes ref.Documentation/ builtin/ t/ | +34 | 5 replies | |
| 2/2 | notes: don't alter refs starting with 'refs/' in expand_notes_refnotes.c t/ | +5 | 0 replies |
Reviews trailers per patch
1 of 2 patches has a Reviewed-by or Acked-by.
| Patch | Johan Herland |
|---|---|
| 1/2 | A-b |
| 2/2 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH 0/2] Add --expand to 'git notes get-ref'
From: "W. Trevor King" <[email protected]>
I was recently confused when
$ git notes merge -v refs/remotes/origin/notes/commits
failed to do (or print) anything. It turns out that note refs must live under 'refs/notes/', so my command line ref was expanding to
refs/notes/refs/remotes/origin/notes/commits
which wasn't matching anything.
The first of my commits here adds the '--expand' option, so you can see how Git is expanding your ref internally:
$ GIT_NOTES_REF=commits git notes get-ref --expand refs/notes/commits
The second commit makes the expansion less strict about the location of note refs. In his initial mail introducing 'git notes', Johan says that note refs should live under 'refs/notes' [1]. This seems like a good place for local notes, but note refs from remote repos should probably live somewhere else (e.g. 'refs/remote-notes/' or 'refs/remotes/<name>/notes/'. In the initial thread there are a few messages talking about looking up reverse mappings under 'refs/notes/', but this seems to all have been before the 'refs/notes/<namespace>/' stage. If I'm missing a good reason to keep everything under 'refs/notes/', feel free to ignore the second patch.
Cheers,
Trevor
[1]: http://permalink.gmane.org/gmane.comp.version-control.git/48540
W. Trevor King (2):
notes get-ref: --expand expands the output notes ref.
notes: don't alter refs starting with 'refs/' in expand_notes_ref
Documentation/git-notes.txt | 6 +++++- builtin/notes.c | 26 +++++++++++++++++++++----- notes.c | 2 +- t/t3301-notes.sh | 12 ++++++++++++ 4 files changed, 39 insertions(+), 7 deletions(-)
Signature · 1 line
1.7.12.176.g3fc0e4c.dirty