x27;t reset 'orig' to point to 'HEAD', rather this
renames 'orig' to 'HEAD'.
What you actually want to do (to reset 'orig' to 'HEAD') is:
$ git branch -f orig @
This would make orig point to the current HEAD.
--
Regards,
Karthik Nayak
On Wed, Jan 11, 2017 at 2:21 AM, Junio C Hamano wrote:
> Karthik Nayak writes:
>
>> index 81db67d74..08be8462c 100644
>> --- a/Documentation/git-for-each-ref.txt
>> +++ b/Documentation/git-for-each-ref.txt
>> @@ -95,13 +95,17 @@ refname::
>> The name
Hello,
On Wed, Jan 11, 2017 at 2:15 AM, Junio C Hamano wrote:
> Karthik Nayak writes:
>
>> + if_then_else->condition_satisfied = 1;
>> + } else if (if_then_else->cmp_status == COMPARE_UNEQUAL) {
>
> Please, no space before tabs (lo
Hello,
On Thu, Jan 12, 2017 at 5:17 AM, Jacob Keller wrote:
> On Tue, Jan 10, 2017 at 12:49 AM, Karthik Nayak wrote:
>> diff --git a/builtin/branch.c b/builtin/branch.c
>> index 34cd61cd9..f293ee5b0 100644
>> --- a/builtin/branch.c
>> +++ b/builtin/branch.c
&g
From: Karthik Nayak
Use the recently introduced refname_atom_parser_internal() within
remote_ref_atom_parser(), this provides a common base for all the ref
printing atoms, allowing %(upstream) and %(push) to also use the
':strip' option.
The atoms '%(push)' and '%(u
In preparation for the upcoming patch, where we introduce the 'rstrip'
option. Rename the 'strip' option to 'lstrip' to remove ambiguity.
Signed-off-by: Karthik Nayak
---
Documentation/git-for-each-ref.txt | 10 +-
builtin/tag.c
void this, return an empty string
whenever the value 'N' is greater than the number of components
available, instead of calling die().
Signed-off-by: Karthik Nayak
---
Documentation/git-for-each-ref.txt | 3 +--
ref-filter.c | 3 +--
t/t6300-for-each-ref.sh
From: Karthik Nayak
Add support for %(upstream:track,nobracket) which will print the
tracking information without the brackets (i.e. "ahead N, behind M").
This is needed when we port branch.c to use ref-filter's printing APIs.
Add test and documentation for the same.
Mentore
From: Karthik Nayak
Port branch.c to use ref-filter APIs for printing. This clears out
most of the code used in branch.c for printing and replaces them with
calls made to the ref-filter library.
Introduce build_format() which gets the format required for printing
of refs. Make amendments to
From: Karthik Nayak
Implement %(if), %(then) and %(else) atoms. Used as
%(if)...%(then)...%(end) or %(if)...%(then)...%(else)...%(end). If the
format string between %(if) and %(then) expands to an empty string, or
to only whitespaces, then the whole %(if)...%(end) expands to the string
following
From: Karthik Nayak
Call ref-filter's setup_ref_filter_porcelain_msg() to enable
translated messages for the %(upstream:tack) atom. Although branch.c
doesn't currently use ref-filter's printing API's, this will ensure
that when it does in the future patches, we do not
From: Karthik Nayak
Implement %(if:equals=) wherein the if condition is only
satisfied if the value obtained between the %(if:...) and %(then) atom
is the same as the given ''.
Similarly, implement (if:notequals=) wherein the if condition
is only satisfied if the value obtained betwee
Complimenting the existing 'lstrip=' option, add an 'rstrip='
option which strips `` slash-separated path components from the end
of the refname (e.g., `%(refname:rstrip=2)` turns `refs/tags/foo` into
`refs`).
Signed-off-by: Karthik Nayak
---
Documentation/git-f
From: Karthik Nayak
Using refname_atom_parser_internal(), introduce refname_atom_parser()
which will parse the %(symref) and %(refname) atoms. Store the parsed
information into the 'used_atom' structure based on the modifiers used
along with the atoms.
Now the '%(symref)
From: Karthik Nayak
Implement the '--format' option provided by 'ref-filter'. This lets the
user list branches as per desired format similar to the implementation
in 'git for-each-ref'.
Add tests and documentation for the same.
Mentored-by: Christian Couder
Men
From: Karthik Nayak
The "%(symref)" atom doesn't work when used with the ':short' modifier
because we strictly match only 'symref' for setting the 'need_symref'
indicator. Fix this by comparing with the valid_atom rather than the
used_atom.
Add
From: Karthik Nayak
Introduce setup_ref_filter_porcelain_msg() so that the messages used in
the atom %(upstream:track) can be translated if needed. By default, keep
the messages untranslated, which is the right behavior for plumbing
commands. This is needed as we port branch.c to use ref
From: Karthik Nayak
Borrowing from branch.c's implementation print "[gone]" whenever an
unknown upstream ref is encountered instead of just ignoring it.
This makes sure that when branch.c is ported over to using ref-filter
APIs for printing, this feature is not lost.
Make cha
only 'N'
slash-separated path components from the right-most end.
For e.g. %(refname:lstrip=-1) would make 'foo/goo/abc' into 'abc'.
Add documentation and tests for the same.
Signed-off-by: Karthik Nayak
---
Documentation/git-for-each-ref.txt | 7 ++-
ref-f
From: Karthik Nayak
Ensure that each 'atom_value' has a reference to its corresponding
'used_atom'. This lets us use values within 'used_atom' in the
'handler' function.
Hence we can get the %(align) atom's parameters directly from the
'used
From: Karthik Nayak
Since there are multiple atoms which print refs ('%(refname)',
'%(symref)', '%(push)', '%(upstream)'), it makes sense to have a common
ground for parsing them. This would allow us to share implementations of
the atom m
From: Karthik Nayak
Move the implementation of get_head_description() from branch.c to
ref-filter. This gives a description of the HEAD ref if called. This
is used as the refname for the HEAD ref whenever the
FILTER_REFS_DETACHED_HEAD option is used. Make it public because we
need it to
From: Karthik Nayak
Add support for %(objectname:short=) which would print the
abbreviated unique objectname of given length. When no length is
specified, the length is 'DEFAULT_ABBREV'. The minimum length is
'MINIMUM_ABBREV'. The length may be exceeded to ensure that the
pro
85594700011&r=1&w=2)
Thanks to Junio and Jacob for their suggestions wrt the previous version.
Interdiff at the bottom.
Karthik Nayak (20):
ref-filter: implement %(if), %(then), and %(else) atoms
ref-filter: include reference to 'used_atom' within 'atom_value'
From: Karthik Nayak
To allow column display, we will need to first render the output in a
string list to allow print_columns() to compute the proper size of
each column before starting the actual output. Introduce the function
format_ref_array_item() that does the formatting of a ref_array_item
On Wed, Dec 28, 2016 at 2:47 AM, Junio C Hamano wrote:
> Karthik Nayak writes:
>
>> static char branch_colors[][COLOR_MAXLEN] = {
>> - GIT_COLOR_RESET,
>> - GIT_COLOR_NORMAL, /* PLAIN */
>> - GIT_COLOR_RED, /* REMOTE */
>> -
On Wed, Dec 28, 2016 at 2:41 AM, Junio C Hamano wrote:
> Karthik Nayak writes:
>
>> Currently the 'lstrip=' option only takes a positive value ''
>> and strips '' slash-separated path components from the left. Modify
>> the 'lstrip
On Wed, Dec 28, 2016 at 2:34 AM, Junio C Hamano wrote:
> Karthik Nayak writes:
>
>> +symref::
>> + The ref which the given symbolic ref refers to. If not a
>> + symbolic ref, nothing is printed. Respects the `:short` and
>> + `:strip` options in t
On Wed, Dec 28, 2016 at 2:29 AM, Junio C Hamano wrote:
> Karthik Nayak writes:
>
>> From: Karthik Nayak
>>
>> Ensure that each 'atom_value' has a reference to its corresponding
>> 'used_atom'. This let's us use values within 'used_
On Wed, Dec 28, 2016 at 2:30 AM, Junio C Hamano wrote:
> Karthik Nayak writes:
>
>> This is done by introducing 'if_atom_parser()' which parses the given
>> %(if) atom and then stores the data in used_atom which is later passed
>> on to the used_atom of the %
On Wed, Dec 28, 2016 at 2:28 AM, Junio C Hamano wrote:
> Karthik Nayak writes:
>
>>
>> +Some atoms like %(align) and %(if) always require a matching %(end).
>> +We call them "opening atoms" and sometimes denote them as %($open).
>> +
>> +When a sc
From: Karthik Nayak
Using refname_atom_parser_internal(), introduce refname_atom_parser()
which will parse the %(symref) and %(refname) atoms. Store the parsed
information into the 'used_atom' structure based on the modifiers used
along with the atoms.
Now the '%(symref)
From: Karthik Nayak
Add support for %(upstream:track,nobracket) which will print the
tracking information without the brackets (i.e. "ahead N, behind M").
This is needed when we port branch.c to use ref-filter's printing APIs.
Add test and documentation for the same.
Mentore
From: Karthik Nayak
Since there are multiple atoms which print refs ('%(refname)',
'%(symref)', '%(push)', '%(upstream)'), it makes sense to have a common
ground for parsing them. This would allow us to share implementations of
the atom m
In preparation for the upcoming patch, where we introduce the 'rstrip'
option. Rename the 'strip' option to 'lstrip' to remove ambiguity.
Signed-off-by: Karthik Nayak
---
Documentation/git-for-each-ref.txt | 10 +-
builtin/tag.c
Complimenting the existing 'lstrip=' option, add an 'rstrip='
option which strips `` slash-separated path components from the end
of the refname (e.g., `%(refname:rstrip=2)` turns `refs/tags/foo` into
`refs`).
Signed-off-by: Karthik Nayak
---
Documentation/git-f
From: Karthik Nayak
Move the implementation of get_head_description() from branch.c to
ref-filter. This gives a description of the HEAD ref if called. This
is used as the refname for the HEAD ref whenever the
FILTER_REFS_DETACHED_HEAD option is used. Make it public because we
need it to
From: Karthik Nayak
Use the recently introduced refname_atom_parser_internal() within
remote_ref_atom_parser(), this provides a common base for all the ref
printing atoms, allowing %(upstream) and %(push) to also use the
':strip' option.
The atoms '%(push)' and '%(u
From: Karthik Nayak
Port branch.c to use ref-filter APIs for printing. This clears out
most of the code used in branch.c for printing and replaces them with
calls made to the ref-filter library.
Introduce build_format() which gets the format required for printing
of refs. Make amendments to
void this, return an empty string
whenever the value 'N' is greater than the number of components
available, instead of calling die().
Signed-off-by: Karthik Nayak
---
Documentation/git-for-each-ref.txt | 3 +--
ref-filter.c | 3 +--
t/t6300-for-each-ref.sh
From: Karthik Nayak
Call ref-filter's setup_ref_filter_porcelain_msg() to enable
translated messages for the %(upstream:tack) atom. Although branch.c
doesn't currently use ref-filter's printing API's, this will ensure
that when it does in the future patches, we do not
From: Karthik Nayak
Introduce setup_ref_filter_porcelain_msg() so that the messages used in
the atom %(upstream:track) can be translated if needed. By default, keep
the messages untranslated, which is the right behavior for plumbing
commands. This is needed as we port branch.c to use ref
path components from the left.
Add documentation and tests for the same.
Signed-off-by: Karthik Nayak
---
Documentation/git-for-each-ref.txt | 3 ++-
ref-filter.c | 27 ++-
t/t6300-for-each-ref.sh| 12 ++--
3 files changed, 30 in
From: Karthik Nayak
To allow column display, we will need to first render the output in a
string list to allow print_columns() to compute the proper size of
each column before starting the actual output. Introduce the function
format_ref_array_item() that does the formatting of a ref_array_item
From: Karthik Nayak
Borrowing from branch.c's implementation print "[gone]" whenever an
unknown upstream ref is encountered instead of just ignoring it.
This makes sure that when branch.c is ported over to using ref-filter
APIs for printing, this feature is not lost.
Make cha
From: Karthik Nayak
The "%(symref)" atom doesn't work when used with the ':short' modifier
because we strictly match only 'symref' for setting the 'need_symref'
indicator. Fix this by comparing with the valid_atom rather than the
used_atom.
Add
From: Karthik Nayak
Add support for %(objectname:short=) which would print the
abbreviated unique objectname of given length. When no length is
specified, the length is 'DEFAULT_ABBREV'. The minimum length is
'MINIMUM_ABBREV'. The length may be exceeded to ensure that the
pro
From: Karthik Nayak
Implement the '--format' option provided by 'ref-filter'. This lets the
user list branches as per desired format similar to the implementation
in 'git for-each-ref'.
Add tests and documentation for the same.
Mentored-by: Christian Couder
Men
From: Karthik Nayak
Implement %(if), %(then) and %(else) atoms. Used as
%(if)...%(then)...%(end) or %(if)...%(then)...%(else)...%(end). If the
format string between %(if) and %(then) expands to an empty string, or
to only whitespaces, then the whole %(if)...%(end) expands to the string
following
From: Karthik Nayak
Implement %(if:equals=) wherein the if condition is only
satisfied if the value obtained between the %(if:...) and %(then) atom
is the same as the given ''.
Similarly, implement (if:notequals=) wherein the if condition
is only satisfied if the value obtained betwee
From: Karthik Nayak
Ensure that each 'atom_value' has a reference to its corresponding
'used_atom'. This let's us use values within 'used_atom' in the
'handler' function.
Hence we can get the %(align) atom's parameters directly from the
'
ic.
3. lstrip and rstrip doesn't die on less components.
Thanks Jacob, Junio, Jeff, Ramsay for their suggestions and help.
Karthik Nayak (20):
ref-filter: implement %(if), %(then), and %(else) atoms
ref-filter: include reference to 'used_atom' within 'atom_value'
re
On Sat, Dec 17, 2016 at 7:13 PM, Ramsay Jones
wrote:
>
>
> On 17/12/16 08:38, Karthik Nayak wrote:
>> Hello,
>>
>>>
>>> * kn/ref-filter-branch-list (2016-12-08) 20 commits
>>> - branch: implement '--format' option
>>> - bra
ore reviews, if any.
For now we need to come to a conclusion on the die vs empty discussion
(http://marc.info/?l=git&m=148112502029302&w=2) I'll start working on returning
empty rather than die.
Also Jeff suggested some changes, which I've incorporated into my local branch.
(http://marc.info/?t=14811250361&r=1&w=2). I'll reroll if no
further changes are
suggested soon :)
--
Regards,
Karthik Nayak
On Mon, Dec 12, 2016 at 10:10 PM, Jeff King wrote:
> On Mon, Dec 12, 2016 at 09:59:49PM +0530, Karthik Nayak wrote:
>
>> >> > This caller never stores the return value, and it ends up leaking. So I
>> >> > wonder if you wanted "static struct strbuf&qu
On Mon, Dec 12, 2016 at 5:45 PM, Jeff King wrote:
> On Mon, Dec 12, 2016 at 04:50:20PM +0530, Karthik Nayak wrote:
>
>> > This caller never stores the return value, and it ends up leaking. So I
>> > wonder if you wanted "static struct strbuf" in the first plac
On Fri, Dec 9, 2016 at 7:33 PM, Jeff King wrote:
> On Wed, Dec 07, 2016 at 09:06:26PM +0530, Karthik Nayak wrote:
>
>> +const char *quote_literal_for_format(const char *s)
>> {
>> + struct strbuf buf = STRBUF_INIT;
>>
>> + strbuf_reset(&buf);
>
On Fri, Dec 9, 2016 at 5:28 AM, Junio C Hamano wrote:
> Thanks.
>
> Will replace, with the attached stylistic fixes squashed in for
> minor issues that were spotted by my mechanical pre-acceptance
> filter.
>
Thanks for this. Will add it to my local branch too if there's a need
for a re-roll.
we said, while potentially keeping the entire string. I feel
> that's a better alternative than a die() in the middle of a ref
> filter..
>
> What are other people's thoughts on this?
I am _for_ this. Even I think it'd be better to return an empty string rather
than just die in the middle.
--
Regards,
Karthik Nayak
From: Karthik Nayak
Add support for %(upstream:track,nobracket) which will print the
tracking information without the brackets (i.e. "ahead N, behind M").
This is needed when we port branch.c to use ref-filter's printing APIs.
Add test and documentation for the same.
Mentore
From: Karthik Nayak
The "%(symref)" atom doesn't work when used with the ':short' modifier
because we strictly match only 'symref' for setting the 'need_symref'
indicator. Fix this by comparing with the valid_atom rather than the
used_atom.
Add
From: Karthik Nayak
Implement %(if:equals=) wherein the if condition is only
satisfied if the value obtained between the %(if:...) and %(then) atom
is the same as the given ''.
Similarly, implement (if:notequals=) wherein the if condition
is only satisfied if the value obtained betwee
From: Karthik Nayak
Implement %(if), %(then) and %(else) atoms. Used as
%(if)...%(then)...%(end) or %(if)...%(then)...%(else)...%(end). If the
format string between %(if) and %(then) expands to an empty string, or
to only whitespaces, then the whole %(if)...%(end) expands to the string
following
From: Karthik Nayak
Move the implementation of get_head_description() from branch.c to
ref-filter. This gives a description of the HEAD ref if called. This
is used as the refname for the HEAD ref whenever the
FILTER_REFS_DETACHED_HEAD option is used. Make it public because we
need it to
From: Karthik Nayak
Add support for %(objectname:short=) which would print the
abbreviated unique objectname of given length. When no length is
specified, the length is 'DEFAULT_ABBREV'. The minimum length is
'MINIMUM_ABBREV'. The length may be exceeded to ensure that the
pro
From: Karthik Nayak
To allow column display, we will need to first render the output in a
string list to allow print_columns() to compute the proper size of
each column before starting the actual output. Introduce the function
format_ref_array_item() that does the formatting of a ref_array_item
From: Karthik Nayak
Implement the '--format' option provided by 'ref-filter'. This lets the
user list branches as per desired format similar to the implementation
in 'git for-each-ref'.
Add tests and documentation for the same.
Mentored-by: Christian Couder
Men
From: Karthik Nayak
Port branch.c to use ref-filter APIs for printing. This clears out
most of the code used in branch.c for printing and replaces them with
calls made to the ref-filter library.
Introduce build_format() which gets the format required for printing
of refs. Make amendments to
From: Karthik Nayak
Call ref-filter's setup_ref_filter_porcelain_msg() to enable
translated messages for the %(upstream:tack) atom. Although branch.c
doesn't currently use ref-filter's printing API's, this will ensure
that when it does in the future patches, we do not
From: Karthik Nayak
Borrowing from branch.c's implementation print "[gone]" whenever an
unknown upstream ref is encountered instead of just ignoring it.
This makes sure that when branch.c is ported over to using ref-filter
APIs for printing, this feature is not lost.
Make cha
In preparation for the upcoming patch, where we introduce the 'rstrip'
option. Rename the 'strip' option to 'lstrip' to remove ambiguity.
Signed-off-by: Karthik Nayak
---
Documentation/git-for-each-ref.txt | 10 +-
builtin/tag.c
path components from the left.
Add documentation and tests for the same.
Signed-off-by: Karthik Nayak
---
Documentation/git-for-each-ref.txt | 5 +++--
ref-filter.c | 26 +-
t/t6300-for-each-ref.sh| 15 ---
3 files changed, 3
From: Karthik Nayak
Since there are multiple atoms which print refs ('%(refname)',
'%(symref)', '%(push)', '%(upstream)'), it makes sense to have a common
ground for parsing them. This would allow us to share implementations of
the atom m
From: Karthik Nayak
Using refname_atom_parser_internal(), introduce refname_atom_parser()
which will parse the %(symref) and %(refname) atoms. Store the parsed
information into the 'used_atom' structure based on the modifiers used
along with the atoms.
Now the '%(symref)
Complimenting the existing 'lstrip=' option, add an 'rstrip='
option which strips `` slash-separated path components from the end
of the refname (e.g., `%(refname:rstrip=2)` turns `refs/tags/foo` into
`refs`).
Signed-off-by: Karthik Nayak
---
Documentation/git-f
From: Karthik Nayak
Introduce setup_ref_filter_porcelain_msg() so that the messages used in
the atom %(upstream:track) can be translated if needed. By default, keep
the messages untranslated, which is the right behavior for plumbing
commands. This is needed as we port branch.c to use ref
From: Karthik Nayak
Use the recently introduced refname_atom_parser_internal() within
remote_ref_atom_parser(), this provides a common base for all the ref
printing atoms, allowing %(upstream) and %(push) to also use the
':strip' option.
The atoms '%(push)' and '%(u
From: Karthik Nayak
Ensure that each 'atom_value' has a reference to its corresponding
'used_atom'. This let's us use values within 'used_atom' in the
'handler' function.
Hence we can get the %(align) atom's parameters directly from the
'
char *s) for safer string
insertions in branch.c:build_format().
Thanks to Jacob, Jackub, Junio and Matthieu for their inputs on the
previous version.
Interdiff below.
Karthik Nayak (19):
ref-filter: implement %(if), %(then), and %(else) atoms
ref-filter: include reference to 'used_atom
On Sun, Nov 20, 2016 at 11:02 PM, Junio C Hamano wrote:
> Karthik Nayak writes:
>
>> We could have lstrip and rstrip as you suggested and perhaps make it work
>> together too. But I see this going off the scope of this series. Maybe
>> I'll follow up
>> wi
On Mon, Nov 21, 2016 at 2:11 PM, Matthieu Moy
wrote:
> Karthik Nayak writes:
>
>> cc'in Matthieu since he wrote the patch.
>>
>> On Sat, Nov 19, 2016 at 4:16 AM, Jakub Narębski wrote:
>>> W dniu 08.11.2016 o 21:12, Karthik Nayak pisze:
>>
27;) {
> strbuf_addstr(&buf, "%%");
> s = ep + 1;
> } else {
> s = ep;
> }
> }
> return buf.buf;
> }
>
Perfect. I get what you're saying, I'll add this in :)
--
Regards,
Karthik Nayak
On Sun, Nov 20, 2016 at 8:46 PM, Karthik Nayak wrote:
> On Fri, Nov 18, 2016 at 11:48 PM, Junio C Hamano wrote:
>> Jacob Keller writes:
>>
>>>>>> to get remotes from /refs/foo/abc/xyz we'd need to do
>>>>>> strip=1,strip=-1, whi
cc'in Matthieu since he wrote the patch.
On Sat, Nov 19, 2016 at 4:16 AM, Jakub Narębski wrote:
> W dniu 08.11.2016 o 21:12, Karthik Nayak pisze:
>> From: Karthik Nayak
>>
>> Introduce setup_ref_filter_porcelain_msg() so that the messages used in
>> the atom %(u
quot;strip to leave only 2 components" and compare the result
>>>> with refs/remotes instead, no?
>>>>
>>>
>>> Of course, my only objective was that someone would find it useful to
>>> have these two additional
>>> atoms. So if you th
On Sat, Nov 19, 2016 at 3:06 AM, Jakub Narębski wrote:
> W dniu 08.11.2016 o 21:12, Karthik Nayak pisze:
>> From: Karthik Nayak
>>
>> Since there are multiple atoms which print refs ('%(refname)',
>> '%(symref)', '%(push)', '%upstrea
On Sat, Nov 19, 2016 at 3:04 AM, Jakub Narębski wrote:
> W dniu 08.11.2016 o 21:12, Karthik Nayak pisze:
>>
>> Helped-by: Junio C Hamano
>> Signed-off-by: Karthik Nayak
>> ---
> [...]
>
>> +test_expect_success 'Add symbolic ref for the following tests
On Sat, Nov 19, 2016 at 1:28 AM, Jakub Narębski wrote:
> W dniu 08.11.2016 o 21:11, Karthik Nayak pisze:
>> From: Karthik Nayak
>>
>> Implement %(if:equals=) wherein the if condition is only
>> satisfied if the value obtained between the %(if:...) and %(then) atom
On Sat, Nov 19, 2016 at 5:01 AM, Junio C Hamano wrote:
> Karthik Nayak writes:
>
>> Thanks, will add it in.
>
> OK, here is a reroll of what I sent earlier in
>
>
> http://public-inbox.org/git/
>
> but rebased so that it can happen as a preparatory bugfix
Hey,
On Fri, Nov 18, 2016 at 12:05 AM, Junio C Hamano wrote:
> Karthik Nayak writes:
>
>> On Tue, Nov 15, 2016 at 11:12 PM, Junio C Hamano wrote:
>>> Jacob Keller writes:
>>> ...
>>> I think you are going in the right direction. I had a similar
>&g
On Wed, Nov 16, 2016 at 2:13 AM, Junio C Hamano wrote:
> Karthik Nayak writes:
>
>> This is part of unification of the commands 'git tag -l, git branch -l
>> and git for-each-ref'. This ports over branch.c to use ref-filter's
>> printing options.
&g
uld be most ideal.
The necessity is that we need to do different formatting as per the
ref type in branch -l. If you see the
last but one patch, we do
strbuf_addf(&fmt,
"%%(if:notequals=remotes)%%(refname:base)%%(then)%s%%(else)%s%%(end)",
local.buf, remote.buf);
where its using ':base' to check for the ref type and do conditional
printing along with the %(if)...%(end) atoms.
--
Regards,
Karthik Nayak
On Tue, Nov 15, 2016 at 1:21 AM, Junio C Hamano wrote:
> Karthik Nayak writes:
>
>>> - More importantly, what do these do? I do not think of a good
>>>description that generalizes "base of refs/foo/bar/boz is foo" to
>>>explain your :base.
>
On Mon, Nov 14, 2016 at 7:25 AM, Junio C Hamano wrote:
> Karthik Nayak writes:
>
>>>> diff --git a/Documentation/git-for-each-ref.txt
>>>> b/Documentation/git-for-each-ref.txt
>>>> index 600b703..f4ad297 100644
>>>> --- a/Documentation/git-
Hello,
On Wed, Nov 9, 2016 at 5:45 AM, Jacob Keller wrote:
> On Tue, Nov 8, 2016 at 12:11 PM, Karthik Nayak wrote:
>> This is part of unification of the commands 'git tag -l, git branch -l
>> and git for-each-ref'. This ports over branch.c to use ref-fil
Hello
On Wed, Nov 9, 2016 at 5:44 AM, Jacob Keller wrote:
> On Tue, Nov 8, 2016 at 12:12 PM, Karthik Nayak wrote:
>> From: Karthik Nayak
>>
>> Port branch.c to use ref-filter APIs for printing. This clears out
>> most of the code used in branch.c for printing and
Hello,
On Wed, Nov 9, 2016 at 5:28 AM, Jacob Keller wrote:
> On Tue, Nov 8, 2016 at 12:12 PM, Karthik Nayak wrote:
>> From: Karthik Nayak
>> Add tests and documentation for the same.
>>
>> Signed-off-by: Karthik Nayak
>> ---
>>
On Wed, Nov 9, 2016 at 5:22 AM, Jacob Keller wrote:
> On Tue, Nov 8, 2016 at 12:12 PM, Karthik Nayak wrote:
>> From: Karthik Nayak
>
> What's the reasoning for using separate functions here if they are
> exactly identical except for name? Do we intend to add separate
>
On Wed, Nov 9, 2016 at 5:15 AM, Jacob Keller wrote:
> On Tue, Nov 8, 2016 at 12:12 PM, Karthik Nayak wrote:
>> From: Karthik Nayak
>>
>> Add support for %(upstream:track,nobracket) which will print the
>> tracking information without the brackets (i.e. "ahead
considered a bug.
>
Didn't get you.
>> Mentored-by: Christian Couder
>> Mentored-by: Matthieu Moy
>> Helped-by : Jacob Keller
>> Signed-off-by: Karthik Nayak
>> ---
>> Documentation/git-for-each-ref.txt | 3 ++-
>> ref-filter.c
1 - 100 of 1441 matches
Mail list logo