scottgonzalez / pretty-diff

colorized HTML diffs
MIT License
218 stars 27 forks source link

Does not work with -C option? #27

Open pirklbauer31 opened 8 years ago

pirklbauer31 commented 8 years ago

Hey,

I'm not sure if you're still working on this thing but I found it and could really use it for a project of mine. The problem is, that i need to call the script from another directory just like in git -C diff master

This probably does not work with your script, do you have any Idea or a workaround?

scottgonzalez commented 8 years ago

Can you explain some more? git -C diff master is not a diff command. git diff -C master is, and seems to work just fine.

scottgonzalez commented 8 years ago

Do you mean git -C <path> diff master? pretty-diff is a replacement for git-diff, so git -C <path> diff isn't supported. We could probably support this by allowing a diff to be piped into pretty-diff so you could use git -C <path> diff master | pretty-diff. Would that work for you?

pirklbauer31 commented 8 years ago

"so you could use git -C diff master | pretty-diff" Yeah something like that is exactly what i need I need to be able to call git diff from another directory (just the way you suggested) and get the pretty output As of now piping it like this isn't supported, right?