<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/setup.c, branch v2.12.3</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://www.git.shady.money/git/atom?h=v2.12.3</id>
<link rel='self' href='https://www.git.shady.money/git/atom?h=v2.12.3'/>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/'/>
<updated>2017-03-28T20:52:19Z</updated>
<entry>
<title>Merge branch 'rs/strbuf-add-real-path' into maint</title>
<updated>2017-03-28T20:52:19Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2017-03-28T20:52:19Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=cd27bc7a0bdb7e62090c503b9e8ab4b4a6bb3d06'/>
<id>urn:sha1:cd27bc7a0bdb7e62090c503b9e8ab4b4a6bb3d06</id>
<content type='text'>
An helper function to make it easier to append the result from
real_path() to a strbuf has been added.

* rs/strbuf-add-real-path:
  strbuf: add strbuf_add_real_path()
  cocci: use ALLOC_ARRAY
</content>
</entry>
<entry>
<title>real_pathdup(): fix callsites that wanted it to die on error</title>
<updated>2017-03-08T22:38:41Z</updated>
<author>
<name>Johannes Schindelin</name>
<email>johannes.schindelin@gmx.de</email>
</author>
<published>2017-03-08T15:43:40Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=ce83eadd9a2c63db6263df91933da1b1b865d26a'/>
<id>urn:sha1:ce83eadd9a2c63db6263df91933da1b1b865d26a</id>
<content type='text'>
In 4ac9006f832 (real_path: have callers use real_pathdup and
strbuf_realpath, 2016-12-12), we changed the xstrdup(real_path())
pattern to use real_pathdup() directly.

The problem with this change is that real_path() calls
strbuf_realpath() with die_on_error = 1 while real_pathdup() calls
it with die_on_error = 0. Meaning that in cases where real_path()
causes Git to die() with an error message, real_pathdup() is silent
and returns NULL instead.

The callers, however, are ill-prepared for that change, as they expect
the return value to be non-NULL (and otherwise the function died
with an appropriate error message).

Fix this by extending real_pathdup()'s signature to accept the
die_on_error flag and simply pass it through to strbuf_realpath(),
and then adjust all callers after a careful audit whether they would
handle NULLs well.

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>strbuf: add strbuf_add_real_path()</title>
<updated>2017-02-27T19:02:06Z</updated>
<author>
<name>René Scharfe</name>
<email>l.s.r@web.de</email>
</author>
<published>2017-02-25T16:00:33Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=33ad9ddd0b5398063f0aabea639b5fe569f458ea'/>
<id>urn:sha1:33ad9ddd0b5398063f0aabea639b5fe569f458ea</id>
<content type='text'>
Add a function for appending the canonized absolute pathname of a given
path to a strbuf.  It keeps the existing contents intact, as expected of
a function of the strbuf_add() family, while avoiding copying the result
if the given strbuf is empty.  It's more consistent with the rest of the
strbuf API than strbuf_realpath(), which it's wrapping.

Also add a semantic patch demonstrating its intended usage and apply it
to the current tree.  Using strbuf_add_real_path() instead of calling
strbuf_addstr() and real_path() avoids an extra copy to a static buffer.

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>cache.h: expose the dying procedure for reading gitlinks</title>
<updated>2017-01-26T19:00:58Z</updated>
<author>
<name>Stefan Beller</name>
<email>sbeller@google.com</email>
</author>
<published>2017-01-24T23:56:50Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=5f29433f1ca1efc35d546a056200d923e86e3fca'/>
<id>urn:sha1:5f29433f1ca1efc35d546a056200d923e86e3fca</id>
<content type='text'>
In a later patch we want to react to only a subset of errors, defaulting
the rest to die as usual. Separate the block that takes care of dying
into its own function so we have easy access to it.

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>setup: add gentle version of resolve_git_dir</title>
<updated>2017-01-26T19:00:24Z</updated>
<author>
<name>Stefan Beller</name>
<email>sbeller@google.com</email>
</author>
<published>2017-01-24T23:56:49Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=40d96325143ae04cb3f645ac96f6413d1f641b9b'/>
<id>urn:sha1:40d96325143ae04cb3f645ac96f6413d1f641b9b</id>
<content type='text'>
This follows a93bedada (setup: add gentle version of read_gitfile,
2015-06-09), and assumes the same reasoning. resolve_git_dir is unsuited
for speculative calls, so we want to use the gentle version to find out
about potential errors.

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>real_path: have callers use real_pathdup and strbuf_realpath</title>
<updated>2016-12-12T23:22:32Z</updated>
<author>
<name>Brandon Williams</name>
<email>bmwill@google.com</email>
</author>
<published>2016-12-12T18:16:55Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=4ac9006f832d98ca1f25d956e12f3ff79e0d25bc'/>
<id>urn:sha1:4ac9006f832d98ca1f25d956e12f3ff79e0d25bc</id>
<content type='text'>
Migrate callers of real_path() who duplicate the retern value to use
real_pathdup or strbuf_realpath.

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>i18n: setup: mark error messages for translation</title>
<updated>2016-08-09T19:44:59Z</updated>
<author>
<name>Vasco Almeida</name>
<email>vascomalmeida@sapo.pt</email>
</author>
<published>2016-08-08T11:15:59Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=2ff30e67d996b89fe16517a2ba4b55b417172389'/>
<id>urn:sha1:2ff30e67d996b89fe16517a2ba4b55b417172389</id>
<content type='text'>
Signed-off-by: Vasco Almeida &lt;vascomalmeida@sapo.pt&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>i18n: setup: mark strings for translation</title>
<updated>2016-06-17T22:45:48Z</updated>
<author>
<name>Vasco Almeida</name>
<email>vascomalmeida@sapo.pt</email>
</author>
<published>2016-06-17T20:21:06Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=ab33a76ec5313b00d630a14d2a843cdb942ed2be'/>
<id>urn:sha1:ab33a76ec5313b00d630a14d2a843cdb942ed2be</id>
<content type='text'>
Update tests that compare the strings newly marked for translation to
succeed when running under GETTEXT_POISON.

Signed-off-by: Vasco Almeida &lt;vascomalmeida@sapo.pt&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'jc/xstrfmt-null-with-prec-0'</title>
<updated>2016-04-22T22:45:08Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2016-04-22T22:45:07Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=3f80d16c1c0db9834806e3c430197a8d3442094c'/>
<id>urn:sha1:3f80d16c1c0db9834806e3c430197a8d3442094c</id>
<content type='text'>
* jc/xstrfmt-null-with-prec-0:
  setup.c: do not feed NULL to "%.*s" even with precision 0
</content>
</entry>
<entry>
<title>Merge branch 'jk/check-repository-format'</title>
<updated>2016-04-13T21:12:28Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2016-04-13T21:12:28Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=907c416534dbf110a4659b64ae65806f2b1e8d4d'/>
<id>urn:sha1:907c416534dbf110a4659b64ae65806f2b1e8d4d</id>
<content type='text'>
The repository set-up sequence has been streamlined (the biggest
change is that there is no longer git_config_early()), so that we
do not attempt to look into refs/* when we know we do not have a
Git repository.

* jk/check-repository-format:
  verify_repository_format: mark messages for translation
  setup: drop repository_format_version global
  setup: unify repository version callbacks
  init: use setup.c's repo version verification
  setup: refactor repo format reading and verification
  config: drop git_config_early
  check_repository_format_gently: stop using git_config_early
  lazily load core.sharedrepository
  wrap shared_repository global in get/set accessors
  setup: document check_repository_format()
</content>
</entry>
</feed>
