<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/diffcore-order.c, branch v2.46.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.46.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.46.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2023-06-21T20:39:54Z</updated>
<entry>
<title>git-compat-util.h: remove unneccessary include of wildmatch.h</title>
<updated>2023-06-21T20:39:54Z</updated>
<author>
<name>Elijah Newren</name>
<email>newren@gmail.com</email>
</author>
<published>2023-05-16T06:34:03Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=dd77d587954bd798d0ea6b26f0815ed2d78d47b9'/>
<id>urn:sha1:dd77d587954bd798d0ea6b26f0815ed2d78d47b9</id>
<content type='text'>
The include of wildmatch.h in git-compat-util.h was added in cebcab189aa
(Makefile: add USE_WILDMATCH to use wildmatch as fnmatch, 2013-01-01) as
a way to be able to compile-time force any calls to fnmatch() to instead
invoke wildmatch().  The defines and inline function were removed in
70a8fc999d9 (stop using fnmatch (either native or compat), 2014-02-15),
and this include in git-compat-util.h has been unnecessary ever since.

Remove the include from git-compat-util.h, but add it to the .c files
that had omitted the direct #include they needed.

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>treewide: replace cache.h with more direct headers, where possible</title>
<updated>2023-02-24T01:25:30Z</updated>
<author>
<name>Elijah Newren</name>
<email>newren@gmail.com</email>
</author>
<published>2023-02-24T00:09:34Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=fc7bd51b06424694c2e3dd97c11fa095d84d52b1'/>
<id>urn:sha1:fc7bd51b06424694c2e3dd97c11fa095d84d52b1</id>
<content type='text'>
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>wildmatch: remove unused wildopts parameter</title>
<updated>2017-06-24T01:27:07Z</updated>
<author>
<name>Ævar Arnfjörð Bjarmason</name>
<email>avarab@gmail.com</email>
</author>
<published>2017-06-22T21:38:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=55d3426929d4d8c3dec402cabe6fb1bf27d6abad'/>
<id>urn:sha1:55d3426929d4d8c3dec402cabe6fb1bf27d6abad</id>
<content type='text'>
Remove the unused wildopts placeholder struct from being passed to all
wildmatch() invocations, or rather remove all the boilerplate NULL
parameters.

This parameter was added back in commit 9b3497cab9 ("wildmatch: rename
constants and update prototype", 2013-01-01) as a placeholder for
future use. Over 4 years later nothing has made use of it, let's just
remove it. It can be added in the future if we find some reason to
start using such a parameter.

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 QSORT</title>
<updated>2016-09-29T22:42:18Z</updated>
<author>
<name>René Scharfe</name>
<email>l.s.r@web.de</email>
</author>
<published>2016-09-29T15:27:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=9ed0d8d6e6de7737fe9a658446318b86e57c6fad'/>
<id>urn:sha1:9ed0d8d6e6de7737fe9a658446318b86e57c6fad</id>
<content type='text'>
Apply the semantic patch contrib/coccinelle/qsort.cocci to the code
base, replacing calls of qsort(3) with QSORT.  The resulting code is
shorter and supports empty arrays with NULL pointers.

Signed-off-by: Rene Scharfe &lt;l.s.r@web.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>convert trivial cases to ALLOC_ARRAY</title>
<updated>2016-02-22T22:51:09Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2016-02-22T22:44:25Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b32fa95fd8293ebfecb2b7b6c8d460579318f9fe'/>
<id>urn:sha1:b32fa95fd8293ebfecb2b7b6c8d460579318f9fe</id>
<content type='text'>
Each of these cases can be converted to use ALLOC_ARRAY or
REALLOC_ARRAY, which has two advantages:

  1. It automatically checks the array-size multiplication
     for overflow.

  2. It always uses sizeof(*array) for the element-size,
     so that it can never go out of sync with the declared
     type of the array.

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 'nd/no-more-fnmatch'</title>
<updated>2014-03-14T21:25:31Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2014-03-14T21:25:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=650c90a18506ce05e2be349d83fe1cef3dc7f8cb'/>
<id>urn:sha1:650c90a18506ce05e2be349d83fe1cef3dc7f8cb</id>
<content type='text'>
We started using wildmatch() in place of fnmatch(3); complete the
process and stop using fnmatch(3).

* nd/no-more-fnmatch:
  actually remove compat fnmatch source code
  stop using fnmatch (either native or compat)
  Revert "test-wildmatch: add "perf" command to compare wildmatch and fnmatch"
  use wildmatch() directly without fnmatch() wrapper
</content>
</entry>
<entry>
<title>diffcore-order: export generic ordering interface</title>
<updated>2014-02-24T22:44:57Z</updated>
<author>
<name>Kirill Smelkov</name>
<email>kirr@mns.spb.ru</email>
</author>
<published>2014-01-20T16:20:38Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=1df4320fa25d3784b035936b35725460d46f1ca0'/>
<id>urn:sha1:1df4320fa25d3784b035936b35725460d46f1ca0</id>
<content type='text'>
diffcore_order() interface only accepts a queue of `struct
diff_filepair`.

In the next patches, we'll want to order `struct combine_diff_path`
by path, so let's first rework diffcore-order to also provide
generic low-level interface for ordering arbitrary objects, provided
they have path accessors.

The new interface is:

    - `struct obj_order`    for describing objects to ordering routine, and
    - order_objects()       for actually doing the ordering work.

Signed-off-by: Kirill Smelkov &lt;kirr@mns.spb.ru&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>use wildmatch() directly without fnmatch() wrapper</title>
<updated>2014-02-20T22:15:46Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2014-02-15T02:01:46Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=eb07894fe036566acccb71420ab79ccb9c9e2d66'/>
<id>urn:sha1:eb07894fe036566acccb71420ab79ccb9c9e2d66</id>
<content type='text'>
Make it clear that we don't use fnmatch() anymore.

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 'sb/diff-orderfile-config'</title>
<updated>2014-01-10T18:32:42Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2014-01-10T18:32:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=2da5cbd651114569b1a25d9b73c0e2afffb30aa7'/>
<id>urn:sha1:2da5cbd651114569b1a25d9b73c0e2afffb30aa7</id>
<content type='text'>
Allow "git diff -O&lt;file&gt;" to be configured with a new configuration
variable.

* sb/diff-orderfile-config:
  diff: add diff.orderfile configuration variable
  diff: let "git diff -O" read orderfile from any file and fail properly
  t4056: add new tests for "git diff -O"
</content>
</entry>
<entry>
<title>diff: let "git diff -O" read orderfile from any file and fail properly</title>
<updated>2013-12-19T00:29:05Z</updated>
<author>
<name>Samuel Bronson</name>
<email>naesten@gmail.com</email>
</author>
<published>2013-12-19T00:08:11Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=a21bae33d9e13c59217639b866355f1a02211a2c'/>
<id>urn:sha1:a21bae33d9e13c59217639b866355f1a02211a2c</id>
<content type='text'>
The -O flag really shouldn't silently fail to do anything when given
a path that it can't read from.

However, it should be able to read from un-mmappable files, such as:

 * pipes/fifos

 * /dev/null:  It's a character device (at least on Linux)

 * ANY empty file:

   Quoting Linux mmap(2), "SUSv3 specifies that mmap() should fail if
   length is 0.  However, in kernels before 2.6.12, mmap() succeeded in
   this case: no mapping was created and the call returned addr.  Since
   kernel 2.6.12, mmap() fails with the error EINVAL for this case."

We especially want "-O/dev/null" to work, since we will be documenting
it as the way to cancel "diff.orderfile" when we add that.

(Note: "-O/dev/null" did have the right effect, since the existing error
handling essentially worked out to "silently ignore the orderfile".  But
this was probably more coincidence than anything else.)

So, lets toss all of that logic to get the file mmapped and just use
strbuf_read_file() instead, which gives us decent error handling
practically for free.

Signed-off-by: Samuel Bronson &lt;naesten@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
