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

Re: [RFC PATCH 2/3] refspec: relocate query related functions

From
Patrick Steinhardt <ps@pks.im>
Date
Jan 24, 2025, 08:01 UTC
Message-ID
<Z5NI60sD8QnQ89W3@pks.im>
In-Reply-To
<20250122075154.5697-3-meetsoni3017@gmail.com>
On Wed, Jan 22, 2025 at 01:21:53PM +0530, Meet Soni wrote:
Show 10 quoted lines
> diff --git a/refspec.h b/refspec.h
> index 9556d08bd5..d3c97bfdc5 100644
> --- a/refspec.h
> +++ b/refspec.h
> @@ -1,6 +1,8 @@
>  #ifndef REFSPEC_H
>  #define REFSPEC_H
>  
> +#include "string-list.h"
> +

We can avoid including this header by adding a forward-declaration of `struct string_list` instead.

Show 10 quoted lines
> @@ -79,4 +81,9 @@ int omit_name_by_refspec(const char *name, struct refspec *rs);
>  int match_name_with_pattern(const char *key, const char *name,
>  				   const char *value, char **result);
>  
> +int query_refspecs(struct refspec *rs, struct refspec_item *query);
> +void query_refspecs_multiple(struct refspec *rs,
> +				    struct refspec_item *query,
> +				    struct string_list *results);
> +
>  #endif /* REFSPEC_H */
It would be nice to add some docs here, too.
Patrick
Previous: Meet SoniNext: Meet Soni
Message 5 of 9 in “refspec: centralize refspec-related logic”
  1. 0/3 refspec: centralize refspec-related logicMeet Soni, Jan 22, 2025
  2. 1/3 refspec: relocate omit_name_by_refspec and related functionsMeet Soni, Jan 22, 2025
  3. Patrick SteinhardtJan 24, 2025
  4. 2/3 refspec: relocate query related functionsMeet Soni, Jan 22, 2025
  5. Patrick SteinhardtJan 24, 2025
  6. 3/3 refspec: relocate apply_refspecs and related funtionsMeet Soni, Jan 22, 2025
  7. Patrick SteinhardtJan 24, 2025
  8. Patrick SteinhardtJan 24, 2025
  9. Junio C HamanoJan 24, 2025

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.