Closed marcospb19 closed 4 years ago
The command given is
git diff <sha1> <sha2> | less
But | less is unnecessary, because git already invokes less.
| less
git
less
To confirm this, run the following command: git diff <sha1> <sha2>
git diff <sha1> <sha2>
If you run: sudo mv /usr/bin/less /usr/bin/lass
sudo mv /usr/bin/less /usr/bin/lass
And try the last command again, it won't work, because git won't be able to invoke less.
(Remember to move it back sudo mv /usr/bin/lass /usr/bin/less)
sudo mv /usr/bin/lass /usr/bin/less
Also, redundant | less ignores the output color, which is super super bad for git diff's usability.
Thanks for spotting. The colour bit is so true. Thanks for your PR and apologies for the late merge.
The command given is
git diff <sha1> <sha2> | less
But
| less
is unnecessary, becausegit
already invokesless
.To confirm this, run the following command:
git diff <sha1> <sha2>
If you run:
sudo mv /usr/bin/less /usr/bin/lass
And try the last command again, it won't work, because git won't be able to invoke
less
.(Remember to move it back
sudo mv /usr/bin/lass /usr/bin/less
)