<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/ident.c, branch v2.41.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.41.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.41.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2023-02-24T01:25:29Z</updated>
<entry>
<title>ident.h: move ident-related declarations out of cache.h</title>
<updated>2023-02-24T01:25:29Z</updated>
<author>
<name>Elijah Newren</name>
<email>newren@gmail.com</email>
</author>
<published>2023-02-24T00:09:29Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b5fa608180d4270b3495258ab098426551a18372'/>
<id>urn:sha1:b5fa608180d4270b3495258ab098426551a18372</id>
<content type='text'>
These functions were all defined in a separate ident.c already, so
create ident.h and move the declarations into that file.

Signed-off-by: Elijah Newren &lt;newren@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>git-compat-util.h: use "UNUSED", not "UNUSED(var)"</title>
<updated>2022-09-01T17:49:48Z</updated>
<author>
<name>Ævar Arnfjörð Bjarmason</name>
<email>avarab@gmail.com</email>
</author>
<published>2022-08-25T17:09:48Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=5cf88fd8b059235b21ee2f72b17bf1f421a9c4e7'/>
<id>urn:sha1:5cf88fd8b059235b21ee2f72b17bf1f421a9c4e7</id>
<content type='text'>
As reported in [1] the "UNUSED(var)" macro introduced in
2174b8c75de (Merge branch 'jk/unused-annotation' into next,
2022-08-24) breaks coccinelle's parsing of our sources in files where
it occurs.

Let's instead partially go with the approach suggested in [2] of
making this not take an argument. As noted in [1] "coccinelle" will
ignore such tokens in argument lists that it doesn't know about, and
it's less of a surprise to syntax highlighters.

This undoes the "help us notice when a parameter marked as unused is
actually use" part of 9b240347543 (git-compat-util: add UNUSED macro,
2022-08-19), a subsequent commit will further tweak the macro to
implement a replacement for that functionality.

1. https://lore.kernel.org/git/220825.86ilmg4mil.gmgdl@evledraar.gmail.com/
2. https://lore.kernel.org/git/220819.868rnk54ju.gmgdl@evledraar.gmail.com/

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>config: mark unused callback parameters</title>
<updated>2022-08-19T19:18:55Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2022-08-19T10:08:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=783a86c1427637d71fb2710291e677360ab5dc09'/>
<id>urn:sha1:783a86c1427637d71fb2710291e677360ab5dc09</id>
<content type='text'>
The callback passed to git_config() must conform to a particular
interface. But most callbacks don't actually look at the extra "void
*data" parameter. Let's mark the unused parameters to make
-Wunused-parameter happy.

Note there's one unusual case here in get_remote_default() where we
actually ignore the "value" parameter. That's because it's only checking
whether the option is found at all, and not parsing its value.

Signed-off-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>ident: rename commit_rewrite_person() to apply_mailmap_to_header()</title>
<updated>2022-07-18T19:55:53Z</updated>
<author>
<name>Siddharth Asthana</name>
<email>siddharthasthana31@gmail.com</email>
</author>
<published>2022-07-18T19:51:01Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=66a8a95315edb3feba1190dcd89a208ae71bda61'/>
<id>urn:sha1:66a8a95315edb3feba1190dcd89a208ae71bda61</id>
<content type='text'>
commit_rewrite_person() takes a commit buffer and replaces the idents
in the header with their canonical versions using the mailmap mechanism.
The name "commit_rewrite_person()" is misleading as it doesn't convey
what kind of rewrite are we going to do to the buffer. It also doesn't
clearly mention that the function will limit itself to the header part
of the buffer. The new name, "apply_mailmap_to_header()", expresses the
functionality of the function pretty clearly.

We intend to use apply_mailmap_to_header() in git-cat-file to replace
idents in the headers of commit and tag object buffers. So, we will be
extending this function to take tag objects buffer as well and replace
idents on the tagger header using the mailmap mechanism.

Mentored-by: Christian Couder &lt;christian.couder@gmail.com&gt;
Mentored-by: John Cai &lt;johncai86@gmail.com&gt;
Signed-off-by: Siddharth Asthana &lt;siddharthasthana31@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>ident: move commit_rewrite_person() to ident.c</title>
<updated>2022-07-18T19:55:53Z</updated>
<author>
<name>Siddharth Asthana</name>
<email>siddharthasthana31@gmail.com</email>
</author>
<published>2022-07-18T19:51:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=dc88e349a297de6b7d0e21d81ac98f7816fcd473'/>
<id>urn:sha1:dc88e349a297de6b7d0e21d81ac98f7816fcd473</id>
<content type='text'>
commit_rewrite_person() and rewrite_ident_line() are static functions
defined in revision.c.

Their usages are as follows:
- commit_rewrite_person() takes a commit buffer and replaces the author
  and committer idents with their canonical versions using the mailmap
  mechanism
- rewrite_ident_line() takes author/committer header lines from the
  commit buffer and replaces the idents with their canonical versions
  using the mailmap mechanism.

This patch moves commit_rewrite_person() and rewrite_ident_line() to
ident.c which contains many other functions related to idents like
split_ident_line(). By moving commit_rewrite_person() to ident.c, we
also intend to use it in git-cat-file to replace committer and author
idents from the headers to their canonical versions using the mailmap
mechanism. The function is moved as is for now to make it clear that
there are no other changes, but it will be renamed in a following
commit.

Mentored-by: Christian Couder &lt;christian.couder@gmail.com&gt;
Mentored-by: John Cai &lt;johncai86@gmail.com&gt;
Signed-off-by: Siddharth Asthana &lt;siddharthasthana31@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>date API: create a date.h, split from cache.h</title>
<updated>2022-02-16T17:40:00Z</updated>
<author>
<name>Ævar Arnfjörð Bjarmason</name>
<email>avarab@gmail.com</email>
</author>
<published>2022-02-16T08:14:02Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=88c7b4c3c8d51510d20ebb9990750ad0e97afbfb'/>
<id>urn:sha1:88c7b4c3c8d51510d20ebb9990750ad0e97afbfb</id>
<content type='text'>
Move the declaration of the date.c functions from cache.h, and adjust
the relevant users to include the new date.h header.

The show_ident_date() function belonged in pretty.h (it's defined in
pretty.c), its two users outside of pretty.c didn't strictly need to
include pretty.h, as they get it indirectly, but let's add it to them
anyway.

Similarly, the change to "builtin/{fast-import,show-branch,tag}.c"
isn't needed as far as the compiler is concerned, but since they all
use the "DATE_MODE()" macro we now define in date.h, let's have them
include it.

We could simply include this new header in "cache.h", but as this
change shows these functions weren't common enough to warrant
including in it in the first place. By moving them out of cache.h
changes to this API will no longer cause a (mostly) full re-build of
the project when "make" is run.

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>Merge branch 'pw/rebase-i-more-options'</title>
<updated>2020-09-03T19:37:01Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2020-09-03T19:37:01Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=9c31b19dd00981fcea435de1cd05eab179039a8d'/>
<id>urn:sha1:9c31b19dd00981fcea435de1cd05eab179039a8d</id>
<content type='text'>
"git rebase -i" learns a bit more options.

* pw/rebase-i-more-options:
  t3436: do not run git-merge-recursive in dashed form
  rebase: add --reset-author-date
  rebase -i: support --ignore-date
  rebase -i: support --committer-date-is-author-date
  am: stop exporting GIT_COMMITTER_DATE
  rebase -i: add --ignore-whitespace flag
</content>
</entry>
<entry>
<title>ident: say whose identity is missing when giving user.name hint</title>
<updated>2020-08-21T22:35:47Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2020-08-21T20:36:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=9ed104e5cacdc44f2fe7c2b1fdeada94622ca4e9'/>
<id>urn:sha1:9ed104e5cacdc44f2fe7c2b1fdeada94622ca4e9</id>
<content type='text'>
If `user.name` and `user.email` have not been configured and the
user invokes:

    git commit --author=...

without specifying the committer identity, then Git errors out with
a message asking the user to configure `user.name` and `user.email`
but doesn't tell the user which attribution was missing. This can be
confusing for a user new to Git who isn't aware of the distinction
between user, author, and committer.

Give such users a bit more help by extending the error message to
also say which attribution is expected.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>am: stop exporting GIT_COMMITTER_DATE</title>
<updated>2020-08-17T18:58:37Z</updated>
<author>
<name>Phillip Wood</name>
<email>phillip.wood@dunelm.org.uk</email>
</author>
<published>2020-08-17T17:40:01Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=e8cbe2118a8e3c1aa71ed8d93f96001decebde1d'/>
<id>urn:sha1:e8cbe2118a8e3c1aa71ed8d93f96001decebde1d</id>
<content type='text'>
The implementation of --committer-date-is-author-date exports
GIT_COMMITTER_DATE to override the default committer date but does not
reset GIT_COMMITTER_DATE in the environment after creating the commit
so it is set in the environment of any hooks that get run. We're about
to add the same functionality to the sequencer and do not want to have
GIT_COMMITTER_DATE set when running hooks or exec commands so lets
update commit_tree_extended() to take an explicit committer so we
override the default date without setting GIT_COMMITTER_DATE in the
environment.

Signed-off-by: Phillip Wood &lt;phillip.wood@dunelm.org.uk&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'ps/stash-in-c'</title>
<updated>2019-04-22T02:14:43Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2019-04-22T02:14:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=e36adf712251a19bd2ada0016764d340dfcf2ba0'/>
<id>urn:sha1:e36adf712251a19bd2ada0016764d340dfcf2ba0</id>
<content type='text'>
"git stash" rewritten in C.

* ps/stash-in-c: (28 commits)
  tests: add a special setup where stash.useBuiltin is off
  stash: optionally use the scripted version again
  stash: add back the original, scripted `git stash`
  stash: convert `stash--helper.c` into `stash.c`
  stash: replace all `write-tree` child processes with API calls
  stash: optimize `get_untracked_files()` and `check_changes()`
  stash: convert save to builtin
  stash: make push -q quiet
  stash: convert push to builtin
  stash: convert create to builtin
  stash: convert store to builtin
  stash: convert show to builtin
  stash: convert list to builtin
  stash: convert pop to builtin
  stash: convert branch to builtin
  stash: convert drop and clear to builtin
  stash: convert apply to builtin
  stash: mention options in `show` synopsis
  stash: add tests for `git stash show` config
  stash: rename test cases to be more descriptive
  ...
</content>
</entry>
</feed>
