This patch needed on top of 3/3 for me to pass gcc cleanly.
-- 8 --
Subject: [PATCH] fixup! for-each-ref: introduce %(upstream:track[short])
The condition !prefixcmp(name, upstream) must be true for the
variable branch to be reused, so the variable should be always set
when it gets used, but GCC
Introduce %(upstream:track) to display [ahead M, behind N] and
%(upstream:trackshort) to display =, , , or
appropriately (inspired by contrib/completion/git-prompt.sh).
Now you can use the following format in for-each-ref:
%C(green)%(refname:short)%C(reset)%(upstream:trackshort)
to display
Introduce %(upstream:track) to display [ahead M, behind N] and
%(upstream:trackshort) to display =, , , or
appropriately (inspired by contrib/completion/git-prompt.sh).
Now you can use the following format in for-each-ref:
%C(green)%(refname:short)%C(reset)%(upstream:trackshort)
to display
On Fri, Sep 27, 2013 at 8:10 AM, Ramkumar Ramachandra
artag...@gmail.com wrote:
Introduce %(upstream:track) to display [ahead M, behind N] and
%(upstream:trackshort) to display =, , , or
appropriately (inspired by contrib/completion/git-prompt.sh).
Now you can use the following format in
Am 9/27/2013 14:10, schrieb Ramkumar Ramachandra:
+ else if (!strcmp(formatp, track)
+ !prefixcmp(name, upstream)) {
+ char buf[40];
+
+ if (!upstream_present)
+
Phil Hord wrote:
--- a/builtin/for-each-ref.c
+++ b/builtin/for-each-ref.c
@@ -631,6 +631,7 @@ static void populate_value(struct refinfo *ref)
int eaten, i;
unsigned long size;
const unsigned char *tagged;
+ int upstream_present = 0;
This flag is out of
Johannes Sixt wrote:
+ else if (!num_ours) {
+ sprintf(buf, [behind %d],
num_theirs);
+ v-s = xstrdup(buf);
+ } else if (!num_theirs) {
+
- Original Message -
From: Ramkumar Ramachandra artag...@gmail.com
Sent: Friday, September 27, 2013 1:10 PM
Introduce %(upstream:track) to display [ahead M, behind N] and
%(upstream:trackshort) to display =, , , or
appropriately (inspired by contrib/completion/git-prompt.sh).
Now you
Philip Oakley wrote:
= and I can easily understand (binary choice), but and will
need to be clear which way they indicate in terms of matching
the [ahead N] and [behind M] options.
The corresponds to ahead, while is behind. You'll get used to
it pretty quickly :)
--
To unsubscribe from
From: Ramkumar Ramachandra artag...@gmail.com
Philip Oakley wrote:
= and I can easily understand (binary choice), but and
will
need to be clear which way they indicate in terms of matching
the [ahead N] and [behind M] options.
The corresponds to ahead, while is behind. You'll get used
Johannes Sixt wrote:
Am 9/27/2013 14:10, schrieb Ramkumar Ramachandra:
+v-s = xstrdup(buf);
+}
These strdupped strings are leaked, right?
The convention seems to be that each refinfo owns its atom_value,
which owns its string
Introduce %(upstream:track) to display [ahead M, behind N] and
%(upstream:trackshort) to display =, , , or
appropriately (inspired by the contrib/completion/git-prompt.sh).
Now you can use the following format in for-each-ref:
%C(red)%(HEAD)%C(reset)
12 matches
Mail list logo