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

Re: [PATCH] Document escaping of special characters in gitignore files

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 5, 2011, 20:37 UTC
Message-ID
<7vk4ijccji.fsf@alter.siamese.dyndns.org>
In-Reply-To
<4D24D0CB.3030004@gmail.com>
Bruce Korb <bruce.korb@gmail.com> writes:
Show 25 quoted lines
> On 01/05/11 11:27, Jakub Narebski wrote:
>>>> +++ b/templates/info--exclude
>>>> @@ -4,3 +4,4 @@
>>>>  # exclude patterns (uncomment them if you want to use them):
>>>>  # *.[oa]
>>>>  # *~
>>>> +# \#*#
>>>
>>> Do we need this?  Without explanation it is somewhat hard to realize that
>>> this last line is also an example of a pattern that excludes any filename
>>> that begins and ends with a pound.
>> 
>> Well, perhaps not.  Note though that this exclude pattern is actually
>> useful for me, as GNU Emacs uses this convention ("#<filename>#") for
>> auto-save files.
>
> As the source of this thread, I, too, use emacs and it is exactly
> the problem of trying to figure out how to get git to ignore these
> auto save files that got me down this path.  It was too hard to figure out.
> So I suggested some doc changes and the addition of the "exclude
> emacs auto save files" pattern to the sample text.  People who do not
> use emacs would not understand the \#*# line and folks who do would.
> They see files like that all the time.  For the sake of vi users, you
> might want to explain them, but I don't think it is crucial.
> It *is* important to have an example of a needs-to-be-escaped file name.

Perhaps a single liner comment to describe the three examples immediately below "exclude patterns (uncomment them..." is in order in that case, something like:

# exclude patterns (object and library, emacs backup, emacs autosave # files) -- uncomment if you want to use them # *.[oa] # *~ # \#*#

Previous: Bruce KorbNext: Jakub Narebski
Message 7 of 8 in “Document escaping of special characters in gitignore files”
  1. Document escaping of special characters in gitignore filesJakub Narebski, Jan 5, 2011
  2. Andreas SchwabJan 5, 2011
  3. Junio C HamanoJan 5, 2011
  4. Jakub NarebskiJan 5, 2011
  5. Thomas RastJan 5, 2011
  6. Bruce KorbJan 5, 2011
  7. Junio C HamanoJan 5, 2011
  8. Jakub NarebskiJan 5, 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.