<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/git.git/git-sh-setup.sh, branch v1.7.6.3</title>
<subtitle>Git
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/git.git/atom?h=v1.7.6.3</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/atom?h=v1.7.6.3'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/'/>
<updated>2011-05-24T18:34:40Z</updated>
<entry>
<title>require-work-tree wants more than what its name says</title>
<updated>2011-05-24T18:34:40Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2011-05-05T02:11:18Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=e2eb527345d48881dac0d88e6bdfc0a267a2eb62'/>
<id>urn:sha1:e2eb527345d48881dac0d88e6bdfc0a267a2eb62</id>
<content type='text'>
Somebody tried "git pull" from a random place completely outside the work
tree, while exporting GIT_DIR and GIT_WORK_TREE that are set to correct
places, e.g.

    GIT_WORK_TREE=$HOME/git.git
    GIT_DIR=$GIT_WORK_TREE/.git
    export GIT_WORK_TREE GIT_DIR
    cd /tmp
    git pull

At the beginning of git-pull, we check "require-work-tree" and then
"cd-to-toplevel".  I _think_ the original intention when I wrote the
command was "we MUST have a work tree, our $(cwd) might not be at the
top-level directory of it", and no stronger than that.  That check is a
very sensible thing to do before doing cd-to-toplevel.  We check that the
place we would want to go exists, and then go there.

But the implementation of require_work_tree we have today is quite
different.  I don't have energy to dig the history, but currently it says:

    test "$(git rev-parse --is-inside-work-tree 2&gt;/dev/null)" = true ||
    die "fatal: $0 cannot be used without a working tree."

Which is completely bogus.  Even though we may happen to be just outside
of it right now, we may have a working tree that we can cd_to_toplevel
back to.

Add a function "require_work_tree_exists" that implements the check
this function originally intended (this is so that third-party scripts
that rely on the current behaviour do not have to get broken).

For now, update _no_ in-tree scripts, not even "git pull", as nobody on
the list seems to really care about the above corner case workflow that
triggered this. Scripts can be updated after vetting that they do want the
"we want to make sure the place we are going to go actually exists"
semantics.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Porcelain scripts: Rewrite cryptic "needs update" error message</title>
<updated>2010-10-28T20:28:44Z</updated>
<author>
<name>Ramkumar Ramachandra</name>
<email>artagnon@gmail.com</email>
</author>
<published>2010-10-19T14:39:28Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=92c62a3f4f93432c0c82e3031a9e64e03ba290f7'/>
<id>urn:sha1:92c62a3f4f93432c0c82e3031a9e64e03ba290f7</id>
<content type='text'>
Although Git interally has the facility to differentiate between
porcelain and plubmbing commands and appropriately print errors,
several shell scripts invoke plubming commands triggering cryptic
plumbing errors to be displayed on a porcelain interface. This patch
replaces the "needs update" message in git-pull and git-rebase, when
`git update-index` is run, with a more friendly message.

Reported-by: Joshua Jensen &lt;jjensen@workspacewhiz.com&gt;
Reported-by: Thore Husfeldt &lt;thore.husfeldt@gmail.com&gt;
Signed-off-by: Ramkumar Ramachandra &lt;artagnon@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'uk/fix-author-ident-sed-script'</title>
<updated>2010-10-06T19:11:12Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2010-10-06T19:11:12Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=90d6bd5ed3bd5de7be037abace4afa065fb2207b'/>
<id>urn:sha1:90d6bd5ed3bd5de7be037abace4afa065fb2207b</id>
<content type='text'>
* uk/fix-author-ident-sed-script:
  get_author_ident_from_commit(): remove useless quoting
</content>
</entry>
<entry>
<title>git-am: fix detection of absolute paths for windows</title>
<updated>2010-10-03T22:31:59Z</updated>
<author>
<name>Pat Thoyts</name>
<email>patthoyts@users.sourceforge.net</email>
</author>
<published>2010-09-30T13:24:07Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=5e9677cbdf1840836e22d9cf23198de34877e283'/>
<id>urn:sha1:5e9677cbdf1840836e22d9cf23198de34877e283</id>
<content type='text'>
Add an is_absolute_path function to abstract out platform differences
in checking for an absolute or relative path.
Specifically fixes t4150-am on Windows.

[PT: updated following suggestion from j6t to support \* and //*]

Signed-off-by: Johannes Sixt &lt;j6t@kdbg.org&gt;
Signed-off-by: Pat Thoyts &lt;patthoyts@users.sourceforge.net&gt;
</content>
</entry>
<entry>
<title>get_author_ident_from_commit(): remove useless quoting</title>
<updated>2010-09-27T17:49:49Z</updated>
<author>
<name>Uwe Kleine-König</name>
<email>u.kleine-koenig@pengutronix.de</email>
</author>
<published>2010-09-23T09:22:10Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=9facb3b05b6a2fbfcd2525d5946cd5505488126b'/>
<id>urn:sha1:9facb3b05b6a2fbfcd2525d5946cd5505488126b</id>
<content type='text'>
The command 's/'\''/'\''\'\'\''/g' only triples single quotes:

	$ echo "What's up?" | sed 's/'\''/'\''\'\'\''/g'
	What'''s up?

This doesn't hurt as compared to a single single quote it only adds an
empty string, but it makes the script needlessly complicated and hard to
understand.  The useful quoting is done by s/'\''/'\''\\'\'\''/g at the
beginning of the script and only once for all three variables.

Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'gb/maint-submodule-env'</title>
<updated>2010-03-07T20:47:17Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2010-03-07T20:47:17Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=9317dc4f051452a0e0f7a62a5531b16adf36b553'/>
<id>urn:sha1:9317dc4f051452a0e0f7a62a5531b16adf36b553</id>
<content type='text'>
* gb/maint-submodule-env:
  is_submodule_modified(): clear environment properly
  submodules: ensure clean environment when operating in a submodule
  shell setup: clear_local_git_env() function
  rev-parse: --local-env-vars option
  Refactor list of of repo-local env vars
</content>
</entry>
<entry>
<title>Merge branch 'jn/maint-fix-pager'</title>
<updated>2010-03-02T20:44:11Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2010-03-02T20:44:11Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=52ebb06f1466a235c643acffdea9c9e484cfdec0'/>
<id>urn:sha1:52ebb06f1466a235c643acffdea9c9e484cfdec0</id>
<content type='text'>
* jn/maint-fix-pager:
  tests: Fix race condition in t7006-pager
  t7006-pager: if stdout is not a terminal, make a new one
  tests: Add tests for automatic use of pager
  am: Fix launching of pager
  git svn: Fix launching of pager
  git.1: Clarify the behavior of the --paginate option
  Make 'git var GIT_PAGER' always print the configured pager
  Fix 'git var' usage synopsis
</content>
</entry>
<entry>
<title>Merge branch 'gf/maint-sh-setup-nongit-ok'</title>
<updated>2010-03-02T20:44:07Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2010-03-02T20:44:07Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=8acd141bb5cd4155d849fbfb3b74eb509608cd15'/>
<id>urn:sha1:8acd141bb5cd4155d849fbfb3b74eb509608cd15</id>
<content type='text'>
* gf/maint-sh-setup-nongit-ok:
  require_work_tree broken with NONGIT_OK
</content>
</entry>
<entry>
<title>shell setup: clear_local_git_env() function</title>
<updated>2010-02-25T00:24:25Z</updated>
<author>
<name>Giuseppe Bilotta</name>
<email>giuseppe.bilotta@gmail.com</email>
</author>
<published>2010-02-24T23:34:16Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=7d750f0ea511dcc26c3c9de996a9b75444366ecc'/>
<id>urn:sha1:7d750f0ea511dcc26c3c9de996a9b75444366ecc</id>
<content type='text'>
Introduce an auxiliary function to clear all repo-local environment
variables. This should be invoked by any shell script that switches
repository during execution, to ensure that the environment is clean
and that things such as the git dir and worktree are set up correctly.

Signed-off-by: Giuseppe Bilotta &lt;giuseppe.bilotta@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>require_work_tree broken with NONGIT_OK</title>
<updated>2010-02-17T18:55:12Z</updated>
<author>
<name>Gabriel Filion</name>
<email>lelutin@gmail.com</email>
</author>
<published>2010-02-17T04:18:50Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=ab62677b1424d4e53cf222c973b841d3dada4cf3'/>
<id>urn:sha1:ab62677b1424d4e53cf222c973b841d3dada4cf3</id>
<content type='text'>
With NONGIT_OK set, require_work_tree function outside a git repository
gives a syntax error.  This is caused by an incorrect use of "test" that
didn't anticipate $(git rev-parse --is-inside-work-tree) may return an
empty string.

Properly quote the argument to "test", and send the standard error stream
to /dev/null to avoid giving duplicate error messages.

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