<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/git.c, branch v1.6.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://www.git.shady.money/git/atom?h=v1.6.2</id>
<link rel='self' href='https://www.git.shady.money/git/atom?h=v1.6.2'/>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/'/>
<updated>2009-02-03T08:26:12Z</updated>
<entry>
<title>Merge branch 'jk/maint-cleanup-after-exec-failure'</title>
<updated>2009-02-03T08:26:12Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2009-02-03T08:26:12Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=1487eb68f7fd145151caa9a11ee00283629b75ef'/>
<id>urn:sha1:1487eb68f7fd145151caa9a11ee00283629b75ef</id>
<content type='text'>
* jk/maint-cleanup-after-exec-failure:
  git: use run_command() to execute dashed externals
  run_command(): help callers distinguish errors
  run_command(): handle missing command errors more gracefully
  git: s/run_command/run_builtin/
</content>
</entry>
<entry>
<title>git: use run_command() to execute dashed externals</title>
<updated>2009-01-28T22:09:37Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2009-01-28T07:38:14Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=d8e96fd86d415554a9c2e09ffb929a9e22fdad25'/>
<id>urn:sha1:d8e96fd86d415554a9c2e09ffb929a9e22fdad25</id>
<content type='text'>
We used to simply try calling execvp(); if it succeeded, then we were done
and the new program was running. If it didn't, then we knew that it wasn't
a valid command.

Unfortunately, this interacted badly with the new pager handling. Now that
git remains the parent process and the pager is spawned, git has to hang
around until the pager is finished. We install an atexit handler to do
this, but that handler never gets called if we successfully run execvp.

You could see this behavior by running any dashed external using a pager
(e.g., "git -p stash list"). The command finishes running, but the pager
is still going. In the case of less, it then gets an error reading from
the terminal and exits, potentially leaving the terminal in a broken state
(and not showing the output).

This patch just uses run_command() to try running the dashed external. The
parent git process then waits for the external process to complete and
then handles the pager cleanup as it would for an internal command.

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>git: s/run_command/run_builtin/</title>
<updated>2009-01-28T21:16:30Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2009-01-28T07:33:53Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=f172f334fde49ce29d0afa21749bf85463a2db9a'/>
<id>urn:sha1:f172f334fde49ce29d0afa21749bf85463a2db9a</id>
<content type='text'>
There is a static function called run_command which
conflicts with the library function in run-command.c; this
isn't a problem currently, but prevents including
run-command.h in git.c.

This patch just renames the static function to something
more specific and non-conflicting.

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>git_extract_argv0_path(): Move check for valid argv0 from caller to callee</title>
<updated>2009-01-26T08:26:05Z</updated>
<author>
<name>Steffen Prohaska</name>
<email>prohaska@zib.de</email>
</author>
<published>2009-01-18T12:00:11Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=2cd72b0b290e40fb4d6a925ce26603503f01aa09'/>
<id>urn:sha1:2cd72b0b290e40fb4d6a925ce26603503f01aa09</id>
<content type='text'>
This simplifies the calling code.

Signed-off-by: Steffen Prohaska &lt;prohaska@zib.de&gt;
Acked-by: Johannes Sixt &lt;j6t@kdbg.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Refactor git_set_argv0_path() to git_extract_argv0_path()</title>
<updated>2009-01-26T08:26:05Z</updated>
<author>
<name>Steve Haslam</name>
<email>shaslam@lastminute.com</email>
</author>
<published>2009-01-18T12:00:10Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=4dd47c3b867f51211d0dc4474dab0fee5ca614da'/>
<id>urn:sha1:4dd47c3b867f51211d0dc4474dab0fee5ca614da</id>
<content type='text'>
This commit moves the code that computes the dirname of argv[0]
from git.c's main() to git_set_argv0_path() and renames the function
to git_extract_argv0_path().  This makes the code in git.c's main
less cluttered, and we can use the dirname computation from other
main() functions too.

[ spr:
 - split Steve's original commit and wrote new commit message.
 - Integrated Johannes Schindelin's
   cca1704897e7fdb182f68d4c48a437c5d7bc5203 while rebasing onto master.
]

Signed-off-by: Steve Haslam &lt;shaslam@lastminute.com&gt;
Signed-off-by: Steffen Prohaska &lt;prohaska@zib.de&gt;
Acked-by: Johannes Sixt &lt;j6t@kdbg.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'as/autocorrect-alias'</title>
<updated>2009-01-18T07:05:34Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2009-01-18T07:05:34Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=5786f4fac7afa881a306e2b771a0307e4ee05384'/>
<id>urn:sha1:5786f4fac7afa881a306e2b771a0307e4ee05384</id>
<content type='text'>
* as/autocorrect-alias:
  git.c: make autocorrected aliases work
</content>
</entry>
<entry>
<title>remove trailing LF in die() messages</title>
<updated>2009-01-05T21:01:01Z</updated>
<author>
<name>Alexander Potashev</name>
<email>aspotashev@gmail.com</email>
</author>
<published>2009-01-04T18:38:41Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=d75307084da5f89329de190bb9b4a3196cec1d0e'/>
<id>urn:sha1:d75307084da5f89329de190bb9b4a3196cec1d0e</id>
<content type='text'>
LF at the end of format strings given to die() is redundant because
die already adds one on its own.

Signed-off-by: Alexander Potashev &lt;aspotashev@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>git.c: make autocorrected aliases work</title>
<updated>2009-01-05T20:54:07Z</updated>
<author>
<name>Adeodato Simó</name>
<email>dato@net.com.org.es</email>
</author>
<published>2009-01-04T17:16:01Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=a907e1b6ec3038306df68dc1275edad7457bba4b'/>
<id>urn:sha1:a907e1b6ec3038306df68dc1275edad7457bba4b</id>
<content type='text'>
help_unknown_cmd() is able to autocorrect a command to an alias, and not
only to internal or external commands. However, main() was not passing the
autocorrected command through handle_alias(), hence it failed if it was an
alias.

This commit makes the autocorrected command go through handle_alias(), once
handle_internal_command() and execv_dashed_external() have been tried. Since
this is done twice in main() now, moved that logic to a new run_argv()
function.

Also, print the same "Expansion of alias 'x' failed" message when the alias
was autocorrected, rather than a generic "Failed to run command 'x'".

Signed-off-by: Adeodato Simó &lt;dato@net.com.org.es&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>git wrapper: Make while loop more reader-friendly</title>
<updated>2009-01-02T21:19:40Z</updated>
<author>
<name>Johannes Schindelin</name>
<email>Johannes.Schindelin@gmx.de</email>
</author>
<published>2009-01-02T18:07:52Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=cca1704897e7fdb182f68d4c48a437c5d7bc5203'/>
<id>urn:sha1:cca1704897e7fdb182f68d4c48a437c5d7bc5203</id>
<content type='text'>
It is not a good practice to prefer performance over readability in
something as performance uncritical as finding the trailing slash
of argv[0].

So avoid head-scratching by making the loop user-readable, and not
hyper-performance-optimized.

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>Make chdir failures visible</title>
<updated>2008-12-05T02:05:51Z</updated>
<author>
<name>Alex Riesen</name>
<email>raa.lkml@gmail.com</email>
</author>
<published>2008-12-05T00:36:46Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=7be77de266b5cbcbd28d69a04df6f0b167b87cf6'/>
<id>urn:sha1:7be77de266b5cbcbd28d69a04df6f0b167b87cf6</id>
<content type='text'>
Signed-off-by: Alex Riesen &lt;raa.lkml@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
