Forum Discussion
git diff does not require a '--' between the revisions and path, at least not the way I'm using it. For example, I can run this command just fine, and it happily displays my diffs.
git diff 3b42 f249 path/to/specific/files
However, running ccollab addgitdiffs new 3b42 f249 path/to/specific/files tries to interpret the path as a revision, and fails. If I follow your suggestion and add the "--" ...
ccollab addgitdiffs new 3b42 f249 -- path/to/specific/files
I get a different error ...
ERROR: Executing command `ccollab addgitdiffs`:
There are no diffs to upload
My working directory is clean, but I'm trying to create a review for a diff between two already committed revisions. It's almost as if code collab is ignoring all the arguments before the path. However, it only seems to do so if a path is specified. If I just run this ...
ccollab addgitdiffs new 3b42 f249
It works just fine. So code collab is definitely mangling something before passing it along to git diff. Here are my versions of things ...
ccollab --version
ccollab v9.2.9200
git --version
git version 1.9.5 (Apple Git-50.3)
I got an email that said someone named 'gudrun735' replied to this thread, but I can't find their reply here.
Anyway, they said that using -- along with absolute paths did allow him to restrict the diff to specific files. I was able to get this to work as well. So, for example this would work ...
ccollab addgitdiffs new 384f 9265 -- /absolute/path/to/file
But this would not, even if I was already in the /absolute directory ...
ccollab addgitdiffs new 384f 9265 -- path/to/file
My guess is that ccollab is not running git in the same working directory that you are running ccollab from. It would be nice if it did, so that running ccollab addgitdiffs <args> will generate the precise diffs generated by running git diff <args> in the current directory.
Related Content
- 5 years ago
- 6 years ago
- 4 years ago
- 5 years ago
Recent Discussions
- 3 months ago