<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/builtin/notes.c, branch v2.0.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.0.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.0.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2014-03-24T17:43:34Z</updated>
<entry>
<title>parse-options: multi-word argh should use dash to separate words</title>
<updated>2014-03-24T17:43:34Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2014-03-23T22:58:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=e703d7118c68bb5b1f850dae4060609a88500b18'/>
<id>urn:sha1:e703d7118c68bb5b1f850dae4060609a88500b18</id>
<content type='text'>
"When you need to use space, use dash" is a strange way to say that
you must not use a space.  Because it is more common for the command
line descriptions to use dashed-multi-words, you do not even want to
use spaces in these places.  Rephrase the documentation to avoid
this strangeness.

Fix a few existing multi-word argument help strings, i.e.

 - GPG key-ids given to -S/--gpg-sign are "key-id";
 - Refs used for storing notes are "notes-ref"; and
 - Expiry timestamps given to --expire are "expiry-date".

and update the corresponding documentation pages.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'jh/note-trees-record-blobs'</title>
<updated>2014-03-14T21:25:39Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2014-03-14T21:25:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b37f81b7b676fe7ede3fa171535593337a8911c8'/>
<id>urn:sha1:b37f81b7b676fe7ede3fa171535593337a8911c8</id>
<content type='text'>
"git notes -C &lt;blob&gt;" should not take an object that is not a blob.

* jh/note-trees-record-blobs:
  notes: disallow reusing non-blob as a note object
</content>
</entry>
<entry>
<title>notes: disallow reusing non-blob as a note object</title>
<updated>2014-02-20T22:14:33Z</updated>
<author>
<name>Johan Herland</name>
<email>johan@herland.net</email>
</author>
<published>2014-02-12T09:54:16Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ce8daa1eb863c9cdefb06feae2ee7c742ea89847'/>
<id>urn:sha1:ce8daa1eb863c9cdefb06feae2ee7c742ea89847</id>
<content type='text'>
Currently "git notes add -C $object" will read the raw bytes from $object,
and then copy those bytes into the note object, which is hardcoded to be
of type blob. This means that if the given $object is a non-blob (e.g.
tree or commit), the raw bytes from that object is copied into a blob
object. This is probably not useful, and certainly not what any sane
user would expect. So disallow it, by erroring out if the $object passed
to the -C option is not a blob.

The fix also applies to the -c option (in which the user is prompted to
edit/verify the note contents in a text editor), and also when -c/-C is
passed to "git notes append" (which appends the $object contents to an
existing note object). In both cases, passing a non-blob $object does not
make sense.

Also add a couple of tests demonstrating expected behavior.

Suggested-by: Junio C Hamano &lt;gitster@pobox.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>replace {pre,suf}fixcmp() with {starts,ends}_with()</title>
<updated>2013-12-05T22:13:21Z</updated>
<author>
<name>Christian Couder</name>
<email>chriscool@tuxfamily.org</email>
</author>
<published>2013-11-30T20:55:40Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=59556548230e617b837343c2c07e357e688e2ca4'/>
<id>urn:sha1:59556548230e617b837343c2c07e357e688e2ca4</id>
<content type='text'>
Leaving only the function definitions and declarations so that any
new topic in flight can still make use of the old functions, replace
existing uses of the prefixcmp() and suffixcmp() with new API
functions.

The change can be recreated by mechanically applying this:

    $ git grep -l -e prefixcmp -e suffixcmp -- \*.c |
      grep -v strbuf\\.c |
      xargs perl -pi -e '
        s|!prefixcmp\(|starts_with\(|g;
        s|prefixcmp\(|!starts_with\(|g;
        s|!suffixcmp\(|ends_with\(|g;
        s|suffixcmp\(|!ends_with\(|g;
      '

on the result of preparatory changes in this series.

Signed-off-by: Christian Couder &lt;chriscool@tuxfamily.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Replace deprecated OPT_BOOLEAN by OPT_BOOL</title>
<updated>2013-08-05T18:32:19Z</updated>
<author>
<name>Stefan Beller</name>
<email>stefanbeller@googlemail.com</email>
</author>
<published>2013-08-03T11:51:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=d5d09d475440c24016ec52a0bcc8477d9a7b5c71'/>
<id>urn:sha1:d5d09d475440c24016ec52a0bcc8477d9a7b5c71</id>
<content type='text'>
This task emerged from b04ba2bb (parse-options: deprecate OPT_BOOLEAN,
2011-09-27). All occurrences of the respective variables have
been reviewed and none of them relied on the counting up mechanism,
but all of them were using the variable as a true boolean.

This patch does not change semantics of any command intentionally.

Signed-off-by: Stefan Beller &lt;stefanbeller@googlemail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Remove deprecated OPTION_BOOLEAN for parsing arguments</title>
<updated>2013-08-05T18:32:17Z</updated>
<author>
<name>Stefan Beller</name>
<email>stefanbeller@googlemail.com</email>
</author>
<published>2013-08-03T11:51:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=4741edd549decfccc016fa4775b349fe94fdf4e5'/>
<id>urn:sha1:4741edd549decfccc016fa4775b349fe94fdf4e5</id>
<content type='text'>
As of b04ba2bb4 OPTION_BOOLEAN was deprecated.
This commit removes all occurrences of OPTION_BOOLEAN.
In b04ba2bb4 Junio suggested to replace it with either
OPTION_SET_INT or OPTION_COUNTUP instead. However a pattern, which
occurred often with the OPTION_BOOLEAN was a hidden boolean parameter.
So I defined OPT_HIDDEN_BOOL as an additional possible parse option
in parse-options.h to make life easy.

The OPT_HIDDEN_BOOL was used in checkout, clone, commit, show-ref.
The only exception, where there was need to fiddle with OPTION_SET_INT
was log and notes. However in these two files there is also a pattern,
so we could think of introducing OPT_NONEG_BOOL.

Signed-off-by: Stefan Beller &lt;stefanbeller@googlemail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'ph/builtin-srcs-are-in-subdir-these-days'</title>
<updated>2013-06-26T22:07:48Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2013-06-26T22:07:48Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=2ddc898bc0d0c3f03b4aeeb34c33f652d95f2807'/>
<id>urn:sha1:2ddc898bc0d0c3f03b4aeeb34c33f652d95f2807</id>
<content type='text'>
* ph/builtin-srcs-are-in-subdir-these-days:
  fix "builtin-*" references to be "builtin/*"
</content>
</entry>
<entry>
<title>fix "builtin-*" references to be "builtin/*"</title>
<updated>2013-06-18T18:05:51Z</updated>
<author>
<name>Phil Hord</name>
<email>hordp@cisco.com</email>
</author>
<published>2013-06-18T17:44:58Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=09b7e2204a8e41307192c800162e438ec09ddd2c'/>
<id>urn:sha1:09b7e2204a8e41307192c800162e438ec09ddd2c</id>
<content type='text'>
Documentation and some comments still refer to files in builtin/
as 'builtin-*.[cho]'.  Update these to show the correct location.

Signed-off-by: Phil Hord &lt;hordp@cisco.com&gt;
Reviewed-by: Jonathan Nieder &lt;jrnieder@gmail.com&gt;
Assisted-by: Junio C Hamano &lt;gitster@pobox.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Move copy_note_for_rewrite + friends from builtin/notes.c to notes-utils.c</title>
<updated>2013-06-12T17:34:59Z</updated>
<author>
<name>Johan Herland</name>
<email>johan@herland.net</email>
</author>
<published>2013-06-12T00:13:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=49c2470400bbb695b953abeb4e6737be747317af'/>
<id>urn:sha1:49c2470400bbb695b953abeb4e6737be747317af</id>
<content type='text'>
This is a pure code movement of the machinery for copying notes to
rewritten objects. This code was located in builtin/notes.c for
historical reasons. In order to make it available to builtin/commit.c
it was declared in builtin.h. This was more of an accident of history
than a concious design, and we now want to make this machinery more
widely available.

Hence, this patch moves the code into the new notes-utils.[hc] files
which are included into libgit.a. Except for adjusting #includes
accordingly, this patch merely moves the relevant functions verbatim
into the new files.

Cc: Thomas Rast &lt;trast@inf.ethz.ch&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>finish_copy_notes_for_rewrite(): Let caller provide commit message</title>
<updated>2013-06-12T17:27:41Z</updated>
<author>
<name>Johan Herland</name>
<email>johan@herland.net</email>
</author>
<published>2013-06-12T00:12:59Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=80a14665b199a0ccacceb095e3a8bfc4f1e8645e'/>
<id>urn:sha1:80a14665b199a0ccacceb095e3a8bfc4f1e8645e</id>
<content type='text'>
When copying notes for a rewritten object, the resulting notes commit
would have the following hardcoded commit message:

  Notes added by 'git notes copy'

This is obviously bogus when the notes rewriting is performed by
'git commit --amend'.

Therefore, let the caller specify an appropriate notes commit message
instead of hardcoding it. The above message is used for 'git notes copy',
but when calling finish_copy_notes_for_rewrite() from builtin/commit.c,
we use the following message instead:

  Notes added by 'git commit --amend'

Cc: Thomas Rast &lt;trast@inf.ethz.ch&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>
