Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot use cdiff to compare two files #61

Closed
kirhgoff opened this issue Mar 6, 2017 · 2 comments
Closed

Cannot use cdiff to compare two files #61

kirhgoff opened this issue Mar 6, 2017 · 2 comments

Comments

@kirhgoff
Copy link

kirhgoff commented Mar 6, 2017

I want to try cdiff just to compare two files in the folder. I type something like cdiff one.txt two.txt, and I get:

→ cdiff one.txt two.txt
fatal: two.txt: no such path in the working tree.
Use 'git -- ...' to specify paths that do not exist locally.

Yes, and I call cdiff in the folder which is git repository, and files are not added to repo.

@ymattw
Copy link
Owner

ymattw commented Mar 8, 2017

Hi @kirhgoff, sorry it confused you. Cdiff reads the output from git diff one.txt two.txt, so you get the error from git because two.txt is not version controlled. It's by design, not a bug. You may use diff -u one.txt two.txt | cdiff to meet your needs in this case.

@ymattw ymattw closed this as completed Mar 8, 2017
@kirhgoff
Copy link
Author

kirhgoff commented Mar 8, 2017

I suggest you put something like that to the help output as it is not clear that the only valid usage is git one. Anyway thanks for a great tool, I am using it every day!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants