rtfpessoa/diff2html-cli

-M flag exists?

whyboris opened this issue · 1 comments

Looks like I'm responsible for adding this line:
https://github.com/rtfpessoa/diff2html-cli/blame/master/README.md#L135
diff2html -s line -f html -d word -i command -o preview -- -M HEAD~1

I think I added it after seeing this example:
https://github.com/rtfpessoa/diff2html-cli/blob/master/src/yargs.ts#L181
'diff2html -s line -f html -d word -i command -o preview -- -M HEAD~1',

But I don't know what -- -M is meant to do 😅
There is no yargs alias for it -- so maybe it's a leftover from a while ago?

ps - it's not listed in the help (diff2html -h) that you can diff against a branch 🎉
You can be on a branch with no commits, and then run diff2html master and it will compare all changes against master 🥇

Hi @whyboris, the -- means all the following arguments will be passed to git directly.
In this case the -M corresponds to https://git-scm.com/docs/git-diff#Documentation/git-diff.txt--Mltngt

Any suggestion on how I could make this more explicit? A PR to improve this would be amazing 🤩