forked from git/git
-
Notifications
You must be signed in to change notification settings - Fork 143
doc: include git rev-list
description in git log
doc
#590
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
Closed
phil-blain
wants to merge
6
commits into
gitgitgadget:master
from
phil-blain:doc-log-multiple-ranges
Closed
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
59027b0
git-log.txt: add links to 'rev-list' and 'diff' docs
phil-blain 3c57369
revisions.txt: describe 'rev1 rev2 ...' meaning for ranges
phil-blain b8ee4a7
git-rev-list.txt: fix Asciidoc syntax
phil-blain cf934dd
git-rev-list.txt: tweak wording in set operations
phil-blain f61bbb5
git-rev-list.txt: move description to separate file
phil-blain d04b6c6
git-log.txt: include rev-list-description.txt
phil-blain File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
List commits that are reachable by following the `parent` links from the | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. On the Git mailing list, Junio C Hamano wrote (reply to this):
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. On the Git mailing list, Philippe Blain wrote (reply to this):
|
||
given commit(s), but exclude commits that are reachable from the one(s) | ||
given with a '{caret}' in front of them. The output is given in reverse | ||
chronological order by default. | ||
|
||
You can think of this as a set operation. Commits reachable from any of | ||
the commits given on the command line form a set, and then commits reachable | ||
from any of the ones given with '{caret}' in front are subtracted from that | ||
set. The remaining commits are what comes out in the command's output. | ||
Various other options and paths parameters can be used to further limit the | ||
result. | ||
|
||
Thus, the following command: | ||
|
||
ifdef::git-rev-list[] | ||
----------------------------------------------------------------------- | ||
$ git rev-list foo bar ^baz | ||
----------------------------------------------------------------------- | ||
endif::git-rev-list[] | ||
ifdef::git-log[] | ||
----------------------------------------------------------------------- | ||
$ git log foo bar ^baz | ||
----------------------------------------------------------------------- | ||
endif::git-log[] | ||
|
||
means "list all the commits which are reachable from 'foo' or 'bar', but | ||
not from 'baz'". | ||
|
||
A special notation "'<commit1>'..'<commit2>'" can be used as a | ||
short-hand for "^'<commit1>' '<commit2>'". For example, either of | ||
the following may be used interchangeably: | ||
|
||
ifdef::git-rev-list[] | ||
----------------------------------------------------------------------- | ||
$ git rev-list origin..HEAD | ||
$ git rev-list HEAD ^origin | ||
----------------------------------------------------------------------- | ||
endif::git-rev-list[] | ||
ifdef::git-log[] | ||
----------------------------------------------------------------------- | ||
$ git log origin..HEAD | ||
$ git log HEAD ^origin | ||
----------------------------------------------------------------------- | ||
endif::git-log[] | ||
|
||
Another special notation is "'<commit1>'...'<commit2>'" which is useful | ||
for merges. The resulting set of commits is the symmetric difference | ||
between the two operands. The following two commands are equivalent: | ||
|
||
ifdef::git-rev-list[] | ||
----------------------------------------------------------------------- | ||
$ git rev-list A B --not $(git merge-base --all A B) | ||
$ git rev-list A...B | ||
----------------------------------------------------------------------- | ||
endif::git-rev-list[] | ||
ifdef::git-log[] | ||
----------------------------------------------------------------------- | ||
$ git log A B --not $(git merge-base --all A B) | ||
$ git log A...B | ||
----------------------------------------------------------------------- | ||
endif::git-log[] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On the Git mailing list, Junio C Hamano wrote (reply to this):
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On the Git mailing list, Philippe Blain wrote (reply to this):