Re: git --literal-pathspecs add -u says "fatal: pathspec ':/' did not match any files"

2015-10-24 Thread Noam Postavsky
On Sat, Oct 24, 2015 at 3:13 AM, Victor Leschuk wrote: > The problem is that in the absence of explicit argument we set the list of > files to special path ":/" which means repo root: > And after that we treat it as regular file Aha. > Maybe it'll make sense to modify

Re* git --literal-pathspecs add -u says "fatal: pathspec ':/' did not match any files"

2015-10-24 Thread Junio C Hamano
Victor Leschuk writes: > Maybe it'll make sense to modify file_exists() to treat ":/" > specially. The real problem is that the code assumes that it can internally use ":/" to mean "everything from the top", and with global 'literal pathspec' magic, that is not the case.

Re: git --literal-pathspecs add -u says "fatal: pathspec ':/' did not match any files"

2015-10-24 Thread Victor Leschuk
Hello Noam, The problem is that in the absence of explicit argument we set the list of files to special path ":/" which means repo root: if ((0 < addremove_explicit || take_worktree_changes) && !argc) { static const char *whole[2] = { ":/", NULL }; argc = 1; argv =

git --literal-pathspecs add -u says "fatal: pathspec ':/' did not match any files"

2015-10-23 Thread Noam Postavsky
~/tmp/tmprepo$ git init Initialized empty Git repository in /home/npostavs/tmp/tmprepo/.git/ ~/tmp/tmprepo$ git --literal-pathspecs add -u fatal: pathspec ':/' did not match any files ~/tmp/tmprepo$ git --version git version 2.6.1 It was reported[1] that 2.0.2 and several following versions also