What is the difference between the two commands below. I see different results.Both are made from a clone with one branch.
git whatchanged -m -- foo.c git rev-list --reverse --all -- foo.c
As mentioned in the git whatchanged man page :
git whatchanged
Shows commit logs and diff output, each input of which is entered.The command internally calls git rev-list with the number git diff-tree and takes command line parameters for both of these commands.
git rev-list
git diff-tree
"Connected to git diff-tree " will explain the different output between both commands.
You can find an example of git rev-list in combination with git diff in In git, how can I get the difference between all commits that occurred between two dates? "
git diff
September 2013 update:
The new version of the man page for git whatchanged now emphasizes :
New users are advised to use git log . The whatchanged command is essentially the same as git log , but the output of the raw format diff is displayed by default and skips merges.The team is kept mostly for historical reasons; the fingers of many people who learned git long before git log were invented by reading the Linux kernel mailing list learn to enter it.
New users are advised to use git log . The whatchanged command is essentially the same as git log , but the output of the raw format diff is displayed by default and skips merges.
git log
whatchanged
The team is kept mostly for historical reasons; the fingers of many people who learned git long before git log were invented by reading the Linux kernel mailing list learn to enter it.
See the section Difference between git-log and git-whatchanged . "
git-log
git-whatchanged
Source: https://habr.com/ru/post/903260/More articles:How to connect to mongodb via unix socket in python - pythonChange OpenSSL BIO from lock to non-blocking mode - c.Query for T with nested objects - c #@autoreleasepool make mistakes - iosHow to list features that can be turned on and off in. / configure script? - autotoolsCan Solr Improve Social Responses? - full-text-searchgit log and git whatchanged allowing duplicate commits - githow to override default name with custom title in android - androidOrder Solr Search Results by Day / Week / Month / Year - djangoHidden Markov model for triangular cubes - algorithmAll Articles