Re: [PATCH] pathspec: warn on empty strings as pathspec

2016-06-24 Thread Emily Xie
I suppose I got ahead of myself there. :-) Thanks for the clarification on the process. On Thu, Jun 23, 2016 at 2:17 AM, Junio C Hamano wrote: > Emily Xie writes: > >> Awesome. Thanks, Junio---this is exciting! > > No, thank _you_. > >> As for step 2: do you have a good sense on the timing? Arou

Re: [PATCH] pathspec: warn on empty strings as pathspec

2016-06-22 Thread Junio C Hamano
Emily Xie writes: > Awesome. Thanks, Junio---this is exciting! No, thank _you_. > As for step 2: do you have a good sense on the timing? Around how long > should I wait to submit the patch for it? Not so fast. We'll wait for others to comment first. I am queuing this change but that does not

Re: [PATCH] pathspec: warn on empty strings as pathspec

2016-06-22 Thread Emily Xie
Awesome. Thanks, Junio---this is exciting! As for step 2: do you have a good sense on the timing? Around how long should I wait to submit the patch for it? Otherwise, let me know if there is anything else that I need to do! - Emily -- To unsubscribe from this list: send the line "unsubscribe git

Re: [PATCH] pathspec: warn on empty strings as pathspec

2016-06-22 Thread Junio C Hamano
Emily Xie writes: > The fix for this issue requires a two-step approach. As > there may be existing scripts that knowingly use empty > strings in this manner, the first step simply invokes a > warning that (1) declares using empty strings to > match all paths will become invalid and (2) asks the

[PATCH] pathspec: warn on empty strings as pathspec

2016-06-22 Thread Emily Xie
Currently, passing an empty string as a pathspec results in a match on all paths. This is because a pathspec match is a leading substring match that honors directory boundaries. So, just as pathspec "dir/" (or "dir") matches "dir/file", "" matches "file". However, this causes problems. Namely, a u

Re: [PATCH] pathspec: warn on empty strings as pathspec

2016-06-20 Thread Junio C Hamano
Emily Xie writes: > For any command that takes a pathspec, passing an empty string will > execute the command on all files in the current directory. OK. > This > results in unexpected behavior. Technically speaking, your expectation is what is wrong here. An empty string as a pathspec matches

[PATCH] pathspec: warn on empty strings as pathspec

2016-06-20 Thread Emily Xie
For any command that takes a pathspec, passing an empty string will execute the command on all files in the current directory. This results in unexpected behavior. For example, git add "" adds all files to staging, while git rm -rf "" recursively removes all files from the working tree and index. A