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

Re: [PATCH 1/1] gitignore: do not ignore include/linux/

From
Jakub Narebski <jnareb@gmail.com>
Date
Mar 5, 2010, 10:43 UTC
Message-ID
<m3pr3jkq26.fsf@localhost.localdomain>
In-Reply-To
<1267780845-10547-1-git-send-email-jslaby@suse.cz>
Jiri Slaby <jslaby@suse.cz> writes:
Show 42 quoted lines
> linux entry in .gitignore means that everything in include/linux/
> gets ignored with git 1.7.
> 
> Prepend a slash to entries which are toplevel to avoid that
> 
> Signed-off-by: Jiri Slaby <jslaby@suse.cz>
> Cc: Johannes Sixt <j.sixt@viscovery.net>
> ---
>  .gitignore |   20 ++++++++++----------
>  1 files changed, 10 insertions(+), 10 deletions(-)
> 
> diff --git a/.gitignore b/.gitignore
> index efab0eb..fe6ebb9 100644
> --- a/.gitignore
> +++ b/.gitignore
> @@ -34,16 +34,16 @@ modules.builtin
>  #
>  # Top-level generic files
>  #
> -tags
> -TAGS
> -linux
> -vmlinux
> -vmlinuz
> -System.map
> -Module.markers
> -Module.symvers
> -!.gitignore
> -!.mailmap
> +/tags
> +/TAGS
> +/linux
> +/vmlinux
> +/vmlinuz
> +/System.map
> +/Module.markers
> +/Module.symvers
> +!/.gitignore
> +!/.mailmap
>  
>  #
>  # Generated include files

Actually you want to *not ignore* .gitignore and .mailmap (and .gitattributes which is missing here) anywhere, not only as top-level file. So .gitignore and .mailmap should not be prepended with slash.

   #
   # Top-level generic files
   #
  -tags
  -TAGS
  -linux
  -vmlinux
  -vmlinuz
  -System.map
  -Module.markers
  -Module.symvers
  +/tags
  +/TAGS
  +/linux
  +/vmlinux
  +/vmlinuz
  +/System.map
  +/Module.markers
  +/Module.symvers
   !.gitignore
   !.mailmap
-- 
Jakub Narebski
Poland
ShadeHawk on #git
Previous: Jiri SlabyNext: Jiri Slaby
Message 6 of 19 in “gitignore broken in git 1.7.0.1: slash checks leading dirs”
  1. Jiri SlabyMar 5, 2010
  2. Johannes SixtMar 5, 2010
  3. Jiri SlabyMar 5, 2010
  4. Johannes SixtMar 5, 2010
  5. 1/1 gitignore: do not ignore include/linux/Jiri Slaby, Mar 5, 2010
  6. Jakub NarebskiMar 5, 2010
  7. Jiri SlabyMar 5, 2010
  8. David RientjesMar 10, 2010
  9. Américo WangMar 10, 2010
  10. David RientjesMar 10, 2010
  11. Américo WangMar 8, 2010
  12. Jiri SlabyMar 5, 2010
  13. Jonathan NiederMar 5, 2010
  14. Jiri SlabyMar 5, 2010
  15. Jonathan NiederMar 5, 2010
  16. Jonathan NiederMar 5, 2010
  17. Johannes SixtMar 5, 2010
  18. gitignore.5: Clarify matching rulesJonathan Nieder, Mar 5, 2010
  19. Junio C HamanoMar 5, 2010

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.