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

2018-07-19 Thread Timothy Rice
> 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

~ Tim



Re: git rm bug

2018-06-06 Thread Timothy Rice
> It does seem like something which could be noted in the git
> rm docs.  Perhaps you'd care to take a stab at a patch to
> add a note to Documentation/git-rm.txt Thomas?  Maybe a note
> at the end of the DISCUSSION section?

That same documentation could mention a common workaround for when someone
does really want to keep the empty directories:

$ touch ./path/to/empty/dir/.keep
$ git add ./path/to/empty/dir/.keep
$ git commit -m "Keep that empty directory because it is needed for "

This would obviate the need for a new flag to switch behaviours.

~ Tim