All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Edward D'Souza via GitGitGadget" <gitgitgadget@gmail.com>
To: git@vger.kernel.org
Cc: Junio C Hamano <gitster@pobox.com>
Subject: [PATCH 0/1] Improve instructions around how to set git-prompt preference variables.
Date: Wed, 05 Jun 2019 08:06:06 -0700 (PDT)	[thread overview]
Message-ID: <pull.255.git.gitgitgadget@gmail.com> (raw)

When I first tried to use the git-prompt.sh script, I followed the
instructions at the top of the file and everything worked, except for the
"GIT_PS1_SHOWDIRTYSTATE" preference. Even though I had it set to true, I
wasn't seeing the "()" and "(+)" in my shell prompt. After a few hours of
poking around, I finally discovered what I had done wrong: I was setting the
variable *after the "source ~/.git-prompt.sh" line, and it has to be set 
before.

I moved the lines around my .bashrc script and got everything working, but I
thought the instructions could be a bit more explicit about how to set these
preference variables, especially because this is a silent failure situation;
the preference doesn't work if you get the order wrong and there are no
warnings or errors to guide you.

This patch started as a PR on the official Github project two years ago (
https://github.com/git/git/pull/425), back when I didn't know the official
process for submitting patches. Luckily, a kind user (@dscho) saw it and
pointed me in the right direction to get it submitted.

This will be my first time submitting a patch, so hopefully I've figured out
the process.

Edward D'Souza (1):
  git-prompt.sh: update shell variable instructions.

 contrib/completion/git-prompt.sh | 5 +++++
 1 file changed, 5 insertions(+)


base-commit: cb5918aa0d50f50e83787f65c2ddc3dcb10159fe
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-255%2Fghedsouza%2Fpatch-1-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-255/ghedsouza/patch-1-v1
Pull-Request: https://github.com/gitgitgadget/git/pull/255
-- 
gitgitgadget

             reply	other threads:[~2019-06-05 15:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-05 15:06 Edward D'Souza via GitGitGadget [this message]
2019-06-05 15:06 ` [PATCH 1/1] git-prompt.sh: update shell variable instructions Edward D'Souza via GitGitGadget
2019-06-05 16:06   ` SZEDER Gábor
2019-06-05 19:26     ` Edward D'Souza

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=pull.255.git.gitgitgadget@gmail.com \
    --to=gitgitgadget@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.