<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/git-sh-setup.sh, branch v1.6.3</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v1.6.3</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v1.6.3'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2009-02-07T08:45:29Z</updated>
<entry>
<title>git-sh-setup: Use "cd" option, not /bin/pwd, for symlinked work tree</title>
<updated>2009-02-07T08:45:29Z</updated>
<author>
<name>Marcel M. Cary</name>
<email>marcel@oak.homeunix.org</email>
</author>
<published>2009-02-07T03:24:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=2c3c395e84409c278bd7b050877c36d04b952056'/>
<id>urn:sha1:2c3c395e84409c278bd7b050877c36d04b952056</id>
<content type='text'>
In cd_to_toplevel, instead of 'cd $(unset PWD; /bin/pwd)/$path'
use 'cd -P $path'.  The "-P" option yields a desirable similarity to
C chdir.

While the "-P" option may be slightly less commonly supported than
/bin/pwd, it is more concise, better tested, and less error prone.
I've already added the 'unset PWD' to fix the /bin/pwd solution on
BSD; there may be more edge cases out there.

This still passes all the same test cases in t5521-pull-symlink.sh and
t2300-cd-to-toplevel.sh, even before updating them to use 'pwd -P'.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>git-sh-setup: Fix scripts whose PWD is a symlink to a work-dir on OS X</title>
<updated>2009-01-05T19:46:58Z</updated>
<author>
<name>Marcel M. Cary</name>
<email>marcel@oak.homeunix.org</email>
</author>
<published>2008-12-30T15:10:24Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=dd6c1360b22ee89cb179e2a1fface98ecbeb7b3e'/>
<id>urn:sha1:dd6c1360b22ee89cb179e2a1fface98ecbeb7b3e</id>
<content type='text'>
On Mac OS X and possibly BSDs, /bin/pwd reads PWD from the environment if
available and shows the logical path by default rather than the physical
one.

Unset PWD before running /bin/pwd in both cd_to_toplevel and its test.

Still use the external /bin/pwd because in my Bash on Linux, the builtin
pwd prints the same result whether or not PWD is set.

Signed-off-by: Marcel M. Cary &lt;marcel@oak.homeunix.org&gt;
Tested-by: Wincent Colaiuta &lt;win@wincent.com&gt; (on Mac OS X 10.5.5)
Tested-by: Marcel Koeppen &lt;git-dev@marzelpan.de&gt; (on Mac OS X 10.5.6)
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>git-sh-setup: Fix scripts whose PWD is a symlink into a git work-dir</title>
<updated>2008-12-21T09:10:48Z</updated>
<author>
<name>Marcel M. Cary</name>
<email>marcel@oak.homeunix.org</email>
</author>
<published>2008-12-15T17:34:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=08fc0608657ee91bc85276667804c36a93138c7d'/>
<id>urn:sha1:08fc0608657ee91bc85276667804c36a93138c7d</id>
<content type='text'>
I want directories of my working tree to be linked to from various
paths on my filesystem where third-party components expect them, both
in development and production environments.  A build system's install
step could solve this, but I develop scripts and web pages that don't
need to be built.  Git's submodule system could solve this, but we
tend to develop, branch, and test those directories all in unison, so
one big repository feels more natural.  We prefer to edit and commit
on the symlinked paths, not the canonical ones, and in that setting,
"git pull" fails to find the top-level directory of the repository
while other commands work fine.

"git pull" fails because POSIX shells have a notion of current working
directory that is different from getcwd().  The shell stores this path
in PWD.  As a result, "cd ../" can be interpreted differently in a
shell script than chdir("../") in a C program.  The shell interprets
"../" by essentially stripping the last textual path component from
PWD, whereas C chdir() follows the ".." link in the current directory
on the filesystem.  When PWD is a symlink, these are different
destinations.  As a result, Git's C commands find the correct
top-level working tree, and shell scripts do not.

Changes:

* When interpreting a relative upward (../) path in cd_to_toplevel,
  prepend the cwd without symlinks, given by /bin/pwd
* Add tests for cd_to_toplevel and "git pull" in a symlinked
  directory that failed before this fix, plus contrasting scenarios
  that already worked

Signed-off-by: Marcel M. Cary &lt;marcel@oak.homeunix.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Make usage strings dash-less</title>
<updated>2008-07-13T21:12:48Z</updated>
<author>
<name>Stephan Beyer</name>
<email>s-beyer@gmx.net</email>
</author>
<published>2008-07-13T13:36:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=1b1dd23f2d6a707b7077cdf6bc6d4055bd0bfb7d'/>
<id>urn:sha1:1b1dd23f2d6a707b7077cdf6bc6d4055bd0bfb7d</id>
<content type='text'>
When you misuse a git command, you are shown the usage string.
But this is currently shown in the dashed form.  So if you just
copy what you see, it will not work, when the dashed form
is no longer supported.

This patch makes git commands show the dash-less version.

For shell scripts that do not specify OPTIONS_SPEC, git-sh-setup.sh
generates a dash-less usage string now.

Signed-off-by: Stephan Beyer &lt;s-beyer@gmx.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Windows: Work around incompatible sort and find.</title>
<updated>2008-06-26T06:45:09Z</updated>
<author>
<name>Johannes Sixt</name>
<email>johannes.sixt@telecom.at</email>
</author>
<published>2007-11-30T21:06:30Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=87bddba9924045e39e988d9704714db90abd5619'/>
<id>urn:sha1:87bddba9924045e39e988d9704714db90abd5619</id>
<content type='text'>
If the PATH lists the Windows system directories before the MSYS
directories, Windows's own incompatible sort and find commands would be
picked up. We implement these commands as functions and call the real
tools by absolute path.

Signed-off-by: Johannes Sixt &lt;johannes.sixt@telecom.at&gt;
</content>
</entry>
<entry>
<title>Simplify setup of $GIT_DIR in git-sh-setup.sh</title>
<updated>2008-02-19T05:53:44Z</updated>
<author>
<name>Lars Hjemli</name>
<email>hjemli@gmail.com</email>
</author>
<published>2008-02-18T10:44:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=4d6d6d2d3f778b892f2481969e530ff67ee0aa6c'/>
<id>urn:sha1:4d6d6d2d3f778b892f2481969e530ff67ee0aa6c</id>
<content type='text'>
Using 'git rev-parse --git-dir' makes the code shorter and more future-
proof.

Signed-off-by: Lars Hjemli &lt;hjemli@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Protect get_author_ident_from_commit() from filenames in work tree</title>
<updated>2008-02-13T21:43:02Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2008-02-13T21:13:21Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=077b725f0bbe2b6ca2deb569c22a6f0d7a374dd3'/>
<id>urn:sha1:077b725f0bbe2b6ca2deb569c22a6f0d7a374dd3</id>
<content type='text'>
We used to use "cat-file commit $commit" to extract the original
author information from existing commit, but an earlier commit
5ac2715 (Consistent message encoding while reusing log from an
existing commit) changed it to use "git show -s $commit".  If
you have a file in your work tree that can be interpreted as a
valid object name (e.g. "HEAD"), this conversion will not work.

Disambiguate by marking the end of revision parameter on the
comand line with an explicit "--" to fix this.

This breakage is most visible with rebase when a file called
"HEAD" exists in the worktree.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>shell-scripts usage(): consistently exit with non-zero</title>
<updated>2007-12-20T20:58:06Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2007-12-20T20:58:06Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=5d29275638f48ee442202f0c478d1d8b9d396cc6'/>
<id>urn:sha1:5d29275638f48ee442202f0c478d1d8b9d396cc6</id>
<content type='text'>
Earlier conversion of shell scripts to parse-options made usage()
to run "git cmd -h" which in turn emit LONG_USAGE and exit with 0
status.  This is inconsistent with the scripts that do not use
parse-options, whose usage() died with the message, exiting with 1.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>git-help: add "help.format" config variable.</title>
<updated>2007-12-15T05:58:35Z</updated>
<author>
<name>Christian Couder</name>
<email>chriscool@tuxfamily.org</email>
</author>
<published>2007-12-15T04:57:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=70087cdbd3671f5929689a9b77f414b8297641c2'/>
<id>urn:sha1:70087cdbd3671f5929689a9b77f414b8297641c2</id>
<content type='text'>
This config variable makes it possible to choose the default format
used to display help. This format will be used only if no option
like -a|--all|-i|--info|-m|--man|-w|--web is passed to "git-help".

The following values are possible for this variable:

	- "man"  --&gt; "man" program is used
	- "info" --&gt; "info" program is used
	- "web"  --&gt; "git-browse-help" is used

By default we still show help using "man".

This patch also adds -m|--man command line option to use "man"
to allow overriding the "help.format" configuration variable.

Note that this patch also revert some recent changes in
"git-browse-help" because they prevented to look for config
variables in the global configuration file.

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>git-help -w: do not require to be in git repository</title>
<updated>2007-12-13T01:41:58Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2007-12-13T01:34:30Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=22c9071728cdc4c5b39e4fc6a33036d967d3a3a5'/>
<id>urn:sha1:22c9071728cdc4c5b39e4fc6a33036d967d3a3a5</id>
<content type='text'>
The users used to be able to say "git help cat-file" from anywhere, but
the browse-help script insisted to be in a git repository, which caused
"git help -w cat-file" to barf outside.  Correct it.

While at it, remove leftover debugging "echo".

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