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

Re: [PATCH 2/5] Replace has_wildcard with PATHSPEC_NOGLOB

From
Junio C Hamano <gitster@pobox.com>
Date
Apr 10, 2011, 00:49 UTC
Message-ID
<7vbp0fylox.fsf@alter.siamese.dyndns.org>
In-Reply-To
<1302368060-23827-3-git-send-email-pclouds@gmail.com>
Nguyễn Thái Ngọc Duy <pclouds@gmail.com> writes:
Show 29 quoted lines
> ---
>  cache.h     |   22 ++++++++++++++++++++--
>  dir.c       |   11 +++++++----
>  setup.c     |   17 -----------------
>  tree-walk.c |   25 ++++++++++++-------------
>  4 files changed, 39 insertions(+), 36 deletions(-)
>
> diff --git a/cache.h b/cache.h
> index 27ac8a7..da1a46c 100644
> --- a/cache.h
> +++ b/cache.h
> @@ -501,16 +501,34 @@ extern int index_name_is_other(const struct index_state *, const char *, int);
>  extern int ie_match_stat(const struct index_state *, struct cache_entry *, struct stat *, unsigned int);
>  extern int ie_modified(const struct index_state *, struct cache_entry *, struct stat *, unsigned int);
>  
> +/*
> + * Magic pathspec
> + *
> + * NEEDSWORK: These need to be moved to dir.h or even to a new
> + * pathspec.h when we restructure get_pathspec() users to use the
> + * "struct pathspec" interface.
> + *
> + * Possible future magic semantics include stuff like:
> + *
> + *	{ PATHSPEC_NOGLOB, '!', "noglob" },
> + *	{ PATHSPEC_RECURSIVE, '*', "recursive" },
> + *	{ PATHSPEC_REGEXP, '\0', "regexp" },
> + *
> + */

Gaah, why did you butcher this to heve only the whole comment and struct type declaration here, without moving the "Possible future magic" comment that clearly belongs to the structure definition you still have in dir.c to where it belongs? Also if NOGLOB is no longer "Possible future", why is it still here?

Previous: Nguyễn Thái Ngọc DuyNext: Nguyen Thai Ngoc Duy
Message 4 of 11 in “New get_pathspec()”
  1. 0/5 New get_pathspec()Nguyễn Thái Ngọc Duy, Apr 9, 2011
  2. 1/5 Rename functions in preparation for get_pathspec() restructureNguyễn Thái Ngọc Duy, Apr 9, 2011
  3. 2/5 Replace has_wildcard with PATHSPEC_NOGLOBNguyễn Thái Ngọc Duy, Apr 9, 2011
  4. Junio C HamanoApr 10, 2011
  5. Nguyen Thai Ngoc DuyApr 10, 2011
  6. 3/5 Convert prefix_pathspec() to produce struct pathspec_itemNguyễn Thái Ngọc Duy, Apr 9, 2011
  7. 4/5 Implement new get_pathspec()Nguyễn Thái Ngọc Duy, Apr 9, 2011
  8. 5/5 grep: convert to use the new get_pathspec()Nguyễn Thái Ngọc Duy, Apr 9, 2011
  9. Junio C HamanoApr 10, 2011
  10. Nguyen Thai Ngoc DuyApr 10, 2011
  11. Junio C HamanoApr 9, 2011

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.