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

Re: Q: Ignore ./foo, but not script/foo

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
Jul 19, 2018, 09:30 UTC
Message-ID
<871sbzd13z.fsf@evledraar.gmail.com>
In-Reply-To
<20180719090656.GA18624@sleipnir>
On Thu, Jul 19 2018, Timothy Rice wrote:
Show 16 quoted lines
>> How did you come up with this "./" syntax?
>
> It is a Unix thing: "./" or just "." refers to the current directory.
>
> When calling scripts or programs in the current directory from a Unix
> command line, it is required to refer to them as, say, "./foo" (not just
> "foo") -- unless "." is in your PATH.
>
> Most people do put "." in their PATH for convenience but it is considered a
> little unsafe [1].
>
> Personally, I am surprised that gitignore does not understand this
> notation. To me, OPs meaning was crystal clear: "./foo" should mean to only
> ignore the foo in the repository's root directory.
>
> [1] https://superuser.com/questions/156582/why-is-not-in-the-path-by-default

To clarify I was trying to fish for whether we'd accidentally documented "./" somewhere since OP was making references to the docs.

Previous: Konstantin KhomoutovNext: Ulrich Windl
Message 5 of 6 in “Q: Ignore ./foo, but not script/foo”
  1. Ulrich WindlJul 19, 2018
  2. 3Ævar Arnfjörð BjarmasonJul 19, 2018
  3. Timothy RiceJul 19, 2018
  4. Konstantin KhomoutovJul 19, 2018
  5. Ævar Arnfjörð BjarmasonJul 19, 2018
  6. Antw: Re: Q: Ignore ./foo, but not script/fooUlrich Windl, Jul 19, 2018

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.