<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/shell.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>2008-08-29T07:16:39Z</updated>
<entry>
<title>Merge branch 'maint'</title>
<updated>2008-08-29T07:16:39Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2008-08-29T07:16:39Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=445cac18c015809a7fcb4a570d3c6571b1ddaf7d'/>
<id>urn:sha1:445cac18c015809a7fcb4a570d3c6571b1ddaf7d</id>
<content type='text'>
* maint:
  tutorial: gentler illustration of Alice/Bob workflow using gitk
  pretty=format: respect date format options
  make git-shell paranoid about closed stdin/stdout/stderr
  Document gitk --argscmd flag.
  Fix '--dirstat' with cross-directory renaming
  for-each-ref: Allow a trailing slash in the patterns
</content>
</entry>
<entry>
<title>make git-shell paranoid about closed stdin/stdout/stderr</title>
<updated>2008-08-29T07:14:29Z</updated>
<author>
<name>Paolo Bonzini</name>
<email>bonzini@gnu.org</email>
</author>
<published>2008-08-27T15:20:35Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=0cfeed2e1d320cc76c434e0bfc26d90065754e46'/>
<id>urn:sha1:0cfeed2e1d320cc76c434e0bfc26d90065754e46</id>
<content type='text'>
It is in general unsafe to start a program with one or more of file
descriptors 0/1/2 closed.  Karl Chen for example noticed that stat_command
does this in order to rename a pipe file descriptor to 0:

    dup2(from, 0);
    close(from);

... but if stdin was closed (for example) from == 0, so that

    dup2(0, 0);
    close(0);

just ends up closing the pipe.  Another extremely rare but nasty problem
would occur if an "important" file ends up in file descriptor 2, and is
corrupted by a call to die().

Fixing this in git was considered to be overkill, so this patch works
around it only for git-shell.  The fix is simply to open all the "low"
descriptors to /dev/null in main.

Signed-off-by: Paolo Bonzini &lt;bonzini@gnu.org&gt;
Acked-by: Stephen R. van den Berg &lt;srb@cuci.nl&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Revert "Build-in "git-shell""</title>
<updated>2008-08-26T05:39:17Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2008-08-26T05:39:17Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=1e7abc593d55bc436ccd98f6815d49b13511baa1'/>
<id>urn:sha1:1e7abc593d55bc436ccd98f6815d49b13511baa1</id>
<content type='text'>
This reverts commit daa0cc9a92c9c2c714aa5f7da6d0ff65b93e0698.
It was a stupid idea to do this; when run as a log-in shell,
it is spawned with argv[0] set to "-git-shell", so the usual
name-based dispatch would not work to begin with.
</content>
</entry>
<entry>
<title>Build-in "git-shell"</title>
<updated>2008-08-20T08:36:10Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2008-08-20T01:05:43Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=daa0cc9a92c9c2c714aa5f7da6d0ff65b93e0698'/>
<id>urn:sha1:daa0cc9a92c9c2c714aa5f7da6d0ff65b93e0698</id>
<content type='text'>
This trivially makes "git-shell" a built-in.  It makes the executable even
fatter, though.

And MinGW removed git-shell only because of the funny dependencies; there
is no reason to do so anymore.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
Tested-on-MinGW-by: Johannes Sixt &lt;johannes.sixt@telecom.at&gt;
</content>
</entry>
<entry>
<title>shell: do not play duplicated definition games to shrink the executable</title>
<updated>2008-08-20T01:05:39Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2008-08-20T01:05:39Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=4cfc24afc9ffa4d3f1623be8990eea118e82d4fd'/>
<id>urn:sha1:4cfc24afc9ffa4d3f1623be8990eea118e82d4fd</id>
<content type='text'>
Playing with linker games to shrink git-shell did not go well with various
other platforms and compilers.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Record the command invocation path early</title>
<updated>2008-07-26T00:41:13Z</updated>
<author>
<name>Johannes Sixt</name>
<email>johannes.sixt@telecom.at</email>
</author>
<published>2008-07-21T19:19:52Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=e1464ca7bb0d705210ba7198f004b2fb2b807e12'/>
<id>urn:sha1:e1464ca7bb0d705210ba7198f004b2fb2b807e12</id>
<content type='text'>
We will need the command invocation path in system_path(). This path was
passed to setup_path(), but  system_path() can be called earlier, for
example via:

    main
      commit_pager_choice
        setup_pager
          git_config
            git_etc_gitconfig
              system_path

Therefore, we introduce git_set_argv0_path() and call it as soon as
possible.

Signed-off-by: Johannes Sixt &lt;johannes.sixt@telecom.at&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>shrink git-shell by avoiding redundant dependencies</title>
<updated>2008-06-28T06:22:00Z</updated>
<author>
<name>Dmitry Potapov</name>
<email>dpotapov@gmail.com</email>
</author>
<published>2008-06-27T20:46:42Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=5b8e6f85f971dba8eeac048e7821978bbca14121'/>
<id>urn:sha1:5b8e6f85f971dba8eeac048e7821978bbca14121</id>
<content type='text'>
A lot of modules that have nothing to do with git-shell functionality
were linked in, bloating git-shell more than 8 times.

This patch cuts off redundant dependencies by:
1. providing stubs for three functions that make no sense for git-shell;
2. moving quote_path_fully from environment.c to quote.c to make the
   later self sufficient;
3. moving make_absolute_path into a new separate file.

The following numbers have been received with the default optimization
settings on master using GCC 4.1.2:

Before:
   text    data     bss     dec     hex filename
 143915    1348   93168  238431   3a35f git-shell

After:
   text    data     bss     dec     hex filename
  17670     788    8232   26690    6842 git-shell

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>git-shell: accept "git foo" form</title>
<updated>2008-06-26T23:51:23Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2007-12-02T06:16:19Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=bc7c73e29cfb38232b5b6b1d1e8d59e7145a9860'/>
<id>urn:sha1:bc7c73e29cfb38232b5b6b1d1e8d59e7145a9860</id>
<content type='text'>
This is a backport of 0a47dc110e042b5bcc63dc94c8d517e67efe9306
to 'maint' to be included in 1.5.6.2 so that older server side
can accept dashless form of request when clients are updated.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>shell should call the new setup_path() to setup $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:55Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=e8f5d87056093f40a271f89c2c91d1a7025e2440'/>
<id>urn:sha1:e8f5d87056093f40a271f89c2c91d1a7025e2440</id>
<content type='text'>
Shell currently does its own manual thing for setting up the $PATH;
it can now 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>Support cvs via git-shell</title>
<updated>2007-10-16T01:25:42Z</updated>
<author>
<name>Johannes Schindelin</name>
<email>Johannes.Schindelin@gmx.de</email>
</author>
<published>2007-10-09T14:33:25Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=0c696fe7f490fd3a85e405becf6323993dfb471d'/>
<id>urn:sha1:0c696fe7f490fd3a85e405becf6323993dfb471d</id>
<content type='text'>
This adds cvs support to the git-shell; You can now give new users
a restricted git-shell and they still can commit via git's cvs
emulator.

Note that either the gecos information must be accurate, or you must
provide a $HOME/.gitconfig with the appropriate user credentials.
Since the git-shell is too restricted to allow the user to do it
(on purpose!), it is up to the administrator to take care of that.

Based on an idea by Jan Wielemaker.

Signed-off-by: Johannes Schindelin &lt;johannes.schindelin@gmx.de&gt;
Signed-off-by: Lars Hjemli &lt;hjemli@gmail.com&gt;
Signed-off-by: Shawn O. Pearce &lt;spearce@spearce.org&gt;
</content>
</entry>
</feed>
