From: Junio C Hamano <gitster@pobox.com>
To: Cody A Taylor <cody.taylor@maternityneighborhood.com>
Cc: "Git Mailing List" <git@vger.kernel.org>,
"Duy Nguyen" <pclouds@gmail.com>,
"SZEDER Gábor" <szeder@ira.uka.de>,
"Felipe Contreras" <felipe.contreras@gmail.com>
Subject: Re: [PATCH v2] git prompt: Use toplevel to find untracked files.
Date: Thu, 12 Mar 2015 23:16:24 -0700 [thread overview]
Message-ID: <xmqqmw3hzakn.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <20150313021910.11996.54041@catuvm> (Cody A. Taylor's message of "Thu, 12 Mar 2015 19:24:50 -0700 (PDT)")
Cody A Taylor <cody.taylor@maternityneighborhood.com> writes:
> From c861d5cb401110ce7d86b76c1eaa8e89e80f484e Mon Sep 17 00:00:00 2001
> From: Cody A Taylor <codemister99@yahoo.com>
> Date: Thu, 12 Mar 2015 20:36:44 -0400
> Subject: [PATCH] git prompt: Use toplevel to find untracked files.
All of the above four lines are unwanted in the e-mail body.
* The first line is a separating line to make format-patch output
look like a mbox file, and does not even belong to this patch.
* From: line, when you are not relaying somebody else's patch,
should not be necessary, as long as you set up your MUA correctly
so that the e-mail shows a correct From: in its header.
* Date: is the same; unless you are relaying somebody else's patch,
in which case you might want to preserve the author timestamp,
the first time _we_ the recipients see your patch matters more,
which should be available from the e-mail header.
* Subject: should be in the e-mail header. Sometimes when sending
a patch to an ongoing discussion that has its own subject, it is
handy to be able to override the title with in-body Subject:, but
this patch submission is not such a case. The subjects are the
same in the fourth line in the body (which should be dropped) and
in the header anyway in this message, so please edit it out.
In short
(1) If you cannot convince your mailer to show your @yahoo.com
address on the e-mail header From: line, then having the
in-body From: line above (i.e. the second line) is OK as a
workaround. We however would prefer if you didn't.
(2) Edit the other three lines out.
> The __git_ps1() prompt function would not show an untracked
> state when the current working directory was not a parent of
> the untracked file.
Good find, and nicely explained. I wonder if we can add a test
or two to t9903-bash-prompt.sh?
The patch itself makes sense. Thanks.
> Signed-off-by: Cody A Taylor <codemister99@yahoo.com>
> ---
> contrib/completion/git-prompt.sh | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/contrib/completion/git-prompt.sh b/contrib/completion/git-prompt.sh
> index 214e859f99e7..f18aedc73be9 100644
> --- a/contrib/completion/git-prompt.sh
> +++ b/contrib/completion/git-prompt.sh
> @@ -487,7 +487,7 @@ __git_ps1 ()
>
> if [ -n "${GIT_PS1_SHOWUNTRACKEDFILES-}" ] &&
> [ "$(git config --bool bash.showUntrackedFiles)" != "false" ] &&
> - git ls-files --others --exclude-standard --error-unmatch -- '*' >/dev/null 2>/dev/null
> + git ls-files --others --exclude-standard --error-unmatch -- ':/*' >/dev/null 2>/dev/null
> then
> u="%${ZSH_VERSION+%}"
> fi
next prev parent reply other threads:[~2015-03-13 6:16 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-13 2:24 [PATCH v2] git prompt: Use toplevel to find untracked files Cody A Taylor
2015-03-13 6:16 ` Junio C Hamano [this message]
2015-03-15 11:49 ` SZEDER Gábor
2015-03-15 21:18 ` Junio C Hamano
-- strict thread matches above, loose matches on Subject: below --
2015-03-16 0:54 Cody Taylor
2015-03-21 8:46 ` SZEDER Gábor
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqmw3hzakn.fsf@gitster.dls.corp.google.com \
--to=gitster@pobox.com \
--cc=cody.taylor@maternityneighborhood.com \
--cc=felipe.contreras@gmail.com \
--cc=git@vger.kernel.org \
--cc=pclouds@gmail.com \
--cc=szeder@ira.uka.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).