git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v7 10/11] ref-filter: implement '--contains' option

From
Karthik Nayak <karthik.188@gmail.com>
Date
Jul 2, 2015, 17:24 UTC
Message-ID
<CAOLa=ZTDn3cQf4ax4kMA+g7zDJrsHicyXZuEc72am8An=6EuGg@mail.gmail.com>
In-Reply-To
<vpqr3oq7abs.fsf@anie.imag.fr>

On Thu, Jul 2, 2015 at 10:42 PM, Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> wrote:

Show 12 quoted lines
> Karthik Nayak <karthik.188@gmail.com> writes:
>
>> 'tag -l' and 'branch -l' have two different ways of finding
>> out if a certain ref contains a commit. Implement both these
>> methods in ref-filter and give the caller of ref-filter API
>> the option to pick which implementation to be used.
>
> You are reusing some code, but unlike the other patches you are not
> marking the old code as duplicated. The "duplicate code" comment both
> acts as a reminder for later, and as an indication for reviewers of
> where the code comes from.
>

Ah! I didn't really mark it cause unlike the others this isn't a single function but rather a whole block of code, but what you're saying makes sense. Thanks.

Previous: Matthieu MoyNext: Karthik Nayak
Message 19 of 20 in “add options to for-each-ref”
  1. 00/11 add options to for-each-refKarthik Nayak, Jul 2, 2015
  2. 01/11 t6302: for-each-ref tests for ref-filter APIsKarthik Nayak, Jul 2, 2015
  3. 02/11 tag: libify parse_opt_points_at()Karthik Nayak, Jul 2, 2015
  4. 03/11 ref-filter: implement '--points-at' optionKarthik Nayak, Jul 2, 2015
  5. 04/11 for-each-ref: add '--points-at' optionKarthik Nayak, Jul 2, 2015
  6. Matthieu MoyJul 2, 2015
  7. Karthik NayakJul 5, 2015
  8. 05/11 ref-filter: add parse_opt_merge_filter()Karthik Nayak, Jul 2, 2015
  9. Matthieu MoyJul 2, 2015
  10. Karthik NayakJul 2, 2015
  11. 06/11 ref-filter: implement '--merged' and '--no-merged' optionsKarthik Nayak, Jul 2, 2015
  12. 07/11 for-each-ref: add '--merged' and '--no-merged' optionsKarthik Nayak, Jul 2, 2015
  13. 08/11 parse-option: rename parse_opt_with_commit()Karthik Nayak, Jul 2, 2015
  14. 09/11 parse-options.h: add macros for '--contains' optionKarthik Nayak, Jul 2, 2015
  15. Matthieu MoyJul 2, 2015
  16. Karthik NayakJul 2, 2015
  17. 10/11 ref-filter: implement '--contains' optionKarthik Nayak, Jul 2, 2015
  18. Matthieu MoyJul 2, 2015
  19. Karthik NayakJul 2, 2015
  20. 11/11 for-each-ref: add '--contains' optionKarthik Nayak, Jul 2, 2015

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.