<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/notes.h, branch v1.7.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v1.7.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v1.7.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2010-06-25T18:45:27Z</updated>
<entry>
<title>Merge branch 'maint'</title>
<updated>2010-06-25T18:45:27Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2010-06-25T18:45:27Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=f526d120f649ec4426b559e94e09655b5a4f2b87'/>
<id>urn:sha1:f526d120f649ec4426b559e94e09655b5a4f2b87</id>
<content type='text'>
* maint:
  msvc: Fix some compiler warnings
  Documentation: grep: fix asciidoc problem with --
  msvc: Fix some "expr evaluates to function" compiler warnings
</content>
</entry>
<entry>
<title>msvc: Fix some "expr evaluates to function" compiler warnings</title>
<updated>2010-06-24T16:42:12Z</updated>
<author>
<name>Ramsay Jones</name>
<email>ramsay@ramsay1.demon.co.uk</email>
</author>
<published>2010-06-23T19:40:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=4e0d7a80186c27f1a008dd10eaea6f25b0e1fe19'/>
<id>urn:sha1:4e0d7a80186c27f1a008dd10eaea6f25b0e1fe19</id>
<content type='text'>
In particular, the following warning is issued while compiling
notes.c:

    notes.c(927) : warning C4550: expression evaluates to a \
function which is missing an argument list

along with identical warnings on lines 928, 1016 and 1017.

In order to suppress the warning, we change the definition of
combine_notes_fn, so that the symbol type is an (explicit)
"pointer to function ...".  As a result, several other
declarations need some minor fix-up to take account of the
new typedef.

Signed-off-by: Ramsay Jones &lt;ramsay@ramsay1.demon.co.uk&gt;
Acked-by: Johan Herland &lt;johan@herland.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>notes: dry-run and verbose options for prune</title>
<updated>2010-05-20T06:57:18Z</updated>
<author>
<name>Michael J Gruber</name>
<email>git@drmicha.warpmail.net</email>
</author>
<published>2010-05-14T21:42:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=a9f2adff802308481f2e638bae0c5b6e205251a3'/>
<id>urn:sha1:a9f2adff802308481f2e638bae0c5b6e205251a3</id>
<content type='text'>
Introduce -n and -v options for "git notes prune" in complete analogy to
"git prune" so that one can check for dangling notes easily.

The output is a list of names of objects whose notes would be resp.
are removed so that one can check the object ("git show sha1") as well as
the note ("git notes show sha1").

Signed-off-by: Michael J Gruber &lt;git@drmicha.warpmail.net&gt;
Acked-by: Johan Herland &lt;johan@herland.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>notes.h: declare bit field as unsigned to silence compiler complaints</title>
<updated>2010-04-07T04:55:50Z</updated>
<author>
<name>Brandon Casey</name>
<email>drafnel@gmail.com</email>
</author>
<published>2010-04-06T15:11:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=a751b5cc96c87be3b794a9e24c2beb7a8740c645'/>
<id>urn:sha1:a751b5cc96c87be3b794a9e24c2beb7a8740c645</id>
<content type='text'>
The IRIX MIPSPro compiler complains like this:

   cc-1107 c99: WARNING File = notes.h, Line = 215
     A signed bit field has a length of 1 bit.

           int suppress_default_notes:1;
               ^

'unsigned' is what was intended, so lets make it so.

Signed-off-by: Brandon Casey &lt;casey@nrlssc.navy.mil&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>notes: track whether notes_trees were changed at all</title>
<updated>2010-03-13T05:55:40Z</updated>
<author>
<name>Thomas Rast</name>
<email>trast@student.ethz.ch</email>
</author>
<published>2010-03-12T17:04:36Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=7f710ea98262c7d81006c16c727796d9e6aeaa81'/>
<id>urn:sha1:7f710ea98262c7d81006c16c727796d9e6aeaa81</id>
<content type='text'>
Currently, the notes copying is a bit wasteful since it always creates
new trees, even if no notes were copied at all.

Teach add_note() and remove_note() to flag the affected notes tree as
changed ('dirty').  Then teach builtin/notes.c to use this knowledge
and avoid committing trees that weren't changed.

Signed-off-by: Thomas Rast &lt;trast@student.ethz.ch&gt;
Acked-by: Johan Herland &lt;johan@herland.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>notes: implement 'git notes copy --stdin'</title>
<updated>2010-03-13T05:55:39Z</updated>
<author>
<name>Thomas Rast</name>
<email>trast@student.ethz.ch</email>
</author>
<published>2010-03-12T17:04:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=160baa0d9cbdfcdb6251aa5ede77c59c0d53edfd'/>
<id>urn:sha1:160baa0d9cbdfcdb6251aa5ede77c59c0d53edfd</id>
<content type='text'>
This implements a mass-copy command that takes a sequence of lines in
the format

  &lt;from-sha1&gt; SP &lt;to-sha1&gt; [ SP &lt;rest&gt; ] LF

on stdin, and copies each &lt;from-sha1&gt;'s notes to the &lt;to-sha1&gt;.  The
&lt;rest&gt; is ignored.  The intent, of course, is that this can read the
same input that the 'post-rewrite' hook gets.

The copy_note() function is exposed for everyone's and in particular
the next commit's use.

Signed-off-by: Thomas Rast &lt;trast@student.ethz.ch&gt;
Acked-by: Johan Herland &lt;johan@herland.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Support showing notes from more than one notes tree</title>
<updated>2010-03-13T05:55:39Z</updated>
<author>
<name>Thomas Rast</name>
<email>trast@student.ethz.ch</email>
</author>
<published>2010-03-12T17:04:26Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=894a9d333e9e2015cad00d95250b7c5d3acea8b6'/>
<id>urn:sha1:894a9d333e9e2015cad00d95250b7c5d3acea8b6</id>
<content type='text'>
With this patch, you can set notes.displayRef to a glob that points at
your favourite notes refs, e.g.,

[notes]
	displayRef = refs/notes/*

Then git-log and friends will show notes from all trees.

Thanks to Junio C Hamano for lots of feedback, which greatly
influenced the design of the entire series and this commit in
particular.

Signed-off-by: Thomas Rast &lt;trast@student.ethz.ch&gt;
Acked-by: Johan Herland &lt;johan@herland.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Notes API: prune_notes(): Prune notes that belong to non-existing objects</title>
<updated>2010-02-14T03:36:14Z</updated>
<author>
<name>Johan Herland</name>
<email>johan@herland.net</email>
</author>
<published>2010-02-13T21:28:27Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=00fbe63627b72c807e558643f0634e435137122f'/>
<id>urn:sha1:00fbe63627b72c807e558643f0634e435137122f</id>
<content type='text'>
When an object is made unreachable by Git, any notes that annotate that object
are not automagically made unreachable, since all notes are always trivially
reachable from a notes ref. In order to remove notes for non-existing objects,
we therefore need to add functionality for traversing the notes tree and
explicitly removing references to notes that annotate non-reachable objects.
Thus the notes objects themselves also become unreachable, and are removed
by a later garbage collect.

prune_notes() performs this traversal (by using for_each_note() internally),
and removes the notes in question from the notes tree.

Note that the effect of prune_notes() is not persistent unless a subsequent
call to write_notes_tree() is made.

Signed-off-by: Johan Herland &lt;johan@herland.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Teach notes code to properly preserve non-notes in the notes tree</title>
<updated>2010-02-14T03:36:13Z</updated>
<author>
<name>Johan Herland</name>
<email>johan@herland.net</email>
</author>
<published>2010-02-13T21:28:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=851c2b3791f24e319c23331887d4b8150ca4d9ba'/>
<id>urn:sha1:851c2b3791f24e319c23331887d4b8150ca4d9ba</id>
<content type='text'>
The note tree structure allows for non-note entries to coexist with note
entries in a notes tree. Although we certainly expect there to be very
few non-notes in a notes tree, we should still support them to a certain
degree.

This patch teaches the notes code to preserve non-notes when updating the
notes tree with write_notes_tree(). Non-notes are not affected by fanout
restructuring.

For non-notes to be handled correctly, we can no longer allow subtree
entries that do not match the fanout structure produced by the notes code
itself. This means that fanouts like 4/36, 6/34, 8/32, 4/4/32, etc. are
no longer recognized as note subtrees; only 2-based fanouts are allowed
(2/38, 2/2/36, 2/2/2/34, etc.). Since the notes code has never at any point
_produced_ non-2-based fanouts, it is highly unlikely that this change will
cause problems for anyone.

The patch also adds some tests verifying the correct handling of non-notes
in a notes tree.

Signed-off-by: Johan Herland &lt;johan@herland.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Refactor notes concatenation into a flexible interface for combining notes</title>
<updated>2010-02-14T03:36:13Z</updated>
<author>
<name>Johan Herland</name>
<email>johan@herland.net</email>
</author>
<published>2010-02-13T21:28:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=73f464b5f3fe4dd5109b9fb9e58c1fe55393902d'/>
<id>urn:sha1:73f464b5f3fe4dd5109b9fb9e58c1fe55393902d</id>
<content type='text'>
When adding a note to an object that already has an existing note, the
current solution is to concatenate the contents of the two notes. However,
the caller may instead wish to _overwrite_ the existing note with the new
note, or maybe even _ignore_ the new note, and keep the existing one. There
might also be other ways of combining notes that are only known to the
caller.

Therefore, instead of unconditionally concatenating notes, we let the caller
specify how to combine notes, by passing in a pointer to a function for
combining notes. The caller may choose to implement its own function for
notes combining, but normally one of the following three conveniently
supplied notes combination functions will be sufficient:

- combine_notes_concatenate() combines the two notes by appending the
  contents of the new note to the contents of the existing note.

- combine_notes_overwrite() replaces the existing note with the new note.

- combine_notes_ignore() keeps the existing note, and ignores the new note.

A combine_notes function can be passed to init_notes() to choose a default
combine_notes function for that notes tree. If NULL is given, the notes tree
falls back to combine_notes_concatenate() as the ultimate default.

A combine_notes function can also be passed directly to add_note(), to
control the notes combining behaviour for a note addition in particular.
If NULL is passed, the combine_notes function registered for the given
notes tree is used.

Signed-off-by: Johan Herland &lt;johan@herland.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
