<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/string-list.c, branch v2.13.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.13.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.13.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2017-06-13T20:27:00Z</updated>
<entry>
<title>Merge branch 'bw/forking-and-threading' into maint</title>
<updated>2017-06-13T20:27:00Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2017-06-13T20:26:59Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=e350625b68cf747e4933239735ceb111f4375a83'/>
<id>urn:sha1:e350625b68cf747e4933239735ceb111f4375a83</id>
<content type='text'>
The "run-command" API implementation has been made more robust
against dead-locking in a threaded environment.

* bw/forking-and-threading:
  usage.c: drop set_error_handle()
  run-command: restrict PATH search to executable files
  run-command: expose is_executable function
  run-command: block signals between fork and execve
  run-command: add note about forking and threading
  run-command: handle dup2 and close errors in child
  run-command: eliminate calls to error handling functions in child
  run-command: don't die in child when duping /dev/null
  run-command: prepare child environment before forking
  string-list: add string_list_remove function
  run-command: use the async-signal-safe execv instead of execvp
  run-command: prepare command before forking
  t0061: run_command executes scripts without a #! line
  t5550: use write_script to generate post-update hook
</content>
</entry>
<entry>
<title>Merge branch 'jh/string-list-micro-optim'</title>
<updated>2017-04-24T05:07:47Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2017-04-24T05:07:47Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=8b6bba66633cf16807ae962e0b1126af164f0e78'/>
<id>urn:sha1:8b6bba66633cf16807ae962e0b1126af164f0e78</id>
<content type='text'>
The string-list API used a custom reallocation strategy that was
very inefficient, instead of using the usual ALLOC_GROW() macro,
which has been fixed.

* jh/string-list-micro-optim:
  string-list: use ALLOC_GROW macro when reallocing string_list
</content>
</entry>
<entry>
<title>string-list: add string_list_remove function</title>
<updated>2017-04-21T00:55:32Z</updated>
<author>
<name>Brandon Williams</name>
<email>bmwill@google.com</email>
</author>
<published>2017-04-19T23:13:21Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=3a30033327337323e91dcbcb87396d3245260585'/>
<id>urn:sha1:3a30033327337323e91dcbcb87396d3245260585</id>
<content type='text'>
Teach string-list to be able to remove a string from a sorted
'struct string_list'.

Signed-off-by: Brandon Williams &lt;bmwill@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>string-list: use ALLOC_GROW macro when reallocing string_list</title>
<updated>2017-04-15T09:04:41Z</updated>
<author>
<name>Jeff Hostetler</name>
<email>jeffhost@microsoft.com</email>
</author>
<published>2017-04-14T19:51:52Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=950a234cbd781021d69fcfaa40ab6fd258b1d917'/>
<id>urn:sha1:950a234cbd781021d69fcfaa40ab6fd258b1d917</id>
<content type='text'>
Use ALLOC_GROW() macro when reallocing a string_list array
rather than simply increasing it by 32.  This is a performance
optimization.

During status on a very large repo and there are many changes,
a significant percentage of the total run time is spent
reallocing the wt_status.changes array.

This change decreases the time in wt_status_collect_changes_worktree()
from 125 seconds to 45 seconds on my very large repository.

This produced a modest gain on my 1M file artificial repo, but
broke even on linux.git.

Test                                            HEAD^^            HEAD
---------------------------------------------------------------------------------------
0005.2: read-tree status br_ballast (1000001)   8.29(5.62+2.62)   8.22(5.57+2.63) -0.8%

Signed-off-by: Jeff Hostetler &lt;jeffhost@microsoft.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>string-list: use QSORT_S in string_list_sort()</title>
<updated>2017-01-23T19:02:38Z</updated>
<author>
<name>René Scharfe</name>
<email>l.s.r@web.de</email>
</author>
<published>2017-01-22T17:57:09Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=5ebd9472a490b12ff941b8085b1b0932a755ffcc'/>
<id>urn:sha1:5ebd9472a490b12ff941b8085b1b0932a755ffcc</id>
<content type='text'>
Pass the comparison function to cmp_items() via the context parameter of
qsort_s() instead of using a global variable.  That allows calling
string_list_sort() from multiple parallel threads.

Our qsort_s() in compat/ is slightly slower than qsort(1) from glibc
2.24 for sorting lots of lines:

Test                         HEAD^             HEAD
---------------------------------------------------------------------
0071.2: sort(1)              0.10(0.22+0.01)   0.09(0.21+0.00) -10.0%
0071.3: string_list_sort()   0.16(0.15+0.01)   0.17(0.15+0.00) +6.3%

GNU sort(1) version 8.26 is significantly faster because it uses
multiple parallel threads; with the unportable option --parallel=1 it
becomes slower:

Test                         HEAD^             HEAD
--------------------------------------------------------------------
0071.2: sort(1)              0.21(0.18+0.01)   0.20(0.18+0.01) -4.8%
0071.3: string_list_sort()   0.16(0.13+0.02)   0.17(0.15+0.01) +6.3%

There is some instability -- the numbers for the sort(1) check shouldn't
be affected by this patch.  Anyway, the performance of our qsort_s()
implementation is apparently good enough, at least for this test.

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>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>string_list: use string-list API in unsorted_string_list_lookup()</title>
<updated>2016-04-25T18:48:27Z</updated>
<author>
<name>Ralf Thielow</name>
<email>ralf.thielow@gmail.com</email>
</author>
<published>2016-04-25T17:40:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=d16df0c062e45cbaf42b99963d90c77a0ec9b7df'/>
<id>urn:sha1:d16df0c062e45cbaf42b99963d90c77a0ec9b7df</id>
<content type='text'>
Using the string-list API in function unsorted_string_list_lookup()
makes the code more readable.

Signed-off-by: Ralf Thielow &lt;ralf.thielow@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 'sb/string-list'</title>
<updated>2014-12-22T20:27:30Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2014-12-22T20:27:29Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=12b9f08953f4f558789f833b0fe438c25ce6d4b1'/>
<id>urn:sha1:12b9f08953f4f558789f833b0fe438c25ce6d4b1</id>
<content type='text'>
API simplification.

* sb/string-list:
  string_list: remove string_list_insert_at_index() from its API
  mailmap: use higher level string list functions
  string_list: document string_list_(insert,lookup)
</content>
</entry>
<entry>
<title>string_list: remove string_list_insert_at_index() from its API</title>
<updated>2014-12-04T23:10:27Z</updated>
<author>
<name>Stefan Beller</name>
<email>sbeller@google.com</email>
</author>
<published>2014-11-24T21:22:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=f8c4ab611ac5b714b6b4fd296c59512f97f87195'/>
<id>urn:sha1:f8c4ab611ac5b714b6b4fd296c59512f97f87195</id>
<content type='text'>
There no longer is a caller to this function.

Signed-off-by: Stefan Beller &lt;sbeller@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>sort_string_list(): rename to string_list_sort()</title>
<updated>2014-11-25T18:11:34Z</updated>
<author>
<name>Michael Haggerty</name>
<email>mhagger@alum.mit.edu</email>
</author>
<published>2014-11-25T08:02:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=3383e199847485fedf83d0fa38bbd5363074093a'/>
<id>urn:sha1:3383e199847485fedf83d0fa38bbd5363074093a</id>
<content type='text'>
The new name is more consistent with the names of other
string_list-related functions.

Suggested-by: Junio C Hamano &lt;gitster@pobox.com&gt;
Signed-off-by: Michael Haggerty &lt;mhagger@alum.mit.edu&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
