<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/run-command.c, branch v2.26.3</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.26.3</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.26.3'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2021-02-12T14:49:55Z</updated>
<entry>
<title>Sync with 2.24.4</title>
<updated>2021-02-12T14:49:55Z</updated>
<author>
<name>Johannes Schindelin</name>
<email>johannes.schindelin@gmx.de</email>
</author>
<published>2021-02-12T14:49:55Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=97d1dcb1efb2899a40b42da894f2ead0eb7af7ef'/>
<id>urn:sha1:97d1dcb1efb2899a40b42da894f2ead0eb7af7ef</id>
<content type='text'>
* maint-2.24:
  Git 2.24.4
  Git 2.23.4
  Git 2.22.5
  Git 2.21.4
  Git 2.20.5
  Git 2.19.6
  Git 2.18.5
  Git 2.17.6
  unpack_trees(): start with a fresh lstat cache
  run-command: invalidate lstat cache after a command finished
  checkout: fix bug that makes checkout follow symlinks in leading path
</content>
</entry>
<entry>
<title>Sync with 2.21.4</title>
<updated>2021-02-12T14:49:41Z</updated>
<author>
<name>Johannes Schindelin</name>
<email>johannes.schindelin@gmx.de</email>
</author>
<published>2021-02-12T14:49:41Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=bcf08f33d840b8a6bef347aea3ac2359874c888a'/>
<id>urn:sha1:bcf08f33d840b8a6bef347aea3ac2359874c888a</id>
<content type='text'>
* maint-2.21:
  Git 2.21.4
  Git 2.20.5
  Git 2.19.6
  Git 2.18.5
  Git 2.17.6
  unpack_trees(): start with a fresh lstat cache
  run-command: invalidate lstat cache after a command finished
  checkout: fix bug that makes checkout follow symlinks in leading path
</content>
</entry>
<entry>
<title>Sync with 2.19.6</title>
<updated>2021-02-12T14:49:17Z</updated>
<author>
<name>Johannes Schindelin</name>
<email>johannes.schindelin@gmx.de</email>
</author>
<published>2021-02-12T14:49:17Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=804963848e325ff6f4213e53aeda6ef831574e48'/>
<id>urn:sha1:804963848e325ff6f4213e53aeda6ef831574e48</id>
<content type='text'>
* maint-2.19:
  Git 2.19.6
  Git 2.18.5
  Git 2.17.6
  unpack_trees(): start with a fresh lstat cache
  run-command: invalidate lstat cache after a command finished
  checkout: fix bug that makes checkout follow symlinks in leading path
</content>
</entry>
<entry>
<title>Sync with 2.18.5</title>
<updated>2021-02-12T14:47:47Z</updated>
<author>
<name>Johannes Schindelin</name>
<email>johannes.schindelin@gmx.de</email>
</author>
<published>2021-02-12T14:47:47Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=fb049fd85b298d386dca2e0bcf74a1f52a7b2038'/>
<id>urn:sha1:fb049fd85b298d386dca2e0bcf74a1f52a7b2038</id>
<content type='text'>
* maint-2.18:
  Git 2.18.5
  Git 2.17.6
  unpack_trees(): start with a fresh lstat cache
  run-command: invalidate lstat cache after a command finished
  checkout: fix bug that makes checkout follow symlinks in leading path
</content>
</entry>
<entry>
<title>Sync with 2.17.6</title>
<updated>2021-02-12T14:47:42Z</updated>
<author>
<name>Johannes Schindelin</name>
<email>johannes.schindelin@gmx.de</email>
</author>
<published>2021-02-12T14:47:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=9b77cec89b64f0910df911952ccee0cdf0046f48'/>
<id>urn:sha1:9b77cec89b64f0910df911952ccee0cdf0046f48</id>
<content type='text'>
* maint-2.17:
  Git 2.17.6
  unpack_trees(): start with a fresh lstat cache
  run-command: invalidate lstat cache after a command finished
  checkout: fix bug that makes checkout follow symlinks in leading path
</content>
</entry>
<entry>
<title>run-command: invalidate lstat cache after a command finished</title>
<updated>2021-02-12T14:47:02Z</updated>
<author>
<name>Johannes Schindelin</name>
<email>johannes.schindelin@gmx.de</email>
</author>
<published>2021-02-02T21:09:52Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=0d58fef58a6f382ba1d35f47a01cb55d8976335f'/>
<id>urn:sha1:0d58fef58a6f382ba1d35f47a01cb55d8976335f</id>
<content type='text'>
In the previous commit, we intercepted calls to `rmdir()` to invalidate
the lstat cache in the successful case, so that the lstat cache could
not have the idea that a directory exists where there is none.

The same situation can arise, of course, when a separate process is
spawned (most notably, this is the case in `submodule_move_head()`).
Obviously, we cannot know whether a directory was removed in that
process, therefore we must invalidate the lstat cache afterwards.

Note: in contrast to `lstat_cache_aware_rmdir()`, we invalidate the
lstat cache even in case of an error: the process might have removed a
directory and still have failed afterwards.

Co-authored-by: Matheus Tavares &lt;matheus.bernardino@usp.br&gt;
Signed-off-by: Johannes Schindelin &lt;johannes.schindelin@gmx.de&gt;
</content>
</entry>
<entry>
<title>Merge branch 'bc/run-command-nullness-after-free-fix' into maint</title>
<updated>2020-02-14T20:42:27Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2020-02-14T20:42:27Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=c17cf77e4e021194f52f32b0b8def06c7933e89f'/>
<id>urn:sha1:c17cf77e4e021194f52f32b0b8def06c7933e89f</id>
<content type='text'>
C pedantry ;-) fix.

* bc/run-command-nullness-after-free-fix:
  run-command: avoid undefined behavior in exists_in_PATH
</content>
</entry>
<entry>
<title>run-command: avoid undefined behavior in exists_in_PATH</title>
<updated>2020-01-07T19:59:07Z</updated>
<author>
<name>brian m. carlson</name>
<email>sandals@crustytoothpaste.net</email>
</author>
<published>2020-01-07T01:36:40Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=63ab08fb9999bf9547c5279a8c2f0cdd8bb679ca'/>
<id>urn:sha1:63ab08fb9999bf9547c5279a8c2f0cdd8bb679ca</id>
<content type='text'>
In this function, we free the pointer we get from locate_in_PATH and
then check whether it's NULL.  However, this is undefined behavior if
the pointer is non-NULL, since the C standard no longer permits us to
use a valid pointer after freeing it.

The only case in which the C standard would permit this to be defined
behavior is if r were NULL, since it states that in such a case "no
action occurs" as a result of calling free.

It's easy to suggest that this is not likely to be a problem, but we
know that GCC does aggressively exploit the fact that undefined
behavior can never occur to optimize and rewrite code, even when that's
contrary to the expectations of the programmer.  It is, in fact, very
common for it to omit NULL pointer checks, just as we have here.

Since it's easy to fix, let's do so, and avoid a potential headache in
the future.

Noticed-by: Miriam R. &lt;mirucam@gmail.com&gt;
Signed-off-by: brian m. carlson &lt;sandals@crustytoothpaste.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>run-command: use prepare_git_cmd() in prepare_cmd()</title>
<updated>2019-11-27T02:22:35Z</updated>
<author>
<name>René Scharfe</name>
<email>l.s.r@web.de</email>
</author>
<published>2019-11-26T09:06:36Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=54a7a64613ca6cda431bbfab3867ebe354c1e9da'/>
<id>urn:sha1:54a7a64613ca6cda431bbfab3867ebe354c1e9da</id>
<content type='text'>
Call prepare_git_cmd() instead of open-coding it.

Signed-off-by: René Scharfe &lt;l.s.r@web.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>trace2: create new combined trace facility</title>
<updated>2019-02-22T23:27:59Z</updated>
<author>
<name>Jeff Hostetler</name>
<email>jeffhost@microsoft.com</email>
</author>
<published>2019-02-22T22:25:01Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ee4512ed481a126dadd33334186e0e759d7f2f47'/>
<id>urn:sha1:ee4512ed481a126dadd33334186e0e759d7f2f47</id>
<content type='text'>
Create a new unified tracing facility for git.  The eventual intent is to
replace the current trace_printf* and trace_performance* routines with a
unified set of git_trace2* routines.

In addition to the usual printf-style API, trace2 provides higer-level
event verbs with fixed-fields allowing structured data to be written.
This makes post-processing and analysis easier for external tools.

Trace2 defines 3 output targets.  These are set using the environment
variables "GIT_TR2", "GIT_TR2_PERF", and "GIT_TR2_EVENT".  These may be
set to "1" or to an absolute pathname (just like the current GIT_TRACE).

* GIT_TR2 is intended to be a replacement for GIT_TRACE and logs command
  summary data.

* GIT_TR2_PERF is intended as a replacement for GIT_TRACE_PERFORMANCE.
  It extends the output with columns for the command process, thread,
  repo, absolute and relative elapsed times.  It reports events for
  child process start/stop, thread start/stop, and per-thread function
  nesting.

* GIT_TR2_EVENT is a new structured format. It writes event data as a
  series of JSON records.

Calls to trace2 functions log to any of the 3 output targets enabled
without the need to call different trace_printf* or trace_performance*
routines.

Signed-off-by: Jeff Hostetler &lt;jeffhost@microsoft.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
