<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/git.git/contrib/completion/git-prompt.sh, branch hv/mv-nested-submodules-test</title>
<subtitle>github.com: git/git.git
</subtitle>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/git.git/'/>
<entry>
<title>git-prompt: add a describe style for any tags</title>
<updated>2017-03-15T20:19:41+00:00</updated>
<author>
<name>Michael J Gruber</name>
<email>git@drmicha.warpmail.net</email>
</author>
<published>2017-03-15T13:15:09+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/git.git/commit/?id=9f0b4dd0b82b764e7873ce6779766415ebc7f1ea'/>
<id>9f0b4dd0b82b764e7873ce6779766415ebc7f1ea</id>
<content type='text'>
git-prompt has various describe styles, among them "describe" (by
annotated tags) and "default" (by exact match with any tag).

Add a mode "tag" that describes by any tag, annotated or not.

Signed-off-by: Michael J Gruber &lt;git@drmicha.warpmail.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
git-prompt has various describe styles, among them "describe" (by
annotated tags) and "default" (by exact match with any tag).

Add a mode "tag" that describes by any tag, annotated or not.

Signed-off-by: Michael J Gruber &lt;git@drmicha.warpmail.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'vs/prompt-avoid-unset-variable'</title>
<updated>2016-06-27T16:56:47+00:00</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2016-06-27T16:56:47+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/git.git/commit/?id=be099661f41e661eac8af2b4879a84a9eb9a7b9b'/>
<id>be099661f41e661eac8af2b4879a84a9eb9a7b9b</id>
<content type='text'>
The git-prompt scriptlet (in contrib/) was not friendly with those
who uses "set -u", which has been fixed.

* vs/prompt-avoid-unset-variable:
  git-prompt.sh: Don't error on null ${ZSH,BASH}_VERSION, $short_sha
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The git-prompt scriptlet (in contrib/) was not friendly with those
who uses "set -u", which has been fixed.

* vs/prompt-avoid-unset-variable:
  git-prompt.sh: Don't error on null ${ZSH,BASH}_VERSION, $short_sha
</pre>
</div>
</content>
</entry>
<entry>
<title>git-prompt.sh: Don't error on null ${ZSH,BASH}_VERSION, $short_sha</title>
<updated>2016-06-06T20:09:07+00:00</updated>
<author>
<name>Ville Skyttä</name>
<email>ville.skytta@iki.fi</email>
</author>
<published>2016-06-06T16:29:33+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/git.git/commit/?id=34d8f5a8aa4aa17af3158f325173eb08c9c05eb1'/>
<id>34d8f5a8aa4aa17af3158f325173eb08c9c05eb1</id>
<content type='text'>
When the shell is in "nounset" or "set -u" mode, referencing unset or
null variables results in an error. Protect $ZSH_VERSION and
$BASH_VERSION against that, and initialize $short_sha before use.

Signed-off-by: Ville Skyttä &lt;ville.skytta@iki.fi&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When the shell is in "nounset" or "set -u" mode, referencing unset or
null variables results in an error. Protect $ZSH_VERSION and
$BASH_VERSION against that, and initialize $short_sha before use.

Signed-off-by: Ville Skyttä &lt;ville.skytta@iki.fi&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>bash prompt: indicate dirty index even on orphan branches</title>
<updated>2015-11-24T20:27:01+00:00</updated>
<author>
<name>SZEDER Gábor</name>
<email>szeder@ira.uka.de</email>
</author>
<published>2015-11-21T11:30:09+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/git.git/commit/?id=c26f70ceb3960603a78010c87f8ad11820ab6561'/>
<id>c26f70ceb3960603a78010c87f8ad11820ab6561</id>
<content type='text'>
__git_ps1() doesn't indicate dirty index while on an orphan branch.

To check the dirtiness of the index, __git_ps1() runs 'git diff-index
--cached ... HEAD', which doesn't work on an orphan branch,
because HEAD doesn't point to a valid commit.

Run 'git diff ... --cached' instead, as it does the right thing both
on valid and invalid HEAD, i.e. compares the index to the existing
HEAD in the former case and to the empty tree in the latter.  This
fixes the two failing tests added in the first commit of this series.

The dirtiness of the worktree is already checked with 'git diff' and
is displayed correctly even on an orphan branch.

Signed-off-by: SZEDER Gábor &lt;szeder@ira.uka.de&gt;
Signed-off-by: Jeff King &lt;peff@peff.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
__git_ps1() doesn't indicate dirty index while on an orphan branch.

To check the dirtiness of the index, __git_ps1() runs 'git diff-index
--cached ... HEAD', which doesn't work on an orphan branch,
because HEAD doesn't point to a valid commit.

Run 'git diff ... --cached' instead, as it does the right thing both
on valid and invalid HEAD, i.e. compares the index to the existing
HEAD in the former case and to the empty tree in the latter.  This
fixes the two failing tests added in the first commit of this series.

The dirtiness of the worktree is already checked with 'git diff' and
is displayed correctly even on an orphan branch.

Signed-off-by: SZEDER Gábor &lt;szeder@ira.uka.de&gt;
Signed-off-by: Jeff King &lt;peff@peff.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>bash prompt: remove a redundant 'git diff' option</title>
<updated>2015-11-24T20:27:01+00:00</updated>
<author>
<name>SZEDER Gábor</name>
<email>szeder@ira.uka.de</email>
</author>
<published>2015-11-21T14:46:40+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/git.git/commit/?id=0af9f7ecb8648ab1c6a090913e3df4a39f7c6754'/>
<id>0af9f7ecb8648ab1c6a090913e3df4a39f7c6754</id>
<content type='text'>
To get the dirty state indicator __git_ps1() runs 'git diff' with
'--quiet --exit-code' options.  '--quiet' already implies
'--exit-code', so the latter is unnecessary and can be removed.

Signed-off-by: SZEDER Gábor &lt;szeder@ira.uka.de&gt;
Signed-off-by: Jeff King &lt;peff@peff.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
To get the dirty state indicator __git_ps1() runs 'git diff' with
'--quiet --exit-code' options.  '--quiet' already implies
'--exit-code', so the latter is unnecessary and can be removed.

Signed-off-by: SZEDER Gábor &lt;szeder@ira.uka.de&gt;
Signed-off-by: Jeff King &lt;peff@peff.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>bash prompt: faster untracked status indicator with untracked directories</title>
<updated>2015-07-20T20:08:56+00:00</updated>
<author>
<name>SZEDER Gábor</name>
<email>szeder@ira.uka.de</email>
</author>
<published>2015-07-19T11:28:06+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/git.git/commit/?id=dd160d794f0bf02c30d2e5032e216b1e8ac14222'/>
<id>dd160d794f0bf02c30d2e5032e216b1e8ac14222</id>
<content type='text'>
If the untracked status indicator is enabled, __git_ps1() looks for
untracked files by running 'git ls-files'.  This can be perceptibly slow
in case of an untracked directory containing lot of files, because it
lists all files found in the untracked directory only to be redirected
into /dev/null right away (this is the actual command run by __git_ps1()):

  $ ls untracked-dir/ |wc -l
  100000
  $ time git ls-files --others --exclude-standard --error-unmatch \
    -- ':/*' &gt;/dev/null 2&gt;/dev/null

  real	0m0.955s
  user	0m0.936s
  sys	0m0.016s

Eliminate this delay by additionally passing the '--directory
--no-empty-directory' options to 'git ls-files' to show only the name of
non-empty untracked directories instead of all their content:

  $ time git ls-files --others --exclude-standard --directory \
    --no-empty-directory --error-unmatch -- ':/*' &gt;/dev/null 2&gt;/dev/null

  real	0m0.010s
  user	0m0.008s
  sys	0m0.000s

This follows suit of ea95c7b8f5 (completion: improve untracked directory
filtering for filename completion, 2013-09-18).

Signed-off-by: SZEDER Gábor &lt;szeder@ira.uka.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If the untracked status indicator is enabled, __git_ps1() looks for
untracked files by running 'git ls-files'.  This can be perceptibly slow
in case of an untracked directory containing lot of files, because it
lists all files found in the untracked directory only to be redirected
into /dev/null right away (this is the actual command run by __git_ps1()):

  $ ls untracked-dir/ |wc -l
  100000
  $ time git ls-files --others --exclude-standard --error-unmatch \
    -- ':/*' &gt;/dev/null 2&gt;/dev/null

  real	0m0.955s
  user	0m0.936s
  sys	0m0.016s

Eliminate this delay by additionally passing the '--directory
--no-empty-directory' options to 'git ls-files' to show only the name of
non-empty untracked directories instead of all their content:

  $ time git ls-files --others --exclude-standard --directory \
    --no-empty-directory --error-unmatch -- ':/*' &gt;/dev/null 2&gt;/dev/null

  real	0m0.010s
  user	0m0.008s
  sys	0m0.000s

This follows suit of ea95c7b8f5 (completion: improve untracked directory
filtering for filename completion, 2013-09-18).

Signed-off-by: SZEDER Gábor &lt;szeder@ira.uka.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'jc/prompt-document-ps1-state-separator' into maint</title>
<updated>2015-07-15T18:41:26+00:00</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2015-07-15T18:41:26+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/git.git/commit/?id=51d5980ea019a28b38d2f9612314daf3ea536e82'/>
<id>51d5980ea019a28b38d2f9612314daf3ea536e82</id>
<content type='text'>
Docfix.

* jc/prompt-document-ps1-state-separator:
  git-prompt.sh: document GIT_PS1_STATESEPARATOR
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Docfix.

* jc/prompt-document-ps1-state-separator:
  git-prompt.sh: document GIT_PS1_STATESEPARATOR
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'jc/prompt-document-ps1-state-separator'</title>
<updated>2015-07-01T21:02:32+00:00</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2015-07-01T21:02:32+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/git.git/commit/?id=d70bc3b97a4792ba99117ac6b0051ff367d78419'/>
<id>d70bc3b97a4792ba99117ac6b0051ff367d78419</id>
<content type='text'>
Docfix.

* jc/prompt-document-ps1-state-separator:
  git-prompt.sh: document GIT_PS1_STATESEPARATOR
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Docfix.

* jc/prompt-document-ps1-state-separator:
  git-prompt.sh: document GIT_PS1_STATESEPARATOR
</pre>
</div>
</content>
</entry>
<entry>
<title>git-prompt.sh: document GIT_PS1_STATESEPARATOR</title>
<updated>2015-06-10T21:53:14+00:00</updated>
<author>
<name>Joe Cridge</name>
<email>joe.cridge@me.com</email>
</author>
<published>2015-06-10T17:19:24+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/git.git/commit/?id=ab7fade9198e0ab3cc5c8705f0383768a3c954db'/>
<id>ab7fade9198e0ab3cc5c8705f0383768a3c954db</id>
<content type='text'>
The environment variable GIT_PS1_STATESEPARATOR can be used to set the
separator between the branch name and the state symbols in the prompt.

At present the variable is not mentioned in the inline documentation which
makes it difficult for the casual user to identify.

Signed-off-by: Joe Cridge &lt;joe.cridge@me.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The environment variable GIT_PS1_STATESEPARATOR can be used to set the
separator between the branch name and the state symbols in the prompt.

At present the variable is not mentioned in the inline documentation which
makes it difficult for the casual user to identify.

Signed-off-by: Joe Cridge &lt;joe.cridge@me.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'ct/prompt-untracked-fix'</title>
<updated>2015-03-25T19:54:18+00:00</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2015-03-25T19:54:18+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/git.git/commit/?id=5f15cba2f95f5678fc69bd305dbbb778e1fad579'/>
<id>5f15cba2f95f5678fc69bd305dbbb778e1fad579</id>
<content type='text'>
The prompt script (in contrib/) did not show the untracked sign
when working in a subdirectory without any untracked files.

* ct/prompt-untracked-fix:
  git prompt: use toplevel to find untracked files
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The prompt script (in contrib/) did not show the untracked sign
when working in a subdirectory without any untracked files.

* ct/prompt-untracked-fix:
  git prompt: use toplevel to find untracked files
</pre>
</div>
</content>
</entry>
</feed>
