<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/ref-filter.h, branch v2.12.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.12.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.12.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2017-01-31T21:14:58Z</updated>
<entry>
<title>Merge branch 'st/verify-tag'</title>
<updated>2017-01-31T21:14:58Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2017-01-31T21:14:58Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=237bdd9ddbe52eb651787af1929d8832ce37c322'/>
<id>urn:sha1:237bdd9ddbe52eb651787af1929d8832ce37c322</id>
<content type='text'>
"git tag" and "git verify-tag" learned to put GPG verification
status in their "--format=&lt;placeholders&gt;" output format.

* st/verify-tag:
  t/t7004-tag: Add --format specifier tests
  t/t7030-verify-tag: Add --format specifier tests
  builtin/tag: add --format argument for tag -v
  builtin/verify-tag: add --format to verify-tag
  ref-filter: add function to print single ref_array_item
  gpg-interface, tag: add GPG_VERIFY_OMIT_STATUS flag
</content>
</entry>
<entry>
<title>ref-filter: add function to print single ref_array_item</title>
<updated>2017-01-18T00:10:22Z</updated>
<author>
<name>Lukas Puehringer</name>
<email>luk.puehringer@gmail.com</email>
</author>
<published>2017-01-17T23:37:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=2111aa794bb420f767895682232b494d3461ab31'/>
<id>urn:sha1:2111aa794bb420f767895682232b494d3461ab31</id>
<content type='text'>
ref-filter functions are useful for printing git object information
using a format specifier. However, some other modules may not want to use
this functionality on a ref-array but only print a single item.

Expose a pretty_print_ref function to create, pretty print and free
individual ref-items.

Signed-off-by: Lukas Puehringer &lt;luk.puehringer@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>tag, branch, for-each-ref: add --ignore-case for sorting and filtering</title>
<updated>2016-12-05T22:59:29Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2016-12-04T02:52:25Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=3bb16a8bf2ec02c4cc633c3efd4c012e55ee0c2d'/>
<id>urn:sha1:3bb16a8bf2ec02c4cc633c3efd4c012e55ee0c2d</id>
<content type='text'>
This options makes sorting ignore case, which is great when you have
branches named bug-12-do-something, Bug-12-do-some-more and
BUG-12-do-what and want to group them together. Sorting externally may
not be an option because we lose coloring and column layout from
git-branch and git-tag.

The same could be said for filtering, but it's probably less important
because you can always go with the ugly pattern [bB][uU][gG]-* if you're
desperate.

You can't have case-sensitive filtering and case-insensitive sorting (or
the other way around) with this though. For branch and tag, that should
be no problem. for-each-ref, as a plumbing, might want finer control.
But we can always add --{filter,sort}-ignore-case when there is a need
for it.

Signed-off-by: Nguyễn Thái Ngọc Duy &lt;pclouds@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>branch.c: use 'ref-filter' APIs</title>
<updated>2015-09-25T15:54:54Z</updated>
<author>
<name>Karthik Nayak</name>
<email>karthik.188@gmail.com</email>
</author>
<published>2015-09-23T18:11:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=aedcb7dc75e5c260f20bebe14925f3ac4841b03d'/>
<id>urn:sha1:aedcb7dc75e5c260f20bebe14925f3ac4841b03d</id>
<content type='text'>
Make 'branch.c' use 'ref-filter' APIs for iterating through refs
sorting. This removes most of the code used in 'branch.c' replacing it
with calls to the 'ref-filter' library.

Make 'branch.c' use the 'filter_refs()' function provided by 'ref-filter'
to filter out tags based on the options set.

We provide a sorting option provided for 'branch.c' by using the
sorting options provided by 'ref-filter'. Also by default, we sort by
'refname'.  Since 'HEAD' is alphabatically before 'refs/...' we end up
with an array consisting of the 'HEAD' ref then the local branches and
finally the remote-tracking branches.

Also remove the 'ignore' variable from ref_array_item as it was
previously used for the '--merged' option and now that is handled by
ref-filter.

Modify some of the tests in t1430 to check the stderr for a warning
regarding the broken ref. This is done as ref-filter throws a warning
for broken refs rather than directly printing them.

Add tests and documentation for the same.

Mentored-by: Christian Couder &lt;christian.couder@gmail.com&gt;
Mentored-by: Matthieu Moy &lt;matthieu.moy@grenoble-inp.fr&gt;
Signed-off-by: Karthik Nayak &lt;karthik.188@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>branch.c: use 'ref-filter' data structures</title>
<updated>2015-09-25T15:54:54Z</updated>
<author>
<name>Karthik Nayak</name>
<email>karthik.188@gmail.com</email>
</author>
<published>2015-09-23T18:11:11Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=1511b22d40d102f397104858a617aa1662bb1c98'/>
<id>urn:sha1:1511b22d40d102f397104858a617aa1662bb1c98</id>
<content type='text'>
Make 'branch.c' use 'ref-filter' data structures and make changes to
support the new data structures. This is a part of the process of
porting 'branch.c' to use 'ref-filter' APIs.

This is a temporary step before porting 'branch.c' to use 'ref-filter'
completely. As this is a temporary step, most of the code introduced
here will be removed when 'branch.c' is ported over to use
'ref-filter' APIs.

Mentored-by: Christian Couder &lt;christian.couder@gmail.com&gt;
Mentored-by: Matthieu Moy &lt;matthieu.moy@grenoble-inp.fr&gt;
Signed-off-by: Karthik Nayak &lt;karthik.188@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>ref-filter: add option to match literal pattern</title>
<updated>2015-09-17T17:02:49Z</updated>
<author>
<name>Karthik Nayak</name>
<email>karthik.188@gmail.com</email>
</author>
<published>2015-09-10T15:48:26Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=bef0e12becd72b94d6bb9e48859742f55a4afb53'/>
<id>urn:sha1:bef0e12becd72b94d6bb9e48859742f55a4afb53</id>
<content type='text'>
Since 'ref-filter' only has an option to match path names add an
option for plain fnmatch pattern-matching.

This is to support the pattern matching options which are used in `git
tag -l` and `git branch -l` where we can match patterns like `git tag
-l foo*` which would match all tags which has a "foo*" pattern.

Mentored-by: Christian Couder &lt;christian.couder@gmail.com&gt;
Mentored-by: Matthieu Moy &lt;matthieu.moy@grenoble-inp.fr&gt;
Signed-off-by: Karthik Nayak &lt;karthik.188@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>ref-filter: add support to sort by version</title>
<updated>2015-09-17T17:02:49Z</updated>
<author>
<name>Karthik Nayak</name>
<email>karthik.188@gmail.com</email>
</author>
<published>2015-09-10T15:48:25Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=90c004085cfe65e1b290e5b5fc05817ec2c596a6'/>
<id>urn:sha1:90c004085cfe65e1b290e5b5fc05817ec2c596a6</id>
<content type='text'>
Add support to sort by version using the "v:refname" and
"version:refname" option. This is achieved by using the 'versioncmp()'
function as the comparing function for qsort.

This option is included to support sorting by versions in `git tag -l`
which will eventually be ported to use ref-filter APIs.

Add documentation and tests for the same.

Mentored-by: Christian Couder &lt;christian.couder@gmail.com&gt;
Mentored-by: Matthieu Moy &lt;matthieu.moy@grenoble-inp.fr&gt;
Signed-off-by: Karthik Nayak &lt;karthik.188@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>ref-filter: add support for %(contents:lines=X)</title>
<updated>2015-09-17T17:02:48Z</updated>
<author>
<name>Karthik Nayak</name>
<email>karthik.188@gmail.com</email>
</author>
<published>2015-09-11T15:04:16Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=1bb38e5a6a8fb6cf9b882a1a7038d649ceba0085'/>
<id>urn:sha1:1bb38e5a6a8fb6cf9b882a1a7038d649ceba0085</id>
<content type='text'>
In 'tag.c' we can print N lines from the annotation of the tag using
the '-n&lt;num&gt;' option. Copy code from 'tag.c' to 'ref-filter' and
modify it to support appending of N lines from the annotation of tags
to the given strbuf.

Implement %(contents:lines=X) where X lines of the given object are
obtained.

While we're at it, remove unused "contents:&lt;suboption&gt;" atoms from
the `valid_atom` array.

Add documentation and test for the same.

Mentored-by: Christian Couder &lt;christian.couder@gmail.com&gt;
Mentored-by: Matthieu Moy &lt;matthieu.moy@grenoble-inp.fr&gt;
Signed-off-by: Karthik Nayak &lt;karthik.188@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>ref-filter: add option to filter out tags, branches and remotes</title>
<updated>2015-09-17T17:02:48Z</updated>
<author>
<name>Karthik Nayak</name>
<email>karthik.188@gmail.com</email>
</author>
<published>2015-09-10T15:48:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=5b4f28510f36062134390ad8818721c1d4a2760f'/>
<id>urn:sha1:5b4f28510f36062134390ad8818721c1d4a2760f</id>
<content type='text'>
Add a function called 'for_each_fullref_in()' to refs.{c,h} which
iterates through each ref for the given path without trimming the path
and also accounting for broken refs, if mentioned.

Add 'filter_ref_kind()' in ref-filter.c to check the kind of ref being
handled and return the kind to 'ref_filter_handler()', where we
discard refs which we do not need and assign the kind to needed refs.

Mentored-by: Christian Couder &lt;christian.couder@gmail.com&gt;
Mentored-by: Matthieu Moy &lt;matthieu.moy@grenoble-inp.fr&gt;
Signed-off-by: Karthik Nayak &lt;karthik.188@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>ref-filter: move `struct atom_value` to ref-filter.c</title>
<updated>2015-09-17T17:02:48Z</updated>
<author>
<name>Karthik Nayak</name>
<email>karthik.188@gmail.com</email>
</author>
<published>2015-08-22T03:39:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=3a25761a5eb01d797f85621b5844a4eea5a02377'/>
<id>urn:sha1:3a25761a5eb01d797f85621b5844a4eea5a02377</id>
<content type='text'>
Since atom_value is only required for the internal working of
ref-filter it doesn't belong in the public header.

Helped-by: Eric Sunshine &lt;sunshine@sunshineco.com&gt;
Mentored-by: Christian Couder &lt;christian.couder@gmail.com&gt;
Mentored-by: Matthieu Moy &lt;matthieu.moy@grenoble-inp.fr&gt;
Signed-off-by: Karthik Nayak &lt;karthik.188@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
