<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/add-interactive.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-12-13T13:16:23Z</updated>
<entry>
<title>diff: mark unused parameters in callbacks</title>
<updated>2022-12-13T13:16:23Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2022-12-13T11:13:48Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=61bdc7c5d8b1dedc5f9c3af45c5738d14136ae90'/>
<id>urn:sha1:61bdc7c5d8b1dedc5f9c3af45c5738d14136ae90</id>
<content type='text'>
The diff code provides a format_callback interface, but not every
callback needs each parameter (e.g., the "opt" and "data" parameters are
frequently left unused). Likewise for the output_prefix callback, the
low-level change/add_remove interfaces, the callbacks used by
xdi_diff(), etc.

Mark unused arguments in the callback implementations to quiet
-Wunused-parameter.

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>read-cache API &amp; users: make discard_index() return void</title>
<updated>2022-11-21T03:06:15Z</updated>
<author>
<name>Ævar Arnfjörð Bjarmason</name>
<email>avarab@gmail.com</email>
</author>
<published>2022-11-19T13:07:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=9c5f3ee3b3a04182cc22630e9eb9fad95bd57fd7'/>
<id>urn:sha1:9c5f3ee3b3a04182cc22630e9eb9fad95bd57fd7</id>
<content type='text'>
The discard_index() function has not returned non-zero since
7a51ed66f65 (Make on-disk index representation separate from in-core
one, 2008-01-14), but we've had various code in-tree still acting as
though that might be the case.

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>use child_process members "args" and "env" directly</title>
<updated>2022-10-30T18:04:40Z</updated>
<author>
<name>René Scharfe</name>
<email>l.s.r@web.de</email>
</author>
<published>2022-10-30T11:51:14Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=0e90673957f12adc1a84b13d3dfff02151e4a7a8'/>
<id>urn:sha1:0e90673957f12adc1a84b13d3dfff02151e4a7a8</id>
<content type='text'>
Build argument list and environment of child processes by using
struct child_process and populating its members "args" and "env"
directly instead of maintaining separate strvecs and letting
run_command_v_opt() and friends populate these members.  This is
simpler, shorter and slightly more efficient.

Signed-off-by: René Scharfe &lt;l.s.r@web.de&gt;
Signed-off-by: Taylor Blau &lt;me@ttaylorr.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>hashmap: 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:46Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=02c3c59e62a30771d209a171edfc75a4d7387ebe'/>
<id>urn:sha1:02c3c59e62a30771d209a171edfc75a4d7387ebe</id>
<content type='text'>
Hashmap comparison functions must conform to a particular callback
interface, but many don't use all of their parameters. Especially the
void cmp_data pointer, but some do not use keydata either (because they
can easily form a full struct to pass when doing lookups). Let's mark
these to make -Wunused-parameter happy.

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>Merge branch 'js/add-i-delete'</title>
<updated>2022-07-03T04:56:08Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2022-07-03T04:56:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=0f0bc2124b25476504e7215dc2af92d5748ad327'/>
<id>urn:sha1:0f0bc2124b25476504e7215dc2af92d5748ad327</id>
<content type='text'>
Rewrite of "git add -i" in C that appeared in Git 2.25 didn't
correctly record a removed file to the index, which was fixed.

* js/add-i-delete:
  add --interactive: allow `update` to stage deleted files
</content>
</entry>
<entry>
<title>add --interactive: allow `update` to stage deleted files</title>
<updated>2022-06-28T22:37:50Z</updated>
<author>
<name>Johannes Schindelin</name>
<email>johannes.schindelin@gmx.de</email>
</author>
<published>2022-06-28T22:22:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=4788e8b25692a8ae1a005554d3ad12f8ee4ee29e'/>
<id>urn:sha1:4788e8b25692a8ae1a005554d3ad12f8ee4ee29e</id>
<content type='text'>
The scripted version of `git add -i` used `git update-index --add
--remove`, but the built-in version implemented only the `--add` part.

This fixes https://github.com/msys2/MSYS2-packages/issues/3066

Reported-by: Christoph Reiter &lt;reiter.christoph@gmail.com&gt;
Signed-off-by: Johannes Schindelin &lt;johannes.schindelin@gmx.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>revisions API: have release_revisions() release "prune_data"</title>
<updated>2022-04-14T06:56:09Z</updated>
<author>
<name>Ævar Arnfjörð Bjarmason</name>
<email>avarab@gmail.com</email>
</author>
<published>2022-04-13T20:01:50Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=689a8e80dd4f7b3a20be88146bdea833c7759603'/>
<id>urn:sha1:689a8e80dd4f7b3a20be88146bdea833c7759603</id>
<content type='text'>
Extend the the release_revisions() function so that it frees the
"prune_data" in the "struct rev_info". This means that any code that
calls "release_revisions()" already can get rid of adjacent calls to
clear_pathspec().

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>revisions API users: add straightforward release_revisions()</title>
<updated>2022-04-14T06:56:08Z</updated>
<author>
<name>Ævar Arnfjörð Bjarmason</name>
<email>avarab@gmail.com</email>
</author>
<published>2022-04-13T20:01:36Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=2108fe4a1976f95821e13503fd331f075da398c6'/>
<id>urn:sha1:2108fe4a1976f95821e13503fd331f075da398c6</id>
<content type='text'>
Add a release_revisions() to various users of "struct rev_list" in
those straightforward cases where we only need to add the
release_revisions() call to the end of a block, and don't need to
e.g. refactor anything to use a "goto cleanup" pattern.

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/single-key-interactive'</title>
<updated>2022-03-21T22:14:24Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2022-03-21T22:14:24Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=214919b4f6a4ef69406d9383038f2a1a75476032'/>
<id>urn:sha1:214919b4f6a4ef69406d9383038f2a1a75476032</id>
<content type='text'>
The single-key interactive operation used by "git add -p" has been
made more robust.

* pw/single-key-interactive:
  add -p: disable stdin buffering when interactive.singlekey is set
  terminal: set VMIN and VTIME in non-canonical mode
  terminal: pop signal handler when terminal is restored
  terminal: always reset terminal when reading without echo
</content>
</entry>
</feed>
