<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/apply.c, branch v2.24.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.24.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.24.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2019-10-15T04:48:02Z</updated>
<entry>
<title>Merge branch 'tg/range-diff-output-update'</title>
<updated>2019-10-15T04:48:02Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2019-10-15T04:48:02Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b6d712fa4e11e51e479b9e25090afff85e5d710a'/>
<id>urn:sha1:b6d712fa4e11e51e479b9e25090afff85e5d710a</id>
<content type='text'>
"git range-diff" failed to handle mode-only change, which has been
corrected.

* tg/range-diff-output-update:
  range-diff: don't segfault with mode-only changes
</content>
</entry>
<entry>
<title>range-diff: don't segfault with mode-only changes</title>
<updated>2019-10-09T01:41:11Z</updated>
<author>
<name>Thomas Gummerer</name>
<email>t.gummerer@gmail.com</email>
</author>
<published>2019-10-08T17:38:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=2b6a9b13ca4a687aeb0cad5f32e49711b3e67aaa'/>
<id>urn:sha1:2b6a9b13ca4a687aeb0cad5f32e49711b3e67aaa</id>
<content type='text'>
In ef283b3699 ("apply: make parse_git_diff_header public", 2019-07-11)
the 'parse_git_diff_header' function was made public and useable by
callers outside of apply.c.

However it was missed that its (then) only caller, 'find_header' did
some error handling, and completing 'struct patch' appropriately.

range-diff then started using this function, and tried to handle this
appropriately itself, but fell short in some cases.  This in turn
would lead to range-diff segfaulting when there are mode-only changes
in a range.

Move the error handling and completing of the struct into the
'parse_git_diff_header' function, so other callers can take advantage
of it.  This fixes the segfault in 'git range-diff'.

Reported-by: Uwe Kleine-KÃ¶nig &lt;u.kleine-koenig@pengutronix.de&gt;
Signed-off-by: Thomas Gummerer &lt;t.gummerer@gmail.com&gt;
Acked-by: Johannes Schindelin &lt;johannes.schindelin@gmx.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'bc/reread-attributes-during-rebase'</title>
<updated>2019-09-09T19:26:40Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2019-09-09T19:26:40Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=c8ada15456f951913dbf628a7c441032e90b8e11'/>
<id>urn:sha1:c8ada15456f951913dbf628a7c441032e90b8e11</id>
<content type='text'>
The "git am" based backend of "git rebase" ignored the result of
updating ".gitattributes" done in one step when replaying
subsequent steps.

* bc/reread-attributes-during-rebase:
  am: reload .gitattributes after patching it
  path: add a function to check for path suffix
</content>
</entry>
<entry>
<title>am: reload .gitattributes after patching it</title>
<updated>2019-09-03T22:16:18Z</updated>
<author>
<name>brian m. carlson</name>
<email>sandals@crustytoothpaste.net</email>
</author>
<published>2019-09-02T22:39:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=2c65d90f7579a0e2a6460eebce44795587e87043'/>
<id>urn:sha1:2c65d90f7579a0e2a6460eebce44795587e87043</id>
<content type='text'>
When applying multiple patches with git am, or when rebasing using the
am backend, it's possible that one of our patches has updated a
gitattributes file. Currently, we cache this information, so if a
file in a subsequent patch has attributes applied, the file will be
written out with the attributes in place as of the time we started the
rebase or am operation, not with the attributes applied by the previous
patch. This problem does not occur when using the -m or -i flags to
rebase.

To ensure we write the correct data into the working tree, expire the
cache after each patch that touches a path ending in ".gitattributes".
Since we load these attributes in multiple separate files, we must
expire them accordingly.

Verify that both the am and rebase code paths work correctly, including
the conflict marker size with am -3.

Signed-off-by: brian m. carlson &lt;sandals@crustytoothpaste.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>apply: make parse_git_diff_header public</title>
<updated>2019-07-11T21:29:27Z</updated>
<author>
<name>Thomas Gummerer</name>
<email>t.gummerer@gmail.com</email>
</author>
<published>2019-07-11T16:08:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ef283b3699f91c9138753946dd53bec55289498a'/>
<id>urn:sha1:ef283b3699f91c9138753946dd53bec55289498a</id>
<content type='text'>
Make 'parse_git_header()' (renamed to 'parse_git_diff_header()') a
"public" function in apply.h, so we can re-use it in range-diff in a
subsequent commit.  We're renaming the function to make it clearer in
other parts of the codebase that we're talking about a diff header and
not just any header.

Signed-off-by: Thomas Gummerer &lt;t.gummerer@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>apply: only pass required data to gitdiff_* functions</title>
<updated>2019-07-11T21:29:27Z</updated>
<author>
<name>Thomas Gummerer</name>
<email>t.gummerer@gmail.com</email>
</author>
<published>2019-07-11T16:08:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=80e184123202761a4be32be12be12f7ff469fe5b'/>
<id>urn:sha1:80e184123202761a4be32be12be12f7ff469fe5b</id>
<content type='text'>
Currently the 'gitdiff_*()' functions take 'struct apply_state' as
parameter, even though they only needs the root, linenr and p_value
from that struct.

These functions are in the callchain of 'parse_git_header()', which we
want to make more generally useful in a subsequent commit.  To make
that happen we only want to pass in the required data to
'parse_git_header()', and not the whole 'struct apply_state', and thus
we want functions in the callchain of 'parse_git_header()' to only
take arguments they really need.

As these functions are called in a loop using their function pointers,
each function needs to be passed all the parameters even if only one
of the functions actually needs it.  We therefore pass this data along
in a struct to avoid adding too many unused parameters to each
function and making the code very verbose in the process.

Signed-off-by: Thomas Gummerer &lt;t.gummerer@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>apply: only pass required data to find_name_*</title>
<updated>2019-07-09T18:29:03Z</updated>
<author>
<name>Thomas Gummerer</name>
<email>t.gummerer@gmail.com</email>
</author>
<published>2019-07-08T16:33:06Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=877a833b5126f9a06dad07db169b770f898cc7b9'/>
<id>urn:sha1:877a833b5126f9a06dad07db169b770f898cc7b9</id>
<content type='text'>
Currently the 'find_name_*()' functions take 'struct apply_state' as
parameter, even though they only need the 'root' member from that
struct.

These functions are in the callchain of 'parse_git_header()', which we
want to make more generally useful in a subsequent commit.  To make
that happen we only want to pass in the required data to
'parse_git_header()', and not the whole 'struct apply_state', and thus
we want functions in the callchain of 'parse_git_header()' to only
take arguments they really need.

Signed-off-by: Thomas Gummerer &lt;t.gummerer@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>apply: only pass required data to check_header_line</title>
<updated>2019-07-09T18:29:02Z</updated>
<author>
<name>Thomas Gummerer</name>
<email>t.gummerer@gmail.com</email>
</author>
<published>2019-07-08T16:33:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=570fe9911b6eb5c64f22a54eb3a7590b7ba5f854'/>
<id>urn:sha1:570fe9911b6eb5c64f22a54eb3a7590b7ba5f854</id>
<content type='text'>
Currently the 'check_header_line()' function takes 'struct
apply_state' as parameter, even though it only needs the linenr from
that struct.

This function is in the callchain of 'parse_git_header()', which we
want to make more generally useful in a subsequent commit.  To make
that happen we only want to pass in the required data to
'parse_git_header()', and not the whole 'struct apply_state', and thus
we want functions in the callchain of 'parse_git_header()' to only
take arguments they really need.

Signed-off-by: Thomas Gummerer &lt;t.gummerer@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>apply: only pass required data to git_header_name</title>
<updated>2019-07-09T18:29:02Z</updated>
<author>
<name>Thomas Gummerer</name>
<email>t.gummerer@gmail.com</email>
</author>
<published>2019-07-08T16:33:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=85c3713df5a48bbc7807fe9710fe8a22e65ea76b'/>
<id>urn:sha1:85c3713df5a48bbc7807fe9710fe8a22e65ea76b</id>
<content type='text'>
Currently the 'git_header_name()' function takes 'struct apply_state'
as parameter, even though it only needs the p_value from that struct.

This function is in the callchain of 'parse_git_header()', which we
want to make more generally useful in a subsequent commit.  To make
that happen we only want to pass in the required data to
'parse_git_header()', and not the whole 'struct apply_state', and thus
we want functions in the callchain of 'parse_git_header()' to only
take arguments they really need.

Signed-off-by: Thomas Gummerer &lt;t.gummerer@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>apply: only pass required data to skip_tree_prefix</title>
<updated>2019-07-09T18:29:02Z</updated>
<author>
<name>Thomas Gummerer</name>
<email>t.gummerer@gmail.com</email>
</author>
<published>2019-07-08T16:33:03Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=d6c88c4fdc1ce189e4abad56f9e3b16d2f831867'/>
<id>urn:sha1:d6c88c4fdc1ce189e4abad56f9e3b16d2f831867</id>
<content type='text'>
Currently the 'skip_tree_prefix()' function takes 'struct apply_state'
as parameter, even though it only needs the p_value from that struct.

This function is in the callchain of 'parse_git_header()', which we
want to make more generally useful in a subsequent commit.  To make
that happen we only want to pass in the required data to
'parse_git_header()', and not the whole 'struct apply_state', and thus
we want functions in the callchain of 'parse_git_header()' to only
take arguments they really need.

Signed-off-by: Thomas Gummerer &lt;t.gummerer@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
