path: root/builtin
diff options
authorNguyễn Thái Ngọc Duy <>2013-10-19 02:41:24 (GMT)
committerJunio C Hamano <>2013-10-22 17:49:43 (GMT)
commitc8556c6213cf6dca63f29f98ad9d074f6c5f8233 (patch)
treea8cfbe3faac1bf61fba78f1cfb07cf741d1559ad /builtin
parent625c3304e200f9bdc05626be1397311faa4962ba (diff)
Fix calling parse_pathspec with no paths nor PATHSPEC_PREFER_* flags
When parse_pathspec() is called with no paths, the behavior could be either return no paths, or return one path that is cwd. Some commands do the former, some the latter. parse_pathspec() itself does not make either the default and requires the caller to specify either flag if it may run into this situation. I've grep'd through all parse_pathspec() call sites. Some pass neither, but those are guaranteed never pass empty path to parse_pathspec(). There are two call sites that may pass empty path and are fixed with this patch. [jc: added a test from Antoine's bug report] Reported-by: Antoine Pelisse <> Signed-off-by: Nguyễn Thái Ngọc Duy <> Signed-off-by: Junio C Hamano <>
Diffstat (limited to 'builtin')
0 files changed, 0 insertions, 0 deletions