<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/git.git/exec_cmd.c, branch v1.5.4.4</title>
<subtitle>Git
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/git.git/atom?h=v1.5.4.4</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/atom?h=v1.5.4.4'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/'/>
<updated>2007-12-04T06:11:53Z</updated>
<entry>
<title>Trace and quote with argv: get rid of unneeded count argument.</title>
<updated>2007-12-04T06:11:53Z</updated>
<author>
<name>Christian Couder</name>
<email>chriscool@tuxfamily.org</email>
</author>
<published>2007-12-03T04:51:50Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=b319ce4c14f7fe0ee469a3f9def1098d84177849'/>
<id>urn:sha1:b319ce4c14f7fe0ee469a3f9def1098d84177849</id>
<content type='text'>
Now that str_buf takes care of all the allocations, there is
no more gain to pass an argument count.

So this patch removes the "count" argument from:
	- "sq_quote_argv"
	- "trace_argv_printf"
and all the callers.

Signed-off-by: Christian Couder &lt;chriscool@tuxfamily.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>use only the $PATH for exec'ing git commands</title>
<updated>2007-10-30T03:51:37Z</updated>
<author>
<name>Scott R Parish</name>
<email>srp@srparish.net</email>
</author>
<published>2007-10-28T11:17:20Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=511707d42b3b3e57d9623493092590546ffeae80'/>
<id>urn:sha1:511707d42b3b3e57d9623493092590546ffeae80</id>
<content type='text'>
We need to correctly set up $PATH for non-c based git commands.
Since we already do this, we can just use that $PATH and execvp,
instead of looping over the paths with execve.

This patch adds a setup_path() function to exec_cmd.c, which sets
the $PATH order correctly for our search order. execv_git_cmd() is
stripped down to setting up argv and calling execvp(). git.c's
main() only only needs to call setup_path().

Signed-off-by: Scott R Parish &lt;srp@srparish.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>"current_exec_path" is a misleading name, use "argv_exec_path"</title>
<updated>2007-10-30T03:51:37Z</updated>
<author>
<name>Scott R Parish</name>
<email>srp@srparish.net</email>
</author>
<published>2007-10-27T08:36:51Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=384df83312d24ea4d11adcf4e73921fc192595d2'/>
<id>urn:sha1:384df83312d24ea4d11adcf4e73921fc192595d2</id>
<content type='text'>
Signed-off-by: Scott R Parish &lt;srp@srparish.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Mechanical conversion to use prefixcmp()</title>
<updated>2007-02-21T06:03:15Z</updated>
<author>
<name>Junio C Hamano</name>
<email>junkio@cox.net</email>
</author>
<published>2007-02-20T09:53:29Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=cc44c7655fe2dd0cfb46e841156634fe622df397'/>
<id>urn:sha1:cc44c7655fe2dd0cfb46e841156634fe622df397</id>
<content type='text'>
This mechanically converts strncmp() to use prefixcmp(), but only when
the parameters match specific patterns, so that they can be verified
easily.  Leftover from this will be fixed in a separate step, including
idiotic conversions like

    if (!strncmp("foo", arg, 3))

  =&gt;

    if (!(-prefixcmp(arg, "foo")))

This was done by using this script in px.perl

   #!/usr/bin/perl -i.bak -p
   if (/strncmp\(([^,]+), "([^\\"]*)", (\d+)\)/ &amp;&amp; (length($2) == $3)) {
           s|strncmp\(([^,]+), "([^\\"]*)", (\d+)\)|prefixcmp($1, "$2")|;
   }
   if (/strncmp\("([^\\"]*)", ([^,]+), (\d+)\)/ &amp;&amp; (length($1) == $3)) {
           s|strncmp\("([^\\"]*)", ([^,]+), (\d+)\)|(-prefixcmp($2, "$1"))|;
   }

and running:

   $ git grep -l strncmp -- '*.c' | xargs perl px.perl

Signed-off-by: Junio C Hamano &lt;junkio@cox.net&gt;
</content>
</entry>
<entry>
<title>Use preprocessor constants for environment variable names.</title>
<updated>2006-12-19T09:51:51Z</updated>
<author>
<name>Junio C Hamano</name>
<email>junkio@cox.net</email>
</author>
<published>2006-12-19T09:28:15Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=d4ebc36c5ee964592303c59260417b758d024c31'/>
<id>urn:sha1:d4ebc36c5ee964592303c59260417b758d024c31</id>
<content type='text'>
We broke the discipline Linus set up to allow compiler help us
avoid typos in environment names in the early days of git over
time.  This defines a handful preprocessor constants for
environment variable names used in relatively core parts of the
system.

I've left out variable names specific to subsystems such as HTTP
and SSL as I do not think they are big problems.

Signed-off-by: Junio C Hamano &lt;junkio@cox.net&gt;
</content>
</entry>
<entry>
<title>Trace into open fd and refactor tracing code.</title>
<updated>2006-08-31T21:16:38Z</updated>
<author>
<name>Christian Couder</name>
<email>chriscool@tuxfamily.org</email>
</author>
<published>2006-08-31T06:42:11Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=7cf67205ca68a157c6ffdb4e5a4ff231217c0871'/>
<id>urn:sha1:7cf67205ca68a157c6ffdb4e5a4ff231217c0871</id>
<content type='text'>
Now if GIT_TRACE is set to an integer value greater than 1
and lower than 10, we interpret this as an open fd value
and we trace into it. Note that this behavior is not
compatible with the previous one.

We also trace whole messages using one write(2) call to
make sure messages from processes do net get mixed up in
the middle.

It's now possible to run the tests like this:

	GIT_TRACE=9 make test 9&gt;/var/tmp/trace.log

Signed-off-by: Christian Couder &lt;chriscool@tuxfamily.org&gt;
Signed-off-by: Junio C Hamano &lt;junkio@cox.net&gt;
</content>
</entry>
<entry>
<title>remove unnecessary initializations</title>
<updated>2006-08-16T04:22:20Z</updated>
<author>
<name>David Rientjes</name>
<email>rientjes@google.com</email>
</author>
<published>2006-08-15T17:23:48Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=96f1e58f524fac8607cfc38896b365b6e8365b51'/>
<id>urn:sha1:96f1e58f524fac8607cfc38896b365b6e8365b51</id>
<content type='text'>
[jc: I needed to hand merge the changes to the updated codebase,
 so the result needs to be checked.]

Signed-off-by: David Rientjes &lt;rientjes@google.com&gt;
Signed-off-by: Junio C Hamano &lt;junkio@cox.net&gt;
</content>
</entry>
<entry>
<title>GIT_TRACE: fix a mixed declarations and code warning</title>
<updated>2006-07-09T07:57:23Z</updated>
<author>
<name>Timo Hirvonen</name>
<email>tihirvon@gmail.com</email>
</author>
<published>2006-06-28T09:15:00Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=e82e058d3ad1d50fbb99fac8630ad7b511ca4abe'/>
<id>urn:sha1:e82e058d3ad1d50fbb99fac8630ad7b511ca4abe</id>
<content type='text'>
Signed-off-by: Timo Hirvonen &lt;tihirvon@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;junkio@cox.net&gt;
</content>
</entry>
<entry>
<title>GIT_TRACE: show which built-in/external commands are executed</title>
<updated>2006-07-09T07:57:23Z</updated>
<author>
<name>Matthias Lederhofer</name>
<email>matled@gmx.net</email>
</author>
<published>2006-06-25T13:56:18Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=575ba9d69d5dfd07d95343fe946a5991c4cb27d6'/>
<id>urn:sha1:575ba9d69d5dfd07d95343fe946a5991c4cb27d6</id>
<content type='text'>
With the environment variable GIT_TRACE set git will show
 - alias expansion
 - built-in command execution
 - external command execution
on stderr.

Signed-off-by: Matthias Lederhofer &lt;matled@gmx.net&gt;
Signed-off-by: Junio C Hamano &lt;junkio@cox.net&gt;
</content>
</entry>
<entry>
<title>git_exec_path, execv_git_cmd: ignore empty environment variables</title>
<updated>2006-05-31T04:49:01Z</updated>
<author>
<name>Dmitry V. Levin</name>
<email>ldv@altlinux.org</email>
</author>
<published>2006-05-29T00:34:34Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=2b6016263c984b71b29373fc9354d497cd51947d'/>
<id>urn:sha1:2b6016263c984b71b29373fc9354d497cd51947d</id>
<content type='text'>
Ignoring empty environment variables is good common practice.
Ignoring --exec-path with empty argument won't harm, too:
if user means current directory, there is a "--exec-path=."

Signed-off-by: Dmitry V. Levin &lt;ldv@altlinux.org&gt;
Signed-off-by: Junio C Hamano &lt;junkio@cox.net&gt;
</content>
</entry>
</feed>
