On Fri, Nov 11, 2016 at 4:50 AM, Junio C Hamano <gits...@pobox.com> wrote:
> Karthik Nayak <karthik@gmail.com> writes:
>
>>> Minor nit. I'm not sure what standard we use here at Git, but
>>> traditionally, I prefer to see { } blocks on all section
nore that when a
> truly trivial single liner follows if() even if its else clause is a
> big block, e.g.
>
> if (cond)
> single;
> else {
> big;
> block;
> }
>
> I agree with you that this case should just use {} for the following
> paragraph, because it is technically a single-liner, but comes with
> a big comment block and is very much easier to read with {} around
> it.
>
Ah! I see, sure I'll change it :)
--
Regards,
Karthik Nayak
On Wed, Nov 9, 2016 at 5:01 AM, Jacob Keller <jacob.kel...@gmail.com> wrote:
> On Tue, Nov 8, 2016 at 12:11 PM, Karthik Nayak <karthik@gmail.com> wrote:
>
>>
>> - if (starts_with(name, "refname"))
>>
On Wed, Nov 9, 2016 at 4:52 AM, Jacob Keller <jacob.kel...@gmail.com> wrote:
> On Tue, Nov 8, 2016 at 12:11 PM, Karthik Nayak <karthik@gmail.com> wrote:
>
> Ok. How does this handle whitespace? The previous if implementation
> treated whitespace as trimming to i
On Wed, Nov 9, 2016 at 4:57 AM, Jacob Keller <jacob.kel...@gmail.com> wrote:
> On Tue, Nov 8, 2016 at 12:11 PM, Karthik Nayak <karthik@gmail.com> wrote:
>> From: Karthik Nayak <karthik@gmail.com>
>>
>> Add support for %(objectname:short=) whic
ion and we were copying it.
>
> Ok, so this looks good.
>
It is confusing if one only looks at the patch without actually going
through ref-filter.c. I'm sure your comment will help
anyone going through these patches.
--
Regards,
Karthik Nayak
Hey,
On Wed, Nov 9, 2016 at 4:43 AM, Jacob Keller <jacob.kel...@gmail.com> wrote:
> On Tue, Nov 8, 2016 at 12:11 PM, Karthik Nayak <karthik@gmail.com> wrote:
>> From: Karthik Nayak <karthik@gmail.com>
>>
>> +Some atoms like %(align) and %(if) always
From: Karthik Nayak <karthik@gmail.com>
Using refname_atom_parser_internal(), introduce symref_atom_parser() and
refname_atom_parser() which will parse the atoms %(symref) and
%(refname) respectively. Store the parsed information into the
'used_atom' structure based on the modifier
From: Karthik Nayak <karthik@gmail.com>
Add the options `:dir` and `:base` to all ref printing ('%(refname)',
'%(symref)', '%(push)' and '%(upstream)') atoms. The `:dir` option gives
the directory (the part after $GIT_DIR/) of the ref without the
refname. The `:base` option gives th
From: Karthik Nayak <karthik@gmail.com>
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 fea
From: Karthik Nayak <karthik@gmail.com>
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 no
From: Karthik Nayak <karthik@gmail.com>
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() tha
From: Karthik Nayak <karthik@gmail.com>
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
From: Karthik Nayak <karthik@gmail.com>
Introduce setup_ref_filter_porcelain_msg() so that the messages used in
the atom %(upstream:track) can be translated if needed. This is needed
as we port branch.c to use ref-filter's printing API's.
Written-by: Matthieu Moy <matthieu
From: Karthik Nayak <karthik@gmail.com>
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 modifiers between these
From: Karthik Nayak <karthik@gmail.com>
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
o
From: Karthik Nayak <karthik@gmail.com>
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 documentat
From: Karthik Nayak <karthik@gmail.com>
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 using comparing with valid_atom rather than used_atom.
Add te
From: Karthik Nayak <karthik@gmail.com>
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 '
From: Karthik Nayak <karthik@gmail.com>
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
From: Karthik Nayak <karthik@gmail.com>
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
From: Karthik Nayak <karthik@gmail.com>
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
'used_atom' therefore re
From: Karthik Nayak <karthik@gmail.com>
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
From: Karthik Nayak <karthik@gmail.com>
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) e
://marc.info/?l=git=146330914118766=2
Changes in this version:
1. Rebased on top of master.
Karthik Nayak (17):
ref-filter: implement %(if), %(then), and %(else) atoms
ref-filter: include reference to 'used_atom' within 'atom_value'
ref-filter: implement %(if:equals=) and
%(if:notequals=)
ref
Helo,
On Tue, Nov 8, 2016 at 1:58 PM, Jacob Keller <jacob.kel...@gmail.com> wrote:
> On Nov 8, 2016 12:24 AM, "Karthik Nayak" <karthik@gmail.com> wrote:
>> Anything I could do to push this forward? It's been a while now.
>
> Hi,
>
> If this just nee
Hello,
>
> * kn/ref-filter-branch-list (2016-05-17) 17 commits
> - branch: implement '--format' option
> - branch: use ref-filter printing APIs
> - branch, tag: use porcelain output
> - ref-filter: allow porcelain to translate messages in the output
> - ref-filter: add `:dir` and `:base`
ually does even
> though they're months old at this point?
>
Not that your review would be absolute but it definitely would be a start.
Replying directly to the patches is the way to go I feel.
--
Regards,
Karthik Nayak
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
hat topic is waiting on more review.
> If you're willing and able to do so, that would be a big help.
>
It's been waiting for review for a _long_ time now.
--
Regards,
Karthik Nayak
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
>> + }
>
> ... but the change is apparently lost.
>
> It is a good lesson not to blindly rebase things on 'next', which
> would have unrelated changes. If you needed es/test-gpg-tags topic
> for the test script change, check out 'master', merge that single
> topic,
On Wed, May 18, 2016 at 2:00 AM, Junio C Hamano <gits...@pobox.com> wrote:
> Karthik Nayak <karthik@gmail.com> writes:
>
>> Sorry for that.
>> The only reason I haven't based it on 'master' is because it doesn't contain
>> 'f307218'.
>>
>> ➔
On Tue, May 17, 2016 at 11:22 PM, Junio C Hamano <gits...@pobox.com> wrote:
> Karthik Nayak <karthik@gmail.com> writes:
>
>> Hello, sorry for the confusion, it's built on top of 'next' which contains
>> f307218 (t6302: simplify non-gpg cases). The merge conflic
On Tue, May 17, 2016 at 3:42 AM, Junio C Hamano <gits...@pobox.com> wrote:
>
> Karthik Nayak <karthik@gmail.com> 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
eu Moy <matthieu@grenoble-inp.fr>
Signed-off-by: Karthik Nayak <karthik@gmail.com>
---
Documentation/git-branch.txt | 7 ++-
builtin/branch.c | 14 +-
t/t3203-branch-output.sh | 14 ++
3 files changed, 29 insertions(+), 6 deleti
symrefs by default. We also
allow the user to change the format if needed with the introduction of
the '--format' option in the next patch.
Mentored-by: Christian Couder <christian.cou...@gmail.com>
Mentored-by: Matthieu Moy <matthieu@grenoble-inp.fr>
Signed-off-by: Karthik Na
following $GIT_DIR/refs/).
Add tests and documentation for the same.
Signed-off-by: Karthik Nayak <karthik@gmail.com>
---
Documentation/git-for-each-ref.txt | 34 +++---
ref-filter.c | 29 +
t/t6300-for-each-
as a common parsing
function for ref printing atoms. This would eventually be used to
introduce refname_atom_parser() and symref_atom_parser() and also be
internally used in remote_ref_atom_parser().
Helped-by: Jeff King <p...@peff.net>
Signed-off-by: Karthik Nayak <karthik@gmail.com&
Couder <christian.cou...@gmail.com>
Mentored-by: Matthieu Moy <matthieu@grenoble-inp.fr>
Signed-off-by: Karthik Nayak <karthik@gmail.com>
---
ref-filter.c | 28
ref-filter.h | 2 ++
2 files changed, 26 insertions(+), 4 deletions(-)
diff --git a/ref-filte
' atom modifiers to themselves as they have no meaning in
context to the '%(refname)' and '%(symref)' atoms.
Update the documentation and tests to reflect the same.
Signed-off-by: Karthik Nayak <karthik@gmail.com>
---
Documentation/git-for-each-ref.txt | 27 ++
e.
Helped-by: Junio C Hamano <gits...@pobox.com>
Signed-off-by: Karthik Nayak <karthik@gmail.com>
---
ref-filter.c| 2 +-
t/t6300-for-each-ref.sh | 24
2 files changed, 25 insertions(+), 1 deletion(-)
diff --git a/ref-filter.c b/ref-filter.c
index b
-by: Matthieu Moy <matthieu@grenoble-inp.fr>
Mentored-by: Christian Couder <christian.cou...@gmail.com>
Mentored-by: Matthieu Moy <matthieu@grenoble-inp.fr>
Signed-off-by: Karthik Nayak <karthik@gmail.com>
---
builtin/branch.c | 2 ++
builtin/tag.c| 2 ++
2 fil
supports the ':strip' atom modifier. Update the
Documentation and tests to reflect this.
Helped-by: Jeff King <p...@peff.net>
Signed-off-by: Karthik Nayak <karthik@gmail.com>
---
Documentation/git-for-each-ref.txt | 5 +++
ref-filter.c
.
show_ref_array_item() is kept as a convenience wrapper around it which
obtains the strbuf and prints it the standard output.
Mentored-by: Christian Couder <christian.cou...@gmail.com>
Mentored-by: Matthieu Moy <matthieu@grenoble-inp.fr>
Signed-off-by: Karthik Nayak <karthik@gmai
christian.cou...@gmail.com>
Mentored-by: Matthieu Moy <matthieu@grenoble-inp.fr>
Signed-off-by: Karthik Nayak <karthik@gmail.com>
---
Documentation/git-for-each-ref.txt | 8 +++--
ref-filter.c | 67 +-
t/t6300-for-each-
parameters to 'atom_value'.
This also acts as a preparatory patch for the upcoming patch where we
introduce %(if:equals=) and %(if:notequals=).
Signed-off-by: Karthik Nayak <karthik@gmail.com>
---
ref-filter.c | 8 +++-
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/ref-filt
com>
Mentored-by: Matthieu Moy <matthieu@grenoble-inp.fr>
Signed-off-by: Karthik Nayak <karthik@gmail.com>
---
Documentation/git-for-each-ref.txt | 45 +++--
ref-filter.c | 133 +++--
t/t6302-for-each-ref-f
ach-ref.sh and
Documentation/git-for-each-ref.txt to reflect this change.
Mentored-by: Christian Couder <christian.cou...@gmail.com>
Mentored-by: Matthieu Moy <matthieu@grenoble-inp.fr>
Helped-by : Jacob Keller <jacob.kel...@gmail.com>
Signed-off-by: Karthik Nayak <karthik@gm
and documentation for the same.
Mentored-by: Christian Couder <christian.cou...@gmail.com>
Mentored-by: Matthieu Moy <matthieu@grenoble-inp.fr>
Helped-by: Jacob Keller <jacob.kel...@gmail.com>
Signed-off-by: Karthik Nayak <karthik@gmail.com>
---
Documentation/g
.
Mentored-by: Christian Couder <christian.cou...@gmail.com>
Mentored-by: Matthieu Moy <matthieu@grenoble-inp.fr>
Signed-off-by: Karthik Nayak <karthik@gmail.com>
---
Documentation/git-for-each-ref.txt | 3 +++
ref-filter.c
of the HEAD refs description in
branch.c:calc_maxwidth() when we port branch.c to use ref-filter
APIs.
Mentored-by: Christian Couder <christian.cou...@gmail.com>
Mentored-by: Matthieu Moy <matthieu@grenoble-inp.fr>
Signed-off-by: Karthik Nayak <karthik@gmail.com>
---
bui
. Rebased on top of f307218 (t6302: simplify non-gpg cases). This
patch ensures that we only use signed tags when GPG is installed and
effectively gets rid of the bug introduced by 01/17 (ref-filter:
implement %(if), %(then), and %(else) atoms)[1].
[1]: $(gmane/293901)
Karthik Nayak (17):
ref-filter
On Tue, Apr 26, 2016 at 3:17 AM, Junio C Hamano <gits...@pobox.com> wrote:
> Karthik Nayak <karthik@gmail.com> 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 re
supports the ':strip' atom modifier. Update the
Documentation and tests to reflect this.
Helped-by: Jeff King <p...@peff.net>
Signed-off-by: Karthik Nayak <karthik@gmail.com>
---
Documentation/git-for-each-ref.txt | 5 +++
ref-filter.c
e.
Helped-by: Junio C Hamano <gits...@pobox.com>
Signed-off-by: Karthik Nayak <karthik@gmail.com>
---
ref-filter.c| 2 +-
t/t6300-for-each-ref.sh | 24
2 files changed, 25 insertions(+), 1 deletion(-)
diff --git a/ref-filter.c b/ref-filter.c
index b
parameters to 'atom_value'.
This also acts as a preparatory patch for the upcoming patch where we
introduce %(if:equals=) and %(if:notequals=).
Signed-off-by: Karthik Nayak <karthik@gmail.com>
---
ref-filter.c | 8 +++-
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/ref-filt
following $GIT_DIR/refs/).
Add tests and documentation for the same.
Signed-off-by: Karthik Nayak <karthik@gmail.com>
---
Documentation/git-for-each-ref.txt | 34 +++---
ref-filter.c | 29 +
t/t6300-for-each-
of the HEAD refs description in
branch.c:calc_maxwidth() when we port branch.c to use ref-filter
APIs.
Mentored-by: Christian Couder <christian.cou...@gmail.com>
Mentored-by: Matthieu Moy <matthieu@grenoble-inp.fr>
Signed-off-by: Karthik Nayak <karthik@gmail.com>
---
bui
' atom modifiers to themselves as they have no meaning in
context to the '%(refname)' and '%(symref)' atoms.
Update the documentation and tests to reflect the same.
Signed-off-by: Karthik Nayak <karthik@gmail.com>
---
Documentation/git-for-each-ref.txt | 27 ++
christian.cou...@gmail.com>
Mentored-by: Matthieu Moy <matthieu@grenoble-inp.fr>
Signed-off-by: Karthik Nayak <karthik@gmail.com>
---
Documentation/git-for-each-ref.txt | 8 +++--
ref-filter.c | 67 +-
t/t6300-for-each-
symrefs by default. We also
allow the user to change the format if needed with the introduction of
the '--format' option in the next patch.
Mentored-by: Christian Couder <christian.cou...@gmail.com>
Mentored-by: Matthieu Moy <matthieu@grenoble-inp.fr>
Signed-off-by: Karthik Na
as a common parsing
function for ref printing atoms. This would eventually be used to
introduce refname_atom_parser() and symref_atom_parser() and also be
internally used in remote_ref_atom_parser().
Helped-by: Jeff King <p...@peff.net>
Signed-off-by: Karthik Nayak <karthik@gmail.com&
eu Moy <matthieu@grenoble-inp.fr>
Signed-off-by: Karthik Nayak <karthik@gmail.com>
---
Documentation/git-branch.txt | 7 ++-
builtin/branch.c | 14 +-
t/t3203-branch-output.sh | 14 ++
3 files changed, 29 insertions(+), 6 deleti
-by: Matthieu Moy <matthieu@grenoble-inp.fr>
Mentored-by: Christian Couder <christian.cou...@gmail.com>
Mentored-by: Matthieu Moy <matthieu@grenoble-inp.fr>
Signed-off-by: Karthik Nayak <karthik@gmail.com>
---
builtin/branch.c | 2 ++
builtin/tag.c| 2 ++
2 fil
Couder <christian.cou...@gmail.com>
Mentored-by: Matthieu Moy <matthieu@grenoble-inp.fr>
Signed-off-by: Karthik Nayak <karthik@gmail.com>
---
ref-filter.c | 28
ref-filter.h | 2 ++
2 files changed, 26 insertions(+), 4 deletions(-)
diff --git a/ref-filte
com>
Mentored-by: Matthieu Moy <matthieu@grenoble-inp.fr>
Signed-off-by: Karthik Nayak <karthik@gmail.com>
---
Documentation/git-for-each-ref.txt | 45 +++--
ref-filter.c | 133 +++--
t/t6302-for-each-ref-f
.
Mentored-by: Christian Couder <christian.cou...@gmail.com>
Mentored-by: Matthieu Moy <matthieu@grenoble-inp.fr>
Signed-off-by: Karthik Nayak <karthik@gmail.com>
---
Documentation/git-for-each-ref.txt | 3 +++
ref-filter.c
ach-ref.sh and
Documentation/git-for-each-ref.txt to reflect this change.
Mentored-by: Christian Couder <christian.cou...@gmail.com>
Mentored-by: Matthieu Moy <matthieu@grenoble-inp.fr>
Helped-by : Jacob Keller <jacob.kel...@gmail.com>
Signed-off-by: Karthik Nayak <karthik@gm
.
show_ref_array_item() is kept as a convenience wrapper around it which
obtains the strbuf and prints it the standard output.
Mentored-by: Christian Couder <christian.cou...@gmail.com>
Mentored-by: Matthieu Moy <matthieu@grenoble-inp.fr>
Signed-off-by: Karthik Nayak <karthik@gmai
and documentation for the same.
Mentored-by: Christian Couder <christian.cou...@gmail.com>
Mentored-by: Matthieu Moy <matthieu@grenoble-inp.fr>
Helped-by: Jacob Keller <jacob.kel...@gmail.com>
Signed-off-by: Karthik Nayak <karthik@gmail.com>
---
Documentation/g
-printing
atoms. Written by Jeff.
4. Fix a memory leak which was reported by Stefan ($gmane/291703).
Thanks to Junio, Jeff and Stefan for suggestions on the previous version.
Karthik Nayak (17):
ref-filter: implement %(if), %(then), and %(else) atoms
ref-filter: include reference to 'used_atom
-by: Matthieu Moy <matthieu@grenoble-inp.fr>
Mentored-by: Christian Couder <christian.cou...@gmail.com>
Mentored-by: Matthieu Moy <matthieu@grenoble-inp.fr>
Signed-off-by: Karthik Nayak <karthik@gmail.com>
---
builtin/branch.c | 2 ++
builtin/tag.c| 2 ++
2 fil
eu Moy <matthieu@grenoble-inp.fr>
Signed-off-by: Karthik Nayak <karthik@gmail.com>
---
Documentation/git-branch.txt | 7 ++-
builtin/branch.c | 14 +-
t/t3203-branch-output.sh | 14 ++
3 files changed, 29 insertions(+), 6 deleti
of the HEAD refs description in
branch.c:calc_maxwidth() when we port branch.c to use ref-filter
APIs.
Mentored-by: Christian Couder <christian.cou...@gmail.com>
Mentored-by: Matthieu Moy <matthieu@grenoble-inp.fr>
Signed-off-by: Karthik Nayak <karthik@gmail.com>
---
bui
' atom modifiers to themselves as they have no meaning in
context to the '%(refname)' and '%(symref)' atoms.
Update the documentation and tests to reflect the same.
Signed-off-by: Karthik Nayak <karthik@gmail.com>
---
Documentation/git-for-each-ref.txt | 27 ++
.
Mentored-by: Christian Couder <christian.cou...@gmail.com>
Mentored-by: Matthieu Moy <matthieu@grenoble-inp.fr>
Signed-off-by: Karthik Nayak <karthik@gmail.com>
---
Documentation/git-for-each-ref.txt | 3 +++
ref-filter.c
Beller <sbel...@google.com>
Signed-off-by: Karthik Nayak <karthik@gmail.com>
---
builtin/branch.c | 234 ++-
t/t3203-branch-output.sh | 2 +-
t/t6040-tracking-info.sh | 2 +-
3 files changed, 70 insertions(+), 168 deletions(-)
diff --
ach-ref.sh and
Documentation/git-for-each-ref.txt to reflect this change.
Mentored-by: Christian Couder <christian.cou...@gmail.com>
Mentored-by: Matthieu Moy <matthieu@grenoble-inp.fr>
Helped-by : Jacob Keller <jacob.kel...@gmail.com>
Signed-off-by: Karthik Nayak <karthik@gm
and documentation for the same.
Mentored-by: Christian Couder <christian.cou...@gmail.com>
Mentored-by: Matthieu Moy <matthieu@grenoble-inp.fr>
Helped-by: Jacob Keller <jacob.kel...@gmail.com>
Signed-off-by: Karthik Nayak <karthik@gmail.com>
---
Documentation/g
christian.cou...@gmail.com>
Mentored-by: Matthieu Moy <matthieu@grenoble-inp.fr>
Signed-off-by: Karthik Nayak <karthik@gmail.com>
---
Documentation/git-for-each-ref.txt | 8 +++--
ref-filter.c | 67 +-
t/t6300-for-each-
Couder <christian.cou...@gmail.com>
Mentored-by: Matthieu Moy <matthieu@grenoble-inp.fr>
Signed-off-by: Karthik Nayak <karthik@gmail.com>
---
ref-filter.c | 28
ref-filter.h | 2 ++
2 files changed, 26 insertions(+), 4 deletions(-)
diff --git a/ref-filte
e.
Helped-by: Junio C Hamano <gits...@pobox.com>
Signed-off-by: Karthik Nayak <karthik@gmail.com>
---
ref-filter.c| 2 +-
t/t6300-for-each-ref.sh | 24
2 files changed, 25 insertions(+), 1 deletion(-)
diff --git a/ref-filter.c b/ref-filter.c
index b
($gmane/291703).
Thanks to Junio, Jeff and Stefan for suggestions on the previous version.
Karthik Nayak (16):
ref-filter: include reference to 'used_atom' within 'atom_value'
ref-filter: implement %(if:equals=) and
%(if:notequals=)
ref-filter: modify "%(objectname:short)" to t
as a common parsing
function for ref printing atoms. This would eventually be used to
introduce refname_atom_parser() and symref_atom_parser() and also be
internally used in remote_ref_atom_parser().
Helped-by: Jeff King <p...@peff.net>
Signed-off-by: Karthik Nayak <karthik@gmail.com&
supports the ':strip' atom modifier. Update the
Documentation and tests to reflect this.
Helped-by: Jeff King <p...@peff.net>
Signed-off-by: Karthik Nayak <karthik@gmail.com>
---
Documentation/git-for-each-ref.txt | 5 +++
ref-filter.c
.
show_ref_array_item() is kept as a convenience wrapper around it which
obtains the strbuf and prints it the standard output.
Mentored-by: Christian Couder <christian.cou...@gmail.com>
Mentored-by: Matthieu Moy <matthieu@grenoble-inp.fr>
Signed-off-by: Karthik Nayak <karthik@gmai
following $GIT_DIR/refs/).
Add tests and documentation for the same.
Signed-off-by: Karthik Nayak <karthik@gmail.com>
---
Documentation/git-for-each-ref.txt | 34 +++---
ref-filter.c | 29 +
t/t6300-for-each-
parameters to 'atom_value'.
This also acts as a preparatory patch for the upcoming patch where we
introduce %(if:equals=) and %(if:notequals=).
Signed-off-by: Karthik Nayak <karthik@gmail.com>
---
ref-filter.c | 8 +++-
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/ref-filt
would you like to take care of this memleak?)
Seems like an easy fix. Will take care of it, Thanks :)
--
Regards,
Karthik Nayak
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
ame.option == R_BASE) {
> + return show_ref(>u.refname, ref->refname);
> +}
> +
> +static const char *show_ref(struct refname_atom *atom, const char *refname)
> +{
> + if (atom->option == R_SHORT)
> + return shorten_unambiguous_ref(refname, warn_ambiguous_refs);
> + else if (atom->option == R_STRIP)
> + return strip_ref_components(refname, atom->strip);
> + else if (atom->option == R_BASE) {
> const char *sp, *ep;
>
> - if (skip_prefix(ref->refname, "refs/", )) {
> + if (skip_prefix(refname, "refs/", )) {
> ep = strchr(sp, '/');
> if (!ep)
> return "";
> return xstrndup(sp, ep - sp);
> }
> return "";
> - } else if (atom->u.refname.option == R_DIR) {
> + } else if (atom->option == R_DIR) {
> const char *sp, *ep;
>
> - sp = ref->refname;
> + sp = refname;
> ep = strrchr(sp, '/');
> if (!ep)
> return "";
> return xstrndup(sp, ep - sp);
> } else
> - return ref->refname;
> + return refname;
> }
>
> /*
--
Regards,
Karthik Nayak
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
On Fri, Apr 15, 2016 at 2:13 AM, Jeff King <p...@peff.net> wrote:
> On Sun, Apr 10, 2016 at 12:15:10AM +0530, Karthik Nayak wrote:
>
>> +static void refname_atom_parser(struct used_atom *atom, const char *arg)
>> +{
>> + if (!arg)
>> +
lain command a change like
this shouldn't be a problem.
Junio, I'll re-roll with a small fix to the test written by Jeff soon.
--
Regards,
Karthik Nayak
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
ere, WRT to the patch v4 it seems the problem is that
patch v4 doesn't support v2.6.x behavior, namely that cross-prefix symrefs will
not be shortened at all. As per the format given in the last patch
[16/16] it shortens
the symref irrespective of being cross-prefix symrefs.
Would it be a good ide
Hello,
On Wed, Apr 13, 2016 at 2:35 AM, Junio C Hamano <gits...@pobox.com> wrote:
> Junio C Hamano <gits...@pobox.com> writes:
>
>> Karthik Nayak <karthik@gmail.com> writes:
>>
>>> +br
, the
timestamp of the files involved are updated to reflect the merge.
Your text editor seems to have picked up this change in the file's timestamp as
changes made to the content of the file.
--
Regards,
Karthik Nayak
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
.
show_ref_array_item() is kept as a convenience wrapper around it which
obtains the strbuf and prints it the standard output.
Mentored-by: Christian Couder <christian.cou...@gmail.com>
Mentored-by: Matthieu Moy <matthieu@grenoble-inp.fr>
Signed-off-by: Karthik Nayak <karthik@gmai
-by: Matthieu Moy <matthieu@grenoble-inp.fr>
Mentored-by: Christian Couder <christian.cou...@gmail.com>
Mentored-by: Matthieu Moy <matthieu@grenoble-inp.fr>
Signed-off-by: Karthik Nayak <karthik@gmail.com>
---
builtin/branch.c | 2 ++
builtin/tag.c| 2 ++
2 fil
eu Moy <matthieu@grenoble-inp.fr>
Signed-off-by: Karthik Nayak <karthik@gmail.com>
---
Documentation/git-branch.txt | 7 ++-
builtin/branch.c | 14 +-
t/t3203-branch-output.sh | 12
3 files changed, 27 insertions(+), 6 deleti
christian.cou...@gmail.com>
Mentored-by: Matthieu Moy <matthieu@grenoble-inp.fr>
Signed-off-by: Karthik Nayak <karthik@gmail.com>
---
Documentation/git-for-each-ref.txt | 8 +++--
ref-filter.c | 67 +-
t/t6300-for-each-
Couder <christian.cou...@gmail.com>
Mentored-by: Matthieu Moy <matthieu@grenoble-inp.fr>
Signed-off-by: Karthik Nayak <karthik@gmail.com>
---
ref-filter.c | 28
ref-filter.h | 2 ++
2 files changed, 26 insertions(+), 4 deletions(-)
diff --git a/ref-filte
@grenoble-inp.fr>
Signed-off-by: Karthik Nayak <karthik@gmail.com>
---
builtin/branch.c | 227 ++-
t/t6040-tracking-info.sh | 2 +-
2 files changed, 67 insertions(+), 162 deletions(-)
diff --git a/builtin/branch.c b/builtin/bran
101 - 200 of 1407 matches
Mail list logo