Re: Git Notes - Search Functionality
- From
Thomas Rast <trast@student.ethz.ch>
- Date
- Feb 27, 2013, 15:57 UTC
- Message-ID
- <874ngxagw5.fsf@pctrast.inf.ethz.ch>
- In-Reply-To
- <CAFZnXLJCiq4G+_ZStWmjAGePWCD6mhske7Y4=oe2h==F0BYVLQ@mail.gmail.com>
krishna chaitanya kurnala <kkc4al@gmail.com> writes:
Show 10 quoted lines
> I working on Git Notes. I want to know if there is an easy way to > obtain a list of all "namespaces"(For eg., git notes --ref=namespace > ... ) with notes objects in a specific git repository. We can easily > create, edit, merge git notes with commands if we know the namespaces > and/or the sha. But, for example, Has anyone tried to search for a > string in a git notes objects for that project etc? > The closest i can think of is using some options with git logs, for > example, git log --show-notes=* --format="%H %N" etc. > > Appreciate your time.
An easy way to list everything in refs/notes/ is
git for-each-ref refs/notes/
but that of course won't figure out if you have more notes e.g. in refs/remotes/origin/notes/* or some such. I think this more general problem can be solved only by heuristics, since the notes trees are actually "just trees" -- the only distinction is that they have fairly funny filenames in them.
--
Thomas Rast
trast@{inf,student}.ethz.ch