<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/git.git/argv-array.h, branch v2.26.0-rc2</title>
<subtitle>Git
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/git.git/atom?h=v2.26.0-rc2</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/atom?h=v2.26.0-rc2'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/'/>
<updated>2019-11-18T06:21:29Z</updated>
<entry>
<title>argv-array: move doc to argv-array.h</title>
<updated>2019-11-18T06:21:29Z</updated>
<author>
<name>Heba Waly</name>
<email>heba.waly@gmail.com</email>
</author>
<published>2019-11-17T21:04:52Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=971b1f24a2190ebe288fc6544378941a0624bb95'/>
<id>urn:sha1:971b1f24a2190ebe288fc6544378941a0624bb95</id>
<content type='text'>
Move the documentation from Documentation/technical/api-argv-array.txt
to argv-array.h as it's easier for the developers to find the usage
information beside the code instead of looking for it in another doc file.

Also documentation/technical/api-argv-array.txt is removed because the
information it has is now redundant and it'll be hard to keep it up to
date and synchronized with the documentation in the header file.

Signed-off-by: Heba Waly &lt;heba.waly@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'ma/unpack-trees-free-msgs'</title>
<updated>2018-05-30T12:51:29Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2018-05-30T12:51:29Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=e47dbece39712567a36a096010c5c1223119f7e3'/>
<id>urn:sha1:e47dbece39712567a36a096010c5c1223119f7e3</id>
<content type='text'>
Leak plugging.

* ma/unpack-trees-free-msgs:
  unpack_trees_options: free messages when done
  argv-array: return the pushed string from argv_push*()
  merge-recursive: provide pair of `unpack_trees_{start,finish}()`
  merge: setup `opts` later in `checkout_fast_forward()`
</content>
</entry>
<entry>
<title>argv-array: return the pushed string from argv_push*()</title>
<updated>2018-05-22T02:58:50Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2018-05-21T14:54:27Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=342c513a4ae100354097a9ca99a080eeb7e70c0b'/>
<id>urn:sha1:342c513a4ae100354097a9ca99a080eeb7e70c0b</id>
<content type='text'>
Such an API change allows us to use an argv_array this way:

    struct argv_array to_free = ARGV_ARRAY_INIT;
    const char *msg;

    if (some condition) {
            msg = "constant string message";
            ... other logic ...
    } else {
            msg = argv_array_pushf(&amp;to_free, "format %s", var);
    }
    ... use "msg" ...
    ... do other things ...
    argv_array_clear(&amp;to_free);

Note that argv_array_pushl() and argv_array_pushv() are used to push
one or more strings with a single call, so we do not return any one
of these strings from these two functions in order to reduce the
chance to misuse the API.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
Signed-off-by: Martin Ågren &lt;martin.agren@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>argv_array: offer to split a string by whitespace</title>
<updated>2018-04-26T03:52:57Z</updated>
<author>
<name>Johannes Schindelin</name>
<email>johannes.schindelin@gmx.de</email>
</author>
<published>2018-04-25T09:53:57Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=c5aa6db64f6f43621568bb1fec9360c25dbd2749'/>
<id>urn:sha1:c5aa6db64f6f43621568bb1fec9360c25dbd2749</id>
<content type='text'>
This is a simple function that will interpret a string as a whitespace
delimited list of values, and add those values into the array.

Note: this function does not (yet) offer to split by arbitrary delimiters,
or keep empty values in case of runs of whitespace, or de-quote Unix shell
style. All fo this functionality can be added later, when and if needed.

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>argv-array: add detach function</title>
<updated>2016-02-22T22:50:32Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2016-02-22T22:44:15Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=b992657ed0e2720e20302b0ac8c210dff55950b2'/>
<id>urn:sha1:b992657ed0e2720e20302b0ac8c210dff55950b2</id>
<content type='text'>
The usual pattern for an argv array is to initialize it,
push in some strings, and then clear it when done. Very
occasionally, though, we must do other exotic things with
the memory, like freeing the list but keeping the strings.
Let's provide a detach function so that callers can make use
of our API to build up the array, and then take ownership of
it.

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>argv-array: implement argv_array_pushv()</title>
<updated>2015-06-15T19:40:49Z</updated>
<author>
<name>Paul Tan</name>
<email>pyokagan@gmail.com</email>
</author>
<published>2015-06-14T08:41:50Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=85b343245b495a47f937007e1c0650f2070b9b4f'/>
<id>urn:sha1:85b343245b495a47f937007e1c0650f2070b9b4f</id>
<content type='text'>
When we have a null-terminated array, it would be useful to convert it
or append it to an argv_array for further manipulation.

Implement argv_array_pushv() which will push a null-terminated array of
strings on to an argv_array.

Signed-off-by: Paul Tan &lt;pyokagan@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>argv-array: drop "detach" code</title>
<updated>2014-05-15T16:49:12Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2014-05-15T08:41:03Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=ff857e4ee8680af3988aff3383b1158f396a6fb2'/>
<id>urn:sha1:ff857e4ee8680af3988aff3383b1158f396a6fb2</id>
<content type='text'>
The argv_array_detach function (and associated free() function) was
really only useful for transferring ownership of the memory to a "struct
child_process". Now that we have an internal argv_array in that struct,
there are no callers left.

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>Add the LAST_ARG_MUST_BE_NULL macro</title>
<updated>2013-07-19T16:26:15Z</updated>
<author>
<name>Ramsay Jones</name>
<email>ramsay@ramsay1.demon.co.uk</email>
</author>
<published>2013-07-18T20:02:12Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=9fe3edc47f1f17a53272671c572c90ba71eb4f74'/>
<id>urn:sha1:9fe3edc47f1f17a53272671c572c90ba71eb4f74</id>
<content type='text'>
The sentinel function attribute is not understood by versions of
the gcc compiler prior to v4.0. At present, for earlier versions
of gcc, the build issues 108 warnings related to the unknown
attribute. In order to suppress the warnings, we conditionally
define the LAST_ARG_MUST_BE_NULL macro to provide the sentinel attribute
for gcc v4.0 and newer.

Signed-off-by: Ramsay Jones &lt;ramsay@ramsay1.demon.co.uk&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>use "sentinel" function attribute for variadic lists</title>
<updated>2013-07-10T05:23:09Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2013-07-10T00:19:12Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=eccb614924c9067eeceffa503e4da3683f1c8b6b'/>
<id>urn:sha1:eccb614924c9067eeceffa503e4da3683f1c8b6b</id>
<content type='text'>
This attribute can help gcc notice when callers forget to
add a NULL sentinel to the end of the function. This is our
first use of the sentinel attribute, but we shouldn't need
to #ifdef for other compilers, as __attribute__ is already a
no-op on non-gcc-compatible compilers.

Suggested-by: Bert Wesarg &lt;bert.wesarg@googlemail.com&gt;
More-Spots-Found-By: Matt Kraai &lt;kraai@ftbfs.org&gt;
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 'fa/remote-svn'</title>
<updated>2012-10-25T10:42:02Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2012-10-25T10:42:01Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=530f237500ba00c03fee23c2db599870ff62c196'/>
<id>urn:sha1:530f237500ba00c03fee23c2db599870ff62c196</id>
<content type='text'>
A GSoC project.

* fa/remote-svn:
  Add a test script for remote-svn
  remote-svn: add marks-file regeneration
  Add a svnrdump-simulator replaying a dump file for testing
  remote-svn: add incremental import
  remote-svn: Activate import/export-marks for fast-import
  Create a note for every imported commit containing svn metadata
  vcs-svn: add fast_export_note to create notes
  Allow reading svn dumps from files via file:// urls
  remote-svn, vcs-svn: Enable fetching to private refs
  When debug==1, start fast-import with "--stats" instead of "--quiet"
  Add documentation for the 'bidi-import' capability of remote-helpers
  Connect fast-import to the remote-helper via pipe, adding 'bidi-import' capability
  Add argv_array_detach and argv_array_free_detached
  Add svndump_init_fd to allow reading dumps from arbitrary FDs
  Add git-remote-testsvn to Makefile
  Implement a remote helper for svn in C
</content>
</entry>
</feed>
