From: Frank Terbeck <ft@bewatermyfriend.org>
To: Daniel Shahaf <d.s@daniel.shahaf.name>
Cc: zsh-workers@zsh.org
Subject: Re: [PATCH] vcs_info: git: Support stagedstr(%c) without unstagedstr(%u)
Date: Fri, 04 Apr 2014 11:53:11 +0200 [thread overview]
Message-ID: <87fvlte7zs.fsf@ft.bewatermyfriend.org> (raw)
In-Reply-To: <20140329094949.GB11569@tarsus.local2> (Daniel Shahaf's message of "Sat, 29 Mar 2014 09:49:49 +0000")
Daniel Shahaf wrote:
> Hello.
Hi!
Sorry for the delay.
> I'd like to have my prompt alert me when I have staged changes (because it's a
> pain to keep running 'git diff --staged' before every 'git commit -a').
> However, I don't want to enable detection of unstaged changes too as that's
> more expensive (disk crawl v. metadata crawl).
Yes, makes sense.
[...]
> --- a/Functions/VCS_Info/Backends/VCS_INFO_get_data_bzr
> +++ b/Functions/VCS_Info/Backends/VCS_INFO_get_data_bzr
[...]
> + # TODO: document in zshcontrib that bzr supports check-for-changes
> + # (also in VCS_INFO_bzr_get_info_restricted)
Sounds like a plan. Do you want the job? :)
[...]
> --- a/Functions/VCS_Info/Backends/VCS_INFO_get_data_git
> +++ b/Functions/VCS_Info/Backends/VCS_INFO_get_data_git
[...]
> +local querystaged queryunstaged
If you'd make this "local -i ..." the variables would be integers,
defaulting to zero. Then you could do...
[...]
> +if [[ -n $querystaged || -n $queryunstaged ]] && \
+if (( querystaged || queryunstaged )) && \
[...]
> + if [[ -n $queryunstaged ]] ; then
+ if (( queryunstaged )); then
[...]
> + if [[ -n $querystaged ]] ; then
+ if (( querystaged )); then
Which is a little more pleasing to my eyes at least. The rest looks
good.
Regards, Frank
--
In protocol design, perfection has been reached not when there is
nothing left to add, but when there is nothing left to take away.
-- RFC 1925
next prev parent reply other threads:[~2014-04-04 10:15 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-29 9:49 Daniel Shahaf
2014-04-04 8:57 ` Daniel Shahaf
2014-04-04 9:08 ` Peter Stephenson
2014-04-04 9:53 ` Frank Terbeck [this message]
2014-04-05 6:47 ` Daniel Shahaf
2014-04-05 9:01 ` Frank Terbeck
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=87fvlte7zs.fsf@ft.bewatermyfriend.org \
--to=ft@bewatermyfriend.org \
--cc=d.s@daniel.shahaf.name \
--cc=zsh-workers@zsh.org \
/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.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
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).