<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/string-list.h, branch v2.35.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.35.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.35.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2021-09-28T21:43:38Z</updated>
<entry>
<title>string-list.[ch]: remove string_list_init() compatibility function</title>
<updated>2021-09-28T21:43:38Z</updated>
<author>
<name>Ævar Arnfjörð Bjarmason</name>
<email>avarab@gmail.com</email>
</author>
<published>2021-09-28T12:49:45Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=abf897bacd2d36b9dbd07c70b4a2f97a084704ee'/>
<id>urn:sha1:abf897bacd2d36b9dbd07c70b4a2f97a084704ee</id>
<content type='text'>
Remove this function left over to accommodate in-flight changes, see
770fedaf9fb (string-list.[ch]: add a string_list_init_{nodup,dup}(),
2021-07-01) for the recent change to add
"string_list_init_{nodup,dup}()" initializers.

There was only one user of the API left in remote-curl.c. I don't know
why I didn't include this change to remote-curl.c in
bc40dfb10a0 (string-list.h users: change to use *_{nodup,dup}(),
2021-07-01), perhaps I just missed it.

In any case, let's change that one user to use the new API, as of
writing this there are no in-flight changes that use, so this seems
like a good time to drop this before we get any new users of this
compatibility API.

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>string-list.[ch]: add a string_list_init_{nodup,dup}()</title>
<updated>2021-07-01T19:32:22Z</updated>
<author>
<name>Ævar Arnfjörð Bjarmason</name>
<email>avarab@gmail.com</email>
</author>
<published>2021-07-01T10:51:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=770fedaf9fb156bd8c18da41770eac0cb63fba63'/>
<id>urn:sha1:770fedaf9fb156bd8c18da41770eac0cb63fba63</id>
<content type='text'>
In order to use the new "memcpy() a 'blank' struct on the stack"
pattern for string_list_init(), and to make the macro initialization
consistent with the function initialization introduce two new
string_list_init_{nodup,dup}() functions. These are like the old
string_list_init() when called with a false and true second argument,
respectively.

I think this not only makes things more consistent, but also easier to
read. I often had to lookup what the ", 0)" or ", 1)" in these
invocations meant, now it's right there in the function name, and
corresponds to the macros.

A subsequent commit will convert existing API users to this pattern,
but as this is a very common API let's leave a compatibility function
in place for later removal. This intermediate state also proves that
the compatibility function works.

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>*.h: move some *_INIT to designated initializers</title>
<updated>2021-07-01T19:31:45Z</updated>
<author>
<name>Ævar Arnfjörð Bjarmason</name>
<email>avarab@gmail.com</email>
</author>
<published>2021-07-01T10:51:25Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=3d97ea479fdcb88671105e2f2d04064bab110bd5'/>
<id>urn:sha1:3d97ea479fdcb88671105e2f2d04064bab110bd5</id>
<content type='text'>
Move *_INIT macros I'll use in a subsequent commits to designated
initializers. This isn't required for those follow-up changes, but
since next commits will change things in this area, let's use the
modern pattern over the old one while we're at it.

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 'en/string-list-can-be-custom-sorted'</title>
<updated>2020-01-22T23:07:31Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2020-01-22T23:07:30Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=1f10b84e43cbcf50715b6effd858530e14626952'/>
<id>urn:sha1:1f10b84e43cbcf50715b6effd858530e14626952</id>
<content type='text'>
API-doc update.

* en/string-list-can-be-custom-sorted:
  string-list: note in docs that callers can specify sorting function
</content>
</entry>
<entry>
<title>string-list: note in docs that callers can specify sorting function</title>
<updated>2020-01-07T17:12:36Z</updated>
<author>
<name>Elijah Newren</name>
<email>newren@gmail.com</email>
</author>
<published>2020-01-07T15:07:30Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=065027ee1a7b3ecc45b6d331983d38642835c451'/>
<id>urn:sha1:065027ee1a7b3ecc45b6d331983d38642835c451</id>
<content type='text'>
In commit 1959bf6430 (string_list API: document what "sorted" means,
2012-09-17), Documentation/technical/api-string-list.txt was updated to
specify that strcmp() was used for sorting.  In commit 8dd5afc926
(string-list: allow case-insensitive string list, 2013-01-07), a cmp
member was added to struct string_list to allow callers to specify an
alternative comparison function, but api-string-list.txt was not
updated.  In commit 4f665f2cf3 (string-list.h: move documentation from
Documentation/api/ into header, 2017-09-26), the now out-dated
api-string-list.txt documentation was moved into string-list.h.  Update
the docs to reflect the configurability of sorting.

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>Fix spelling errors in code comments</title>
<updated>2019-11-10T07:00:54Z</updated>
<author>
<name>Elijah Newren</name>
<email>newren@gmail.com</email>
</author>
<published>2019-11-05T17:07:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=15beaaa3d1f6b555900446deb5e376b4f806d734'/>
<id>urn:sha1:15beaaa3d1f6b555900446deb5e376b4f806d734</id>
<content type='text'>
Reported-by: Jens Schleusener &lt;Jens.Schleusener@fossies.org&gt;
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>*.[ch]: manually align parameter lists</title>
<updated>2019-05-05T06:20:10Z</updated>
<author>
<name>Denton Liu</name>
<email>liu.denton@gmail.com</email>
</author>
<published>2019-04-29T08:28:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ad6dad0996f9226b2c3a5a3c725bf2952e52d7e7'/>
<id>urn:sha1:ad6dad0996f9226b2c3a5a3c725bf2952e52d7e7</id>
<content type='text'>
In previous patches, extern was mechanically removed from function
declarations without care to formatting, causing parameter lists to be
misaligned. Manually format changed sections such that the parameter
lists should be realigned.

Viewing this patch with 'git diff -w' should produce no output.

Signed-off-by: Denton Liu &lt;liu.denton@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>*.[ch]: remove extern from function declarations using spatch</title>
<updated>2019-05-05T06:20:06Z</updated>
<author>
<name>Denton Liu</name>
<email>liu.denton@gmail.com</email>
</author>
<published>2019-04-29T08:28:14Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=554544276a604c144df45efcb060c80aa322088c'/>
<id>urn:sha1:554544276a604c144df45efcb060c80aa322088c</id>
<content type='text'>
There has been a push to remove extern from function declarations.
Remove some instances of "extern" for function declarations which are
caught by Coccinelle. Note that Coccinelle has some difficulty with
processing functions with `__attribute__` or varargs so some `extern`
declarations are left behind to be dealt with in a future patch.

This was the Coccinelle patch used:

	@@
	type T;
	identifier f;
	@@
	- extern
	  T f(...);

and it was run with:

	$ git ls-files \*.{c,h} |
		grep -v ^compat/ |
		xargs spatch --sp-file contrib/coccinelle/noextern.cocci --in-place

Files under `compat/` are intentionally excluded as some are directly
copied from external sources and we should avoid churning them as much
as possible.

Signed-off-by: Denton Liu &lt;liu.denton@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>string-list: remove unused function print_string_list</title>
<updated>2018-09-11T19:27:58Z</updated>
<author>
<name>Stefan Beller</name>
<email>sbeller@google.com</email>
</author>
<published>2018-09-11T18:48:50Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=0597dd62ba428dd02b2bf280ede4cdb0b2e318c0'/>
<id>urn:sha1:0597dd62ba428dd02b2bf280ede4cdb0b2e318c0</id>
<content type='text'>
A removal of this helper function was proposed 3 years ago [1]; the
function was never used since it was introduced in 2006 back then,
and there is no new callers since.  Now time has proven we really do
not need the function.

[1] https://public-inbox.org/git/1421343725-3973-1-git-send-email-kuleshovmail@gmail.com/

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>string-list.h: move documentation from Documentation/api/ into header</title>
<updated>2017-09-27T00:14:34Z</updated>
<author>
<name>Han-Wen Nienhuys</name>
<email>hanwen@google.com</email>
</author>
<published>2017-09-26T11:21:50Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=4f665f2cf3374db615bd094269e5dd6eb0811006'/>
<id>urn:sha1:4f665f2cf3374db615bd094269e5dd6eb0811006</id>
<content type='text'>
This mirrors commit 'bdfdaa497 ("strbuf.h: integrate api-strbuf.txt
documentation, 2015-01-16") which did the same for strbuf.h:

* API documentation uses /** */ to set it apart from other comments.

* Function names were stripped from the comments.

* Ordering of the header was adjusted to follow the one from the text
  file.

* Edited some existing comments from string-list.h for consistency.

Signed-off-by: Han-Wen Nienhuys &lt;hanwen@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
