<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/builtin/notes.c, branch v2.40.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.40.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.40.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2022-11-16T19:57:32Z</updated>
<entry>
<title>notes: avoid empty line in template</title>
<updated>2022-11-16T19:57:32Z</updated>
<author>
<name>Michael J Gruber</name>
<email>git@grubix.eu</email>
</author>
<published>2022-11-16T15:56:40Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=3c9b01f0bf4f53eb8437bae725c854049a981865'/>
<id>urn:sha1:3c9b01f0bf4f53eb8437bae725c854049a981865</id>
<content type='text'>
When `git notes` prepares the template it adds an empty newline between
the comment header and the content:

&gt;
&gt; #
&gt; # Write/edit the notes for the following object:
&gt;
&gt; # commit 0f3c55d4c2b7864bffb2d92278eff08d0b2e083f
&gt; # etc

This is wrong structurally because that newline is part of the comment,
too, and thus should be commented. Also, it throws off some positioning
strategies of editors and plugins, and it differs from how we do commit
templates.

Change this to follow the standard set by `git commit`:

&gt;
&gt; #
&gt; # Write/edit the notes for the following object:
&gt; #
&gt; # commit 0f3c55d4c2b7864bffb2d92278eff08d0b2e083f
&gt;

Tests pass unchanged after this code change.

Signed-off-by: Michael J Gruber &lt;git@grubix.eu&gt;
Signed-off-by: Taylor Blau &lt;me@ttaylorr.com&gt;
</content>
</entry>
<entry>
<title>notes, remote: show unknown subcommands between `'</title>
<updated>2022-09-07T19:06:12Z</updated>
<author>
<name>SZEDER Gábor</name>
<email>szeder.dev@gmail.com</email>
</author>
<published>2022-09-05T18:50:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=dd834d75caabd436e306c136f753c801220db2df'/>
<id>urn:sha1:dd834d75caabd436e306c136f753c801220db2df</id>
<content type='text'>
Update the "unknown subcommand" error message in 'git notes' and 'git
remote' to wrap the offending argument between `', to make it
consistent with the "unknown switch/option/subcommand" error messages
in parse-options.

Signed-off-by: SZEDER Gábor &lt;szeder.dev@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>notes: simplify default operation mode arguments check</title>
<updated>2022-09-07T19:06:12Z</updated>
<author>
<name>SZEDER Gábor</name>
<email>szeder.dev@gmail.com</email>
</author>
<published>2022-09-05T18:50:06Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=1c7c25aef12918b9305df19142ab5755297274a6'/>
<id>urn:sha1:1c7c25aef12918b9305df19142ab5755297274a6</id>
<content type='text'>
'git notes' has a default operation mode, but when invoked without a
subcommand it doesn't accept any arguments (although the 'list'
subcommand implementing the default operation mode does accept
arguments).  The condition checking this ended up a bit awkward, so
let's make it clearer.

Signed-off-by: SZEDER Gábor &lt;szeder.dev@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>builtin/notes.c: let parse-options parse subcommands</title>
<updated>2022-08-19T18:13:15Z</updated>
<author>
<name>SZEDER Gábor</name>
<email>szeder.dev@gmail.com</email>
</author>
<published>2022-08-19T16:04:06Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=54ef7676bab9292c041e6ada73bb48a4c261c71b'/>
<id>urn:sha1:54ef7676bab9292c041e6ada73bb48a4c261c71b</id>
<content type='text'>
'git notes' parses its subcommands with a long list of if-else if
statements.  parse-options has just learned to parse subcommands, so
let's use that facility instead, with the benefits of shorter code,
handling unknown subcommands, and listing subcommands for Bash
completion.  Make sure that the default operation mode doesn't accept
any arguments.

Signed-off-by: SZEDER Gábor &lt;szeder.dev@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'ab/object-file-api-updates'</title>
<updated>2022-03-17T00:53:08Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2022-03-17T00:53:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=430883a70c79614e52279f2800a9a383ffc68fe5'/>
<id>urn:sha1:430883a70c79614e52279f2800a9a383ffc68fe5</id>
<content type='text'>
Object-file API shuffling.

* ab/object-file-api-updates:
  object-file API: pass an enum to read_object_with_reference()
  object-file.c: add a literal version of write_object_file_prepare()
  object-file API: have hash_object_file() take "enum object_type"
  object API: rename hash_object_file_literally() to write_*()
  object-file API: split up and simplify check_object_signature()
  object API users + docs: check &lt;0, not !0 with check_object_signature()
  object API docs: move check_object_signature() docs to cache.h
  object API: correct "buf" v.s. "map" mismatch in *.c and *.h
  object-file API: have write_object_file() take "enum object_type"
  object-file API: add a format_object_header() function
  object-file API: return "void", not "int" from hash_object_file()
  object-file.c: split up declaration of unrelated variables
</content>
</entry>
<entry>
<title>object-file API: have write_object_file() take "enum object_type"</title>
<updated>2022-02-26T01:16:31Z</updated>
<author>
<name>Ævar Arnfjörð Bjarmason</name>
<email>avarab@gmail.com</email>
</author>
<published>2022-02-04T23:48:26Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=c80d226a046170b1c8dd82ef72a27373ddd5880e'/>
<id>urn:sha1:c80d226a046170b1c8dd82ef72a27373ddd5880e</id>
<content type='text'>
Change the write_object_file() function to take an "enum object_type"
instead of a "const char *type". Its callers either passed
{commit,tree,blob,tag}_type and can pass the corresponding OBJ_* type
instead, or were hardcoding strings like "blob".

This avoids the back &amp; forth fragility where the callers of
write_object_file() would have the enum type, and convert it
themselves via type_name(). We do have to now do that conversion
ourselves before calling write_object_file_prepare(), but those
codepaths will be similarly adjusted in subsequent commits.

Signed-off-by: Ævar Arnfjörð Bjarmason &lt;avarab@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>i18n: remove from i18n strings that do not hold translatable parts</title>
<updated>2022-02-04T21:58:28Z</updated>
<author>
<name>Jean-Noël Avila</name>
<email>jn.avila@free.fr</email>
</author>
<published>2022-01-31T22:07:48Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=959d670d1a42af282a55551a3f03642592f64eb6'/>
<id>urn:sha1:959d670d1a42af282a55551a3f03642592f64eb6</id>
<content type='text'>
Signed-off-by: Jean-Noël Avila &lt;jn.avila@free.fr&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'ab/usage-die-message'</title>
<updated>2022-01-10T19:52:53Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2022-01-10T19:52:53Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=4b51386bbfc5d26e552c3c4be135e31cd2f64b44'/>
<id>urn:sha1:4b51386bbfc5d26e552c3c4be135e31cd2f64b44</id>
<content type='text'>
Code clean-up to hide vreportf() from public API.

* ab/usage-die-message:
  config API: use get_error_routine(), not vreportf()
  usage.c + gc: add and use a die_message_errno()
  gc: return from cmd_gc(), don't call exit()
  usage.c API users: use die_message() for error() + exit 128
  usage.c API users: use die_message() for "fatal :" + exit 128
  usage.c: add a die_message() routine
</content>
</entry>
<entry>
<title>Merge branch 'ak/protect-any-current-branch'</title>
<updated>2021-12-21T23:03:16Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2021-12-21T23:03:16Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=13fa77b6899d0068303761c449d9a7e01dd85eb8'/>
<id>urn:sha1:13fa77b6899d0068303761c449d9a7e01dd85eb8</id>
<content type='text'>
"git fetch" without the "--update-head-ok" option ought to protect
a checked out branch from getting updated, to prevent the working
tree that checks it out to go out of sync.  The code was written
before the use of "git worktree" got widespread, and only checked
the branch that was checked out in the current worktree, which has
been updated.
(originally called ak/fetch-not-overwrite-any-current-branch)

* ak/protect-any-current-branch:
  branch: protect branches checked out in all worktrees
  receive-pack: protect current branch for bare repository worktree
  receive-pack: clean dead code from update_worktree()
  fetch: protect branches checked out in all worktrees
  worktree: simplify find_shared_symref() memory ownership model
  branch: lowercase error messages
  receive-pack: lowercase error messages
  fetch: lowercase error messages
</content>
</entry>
<entry>
<title>usage.c API users: use die_message() for error() + exit 128</title>
<updated>2021-12-07T21:25:15Z</updated>
<author>
<name>Ævar Arnfjörð Bjarmason</name>
<email>avarab@gmail.com</email>
</author>
<published>2021-12-07T18:26:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=adcd4d4c6f9352bef53058161db36bb1ccd5cd9d'/>
<id>urn:sha1:adcd4d4c6f9352bef53058161db36bb1ccd5cd9d</id>
<content type='text'>
Continue the migration of code that printed a message and exited with
128. In this case the caller used "error()", so we'll be changing the
output from "error: " to "fatal: ". This change is intentional and
desired.

This code is dying, so it should emit "fatal", the only reason it
didn't do so was because before the existence of "die_message()" it
would have needed to craft its own "fatal: " message.

Signed-off-by: Ævar Arnfjörð Bjarmason &lt;avarab@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
