<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/git.git/Documentation/git-notes.txt, branch v1.7.7.4</title>
<subtitle>Git
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/git.git/atom?h=v1.7.7.4</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/atom?h=v1.7.7.4'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/'/>
<updated>2011-08-25T20:16:46Z</updated>
<entry>
<title>git-notes.txt: clarify -C vs. copy and -F</title>
<updated>2011-08-25T20:16:46Z</updated>
<author>
<name>Michael J Gruber</name>
<email>git@drmicha.warpmail.net</email>
</author>
<published>2011-08-25T10:26:37Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=11432bb467c2ba45014fc2fe8c4e23c92b7356d6'/>
<id>urn:sha1:11432bb467c2ba45014fc2fe8c4e23c92b7356d6</id>
<content type='text'>
The current description of '-C' together with the analogy to 'git commit
-C' can lead to the wrong conclusion that '-C' copies notes between
objects. Make this clearer by rewording and pointing to 'copy'.

The example for attaching binary notes with 'git hash-object' followed
by 'git notes add -C' immediately raises the question: "Why not use 'git
notes add -F'?". Answer it (the latter is not binary-safe).

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 remove: --stdin reads from the standard input</title>
<updated>2011-05-19T17:54:16Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2011-05-18T23:44:30Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=46538012d943156ead4024fb510a1ce5d4ff443a'/>
<id>urn:sha1:46538012d943156ead4024fb510a1ce5d4ff443a</id>
<content type='text'>
Teach the command to read object names to remove from the standard
input, in addition to the object names given from the command line.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>notes remove: --ignore-missing</title>
<updated>2011-05-19T17:46:42Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2011-05-18T23:02:58Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=2d370d2fbcf896912cc0739b806224f9a270bb5e'/>
<id>urn:sha1:2d370d2fbcf896912cc0739b806224f9a270bb5e</id>
<content type='text'>
Depending on the application, it is not necessarily an error for an object
to lack a note, especially if the only thing the caller wants to make sure
is that notes are cleared for an object.  By passing this option from the
command line, the "git notes remove" command considers it a success if the
object did not have any note to begin with.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>notes remove: allow removing more than one</title>
<updated>2011-05-19T17:44:44Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2011-05-18T22:44:37Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=c3ab1a8e4cb8a84967efcf45c5e6bee41b17f9f9'/>
<id>urn:sha1:c3ab1a8e4cb8a84967efcf45c5e6bee41b17f9f9</id>
<content type='text'>
While "xargs -n1 git notes rm" is certainly a possible way to remove notes
from many objects, this would create one notes "commit" per removal, which
is not quite suitable for seasonal housekeeping.

Allow taking more than one on the command line, and record their removal
as a single atomic event if everthing goes well.

Even though the old code insisted that "git notes rm" must be given only
one object (or zero, in which case it would default to HEAD), this
condition was not tested. Add tests to handle the new case where we feed
multiple objects, and also make sure if there is a bad input, no change
is recorded.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Make "git notes add" more user-friendly when there are existing notes</title>
<updated>2011-03-30T20:13:52Z</updated>
<author>
<name>Johan Herland</name>
<email>johan@herland.net</email>
</author>
<published>2011-03-30T00:02:55Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=84a7e35eea97388ba5ca458808119650818c2fd2'/>
<id>urn:sha1:84a7e35eea97388ba5ca458808119650818c2fd2</id>
<content type='text'>
Currently, "notes add" (without -f/--force) will abort when the given object
already has existing notes. This makes sense for the modes of "git notes add"
that would necessarily overwrite the old message (when using the -m/-F/-C/-c
options). However, when no options are given (meaning the notes are created
from scratch in the editor) it is not very user-friendly to abort on existing
notes, and forcing the user to run "git notes edit".

Instead, it is better to simply "redirect" to "git notes edit" automatically,
i.e. open the existing notes in the editor and let the user edit them.
This patch does just that.

This changes the behavior of "git notes add" without options when notes
already exist for the given object, but I doubt that many users really depend
on the previous failure from "git notes add" in this case.

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>Provide 'git notes get-ref' to easily retrieve current notes ref</title>
<updated>2010-11-17T21:23:55Z</updated>
<author>
<name>Johan Herland</name>
<email>johan@herland.net</email>
</author>
<published>2010-11-09T21:49:57Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=618cd75707580819f19a5f01dba406ac72219c78'/>
<id>urn:sha1:618cd75707580819f19a5f01dba406ac72219c78</id>
<content type='text'>
Script may use 'git notes get-ref' to easily retrieve the current notes ref.

Suggested-by: Jonathan Nieder &lt;jrnieder@gmail.com&gt;
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>git notes merge: Add another auto-resolving strategy: "cat_sort_uniq"</title>
<updated>2010-11-17T21:22:53Z</updated>
<author>
<name>Johan Herland</name>
<email>johan@herland.net</email>
</author>
<published>2010-11-14T23:57:17Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=a6a09095a08339afc8468d053ff978ed4662a1d5'/>
<id>urn:sha1:a6a09095a08339afc8468d053ff978ed4662a1d5</id>
<content type='text'>
This new strategy is similar to "concatenate", but in addition to
concatenating the two note candidates, this strategy sorts the resulting
lines, and removes duplicate lines from the result. This is equivalent to
applying the "cat | sort | uniq" shell pipeline to the two note candidates.

This strategy is useful if the notes follow a line-based format where one
wants to avoid duplicate lines in the merge result.

Note that if either of the note candidates contain duplicate lines _prior_
to the merge, these will also be removed by this merge strategy.

The patch also contains tests and documentation for the new strategy.

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>git notes merge: Manual conflict resolution, part 2/2</title>
<updated>2010-11-17T21:22:49Z</updated>
<author>
<name>Johan Herland</name>
<email>johan@herland.net</email>
</author>
<published>2010-11-09T21:49:52Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=6abb3655efe364cf0375b5cdae2729af7562ed45'/>
<id>urn:sha1:6abb3655efe364cf0375b5cdae2729af7562ed45</id>
<content type='text'>
When the notes merge conflicts in .git/NOTES_MERGE_WORKTREE have been
resolved, we need to record a new notes commit on the appropriate notes
ref with the resolved notes.

This patch implements 'git notes merge --commit' which the user should
run after resolving conflicts in the notes merge worktree. This command
finalizes the notes merge by recombining the partial notes tree from
part 1 with the now-resolved conflicts in the notes merge worktree in a
merge commit, and updating the appropriate ref to this merge commit.

In order to correctly finalize the merge, we need to keep track of three
things:

- The partial merge result from part 1, containing the auto-merged notes.
  This is now stored into a ref called .git/NOTES_MERGE_PARTIAL.
- The unmerged notes. These are already stored in
  .git/NOTES_MERGE_WORKTREE, thanks to part 1.
- The notes ref to be updated by the finalized merge result. This is now
  stored in a symref called .git/NOTES_MERGE_REF.

In addition to "git notes merge --commit", which uses the above details
to create the finalized notes merge commit, this patch also implements
"git notes merge --reset", which aborts the ongoing notes merge by simply
removing the files/directory described above.

FTR, "git notes merge --commit" reuses "git notes merge --reset" to remove
the information described above (.git/NOTES_MERGE_*) after the notes merge
have been successfully finalized.

The patch also contains documentation and testcases for the two new options.

This patch has been improved by the following contributions:
- Ævar Arnfjörð Bjarmason: Fix nonsense sentence in --commit description
- Sverre Rabbelier: Rename --reset to --abort

Thanks-to: Ævar Arnfjörð Bjarmason &lt;avarab@gmail.com&gt;
Thanks-to: Sverre Rabbelier &lt;srabbelier@gmail.com&gt;
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>git notes merge: Manual conflict resolution, part 1/2</title>
<updated>2010-11-17T21:22:49Z</updated>
<author>
<name>Johan Herland</name>
<email>johan@herland.net</email>
</author>
<published>2010-11-09T21:49:51Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=809f38c8abacdbeb7015fdeef03931568c7fddda'/>
<id>urn:sha1:809f38c8abacdbeb7015fdeef03931568c7fddda</id>
<content type='text'>
Conflicts (that are to be resolved manually) are written into a special-
purpose working tree, located at .git/NOTES_MERGE_WORKTREE. Within this
directory, conflicting notes entries are stored (with conflict markers
produced by ll_merge()) using the SHA1 of the annotated object. The
.git/NOTES_MERGE_WORKTREE directory will only contain the _conflicting_
note entries. The non-conflicting note entries (aka. the partial merge
result) are stored in 'local_tree', and the SHA1 of the resulting commit
is written to 'result_sha1'. The return value from notes_merge() is -1.

The user is told to edit the files within the .git/NOTES_MERGE_WORKTREE
directory in order to resolve the conflicts.

The patch also contains documentation and testcases for the correct setup
of .git/NOTES_MERGE_WORKTREE.

The next part will recombine the partial notes merge result with the
resolved conflicts in .git/NOTES_MERGE_WORKTREE to produce the complete
merge result.

This patch has been improved by the following contributions:
- Jonathan Nieder: Use trace_printf(...) instead of OUTPUT(o, 5, ...)

Thanks-to: Jonathan Nieder &lt;jrnieder@gmail.com&gt;
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>Documentation: Preliminary docs on 'git notes merge'</title>
<updated>2010-11-17T21:22:49Z</updated>
<author>
<name>Johan Herland</name>
<email>johan@herland.net</email>
</author>
<published>2010-11-09T21:49:50Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=00f03061e27cad5497abcca2b70fa9fa04818275'/>
<id>urn:sha1:00f03061e27cad5497abcca2b70fa9fa04818275</id>
<content type='text'>
This patch has been improved by the following contributions:
- Stephen Boyd: Use "automatically resolves" instead of "auto-resolves"
- Stephen Boyd: Remove unbalanced '('

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