<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/builtin/notes.c, branch v1.8.2.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v1.8.2.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v1.8.2.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2013-01-16T20:48:22Z</updated>
<entry>
<title>Allow custom "comment char"</title>
<updated>2013-01-16T20:48:22Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2013-01-16T19:18:48Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=eff80a9fd990de3605063050dae32f969ef18ba8'/>
<id>urn:sha1:eff80a9fd990de3605063050dae32f969ef18ba8</id>
<content type='text'>
Some users do want to write a line that begin with a pound sign, #,
in their commit log message.  Many tracking system recognise
a token of #&lt;bugid&gt; form, for example.

The support we offer these use cases is not very friendly to the end
users.  They have a choice between

 - Don't do it.  Avoid such a line by rewrapping or indenting; and

 - Use --cleanup=whitespace but remove all the hint lines we add.

Give them a way to set a custom comment char, e.g.

    $ git -c core.commentchar="%" commit

so that they do not have to do either of the two workarounds.

[jc: although I started the topic, all the tests and documentation
updates, many of the call sites of the new strbuf_add_commented_*()
functions, and the change to git-submodule.sh scripted Porcelain are
from Ralf.]

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
Signed-off-by: Ralf Thielow &lt;ralf.thielow@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>builtin/notes.c: mark file-scope private symbols as static</title>
<updated>2012-09-16T05:58:20Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2012-09-15T20:56:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=f50fee4a0476dfd1315612f49244e7050280bf68'/>
<id>urn:sha1:f50fee4a0476dfd1315612f49244e7050280bf68</id>
<content type='text'>
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Reduce translations by using same terminologies</title>
<updated>2012-08-22T19:02:28Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2012-08-20T12:32:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b0ff96547ec66979487707ad71f89c23f5e0669d'/>
<id>urn:sha1:b0ff96547ec66979487707ad71f89c23f5e0669d</id>
<content type='text'>
Somewhere in help usage, we use both "message" and "msg", "command"
and "cmd", "key id" and "key-id". This patch makes all help text from
parseopt use the first form. Clearer and 3 fewer strings for
translators.

Signed-off-by: Nguyễn Thái Ngọc Duy &lt;pclouds@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>i18n: notes: mark parseopt strings for translation</title>
<updated>2012-08-20T19:23:18Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2012-08-20T12:32:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=e6b895efdb77f3a1c8e489ff13ed5834bba16736'/>
<id>urn:sha1:e6b895efdb77f3a1c8e489ff13ed5834bba16736</id>
<content type='text'>
Signed-off-by: Nguyễn Thái Ngọc Duy &lt;pclouds@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'nd/war-on-nul-in-commit'</title>
<updated>2011-12-22T19:27:26Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2011-12-22T19:27:26Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=f35ccd9be2db9a55afd09ed1a9338c758fa63d82'/>
<id>urn:sha1:f35ccd9be2db9a55afd09ed1a9338c758fa63d82</id>
<content type='text'>
* nd/war-on-nul-in-commit:
  commit_tree(): refuse commit messages that contain NULs
  Convert commit_tree() to take strbuf as message
  merge: abort if fails to commit

Conflicts:
	builtin/commit.c
	commit.c
	commit.h
</content>
</entry>
<entry>
<title>Convert commit_tree() to take strbuf as message</title>
<updated>2011-12-15T18:46:42Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2011-12-15T13:47:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=13f8b72d8c8e24215a3dd7771592b30083f1c740'/>
<id>urn:sha1:13f8b72d8c8e24215a3dd7771592b30083f1c740</id>
<content type='text'>
There wan't a way for commit_tree() to notice if the message the caller
prepared contained a NUL byte, as it did not take the length of the
message as a parameter. Use a pointer to a strbuf instead, so that we can
either choose to allow low-level plumbing commands to make commits that
contain NUL byte in its message, or forbid NUL everywhere by adding the
check in commit_tree(), in later patches.

Signed-off-by: Nguyễn Thái Ngọc Duy &lt;pclouds@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Convert resolve_ref+xstrdup to new resolve_refdup function</title>
<updated>2011-12-13T17:26:52Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2011-12-13T14:17:48Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=96ec7b1e708863d0cd6b8e72a986d6f0a1bb64db'/>
<id>urn:sha1:96ec7b1e708863d0cd6b8e72a986d6f0a1bb64db</id>
<content type='text'>
Signed-off-by: Nguyễn Thái Ngọc Duy &lt;pclouds@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Copy resolve_ref() return value for longer use</title>
<updated>2011-12-06T00:21:06Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2011-11-13T10:22:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=d5a35c114ab6b4337a1c7598bf75c331d94ee092'/>
<id>urn:sha1:d5a35c114ab6b4337a1c7598bf75c331d94ee092</id>
<content type='text'>
resolve_ref() may return a pointer to a static buffer. Callers that
use this value longer than a couple of statements should copy the
value to avoid some hidden resolve_ref() call that may change the
static buffer's value.

The bug found by Tony Wang &lt;wwwjfy@gmail.com&gt; in builtin/merge.c
demonstrates this. The first call is in cmd_merge()

branch = resolve_ref("HEAD", head_sha1, 0, &amp;flag);

Then deep in lookup_commit_or_die() a few lines after, resolve_ref()
may be called again and destroy "branch".

lookup_commit_or_die
 lookup_commit_reference
  lookup_commit_reference_gently
   parse_object
    lookup_replace_object
     do_lookup_replace_object
      prepare_replace_object
       for_each_replace_ref
        do_for_each_ref
         get_loose_refs
          get_ref_dir
           get_ref_dir
            resolve_ref

All call sites are checked and made sure that xstrdup() is called if
the value should be saved.

Signed-off-by: Nguyễn Thái Ngọc Duy &lt;pclouds@gmail.com&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.shady.money/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.shady.money/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>
</feed>
