From 89ce391b8edae97bbfd0fdb33b4c252b6fd0dc53 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Fri, 6 Jul 2012 02:01:29 +0200 Subject: Make documentation more consistent. Formerly, the documentation for would occasionally say instead of . Now it uniformly uses . Signed-off-by: Max Horn Signed-off-by: Junio C Hamano --- Documentation/revisions.txt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Documentation/revisions.txt b/Documentation/revisions.txt index 1725661837..f4f6f281a0 100644 --- a/Documentation/revisions.txt +++ b/Documentation/revisions.txt @@ -24,22 +24,22 @@ blobs contained in a commit. object referenced by 'refs/heads/master'. If you happen to have both 'heads/master' and 'tags/master', you can explicitly say 'heads/master' to tell git which one you mean. - When ambiguous, a '' is disambiguated by taking the + When ambiguous, a '' is disambiguated by taking the first match in the following rules: - . If '$GIT_DIR/' exists, that is what you mean (this is usually + . If '$GIT_DIR/' exists, that is what you mean (this is usually useful only for 'HEAD', 'FETCH_HEAD', 'ORIG_HEAD', 'MERGE_HEAD' and 'CHERRY_PICK_HEAD'); - . otherwise, 'refs/' if it exists; + . otherwise, 'refs/' if it exists; . otherwise, 'refs/tags/' if it exists; - . otherwise, 'refs/heads/' if it exists; + . otherwise, 'refs/heads/' if it exists; - . otherwise, 'refs/remotes/' if it exists; + . otherwise, 'refs/remotes/' if it exists; - . otherwise, 'refs/remotes//HEAD' if it exists. + . otherwise, 'refs/remotes//HEAD' if it exists. + 'HEAD' names the commit on which you based the changes in the working tree. 'FETCH_HEAD' records the branch which you fetched from a remote repository -- cgit v1.2.3 From ca5ee2d1fbbb030f499587b58a49eb814f5b5ab0 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Tue, 24 Jul 2012 15:03:50 -0700 Subject: Enumerate revision range specifiers in the documentation It was a bit hard to learn how ^@, ^! and various other forms of range specifiers are used, because they were discussed mostly in the prose part of the documentation, unlike various forms of extended SHA-1 expressions that are listed in an enumerated list. Also add a few more examples showing use of , .. and ^! forms, stolen from a patch by Max Horn. Signed-off-by: Junio C Hamano --- Documentation/revisions.txt | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/Documentation/revisions.txt b/Documentation/revisions.txt index f4f6f281a0..dc0070bcb7 100644 --- a/Documentation/revisions.txt +++ b/Documentation/revisions.txt @@ -218,13 +218,44 @@ and its parent commits exist. The 'r1{caret}@' notation means all parents of 'r1'. 'r1{caret}!' includes commit 'r1' but excludes all of its parents. +To summarize: + +'':: + Include commits that are reachable from (i.e. ancestors of) + . + +'{caret}':: + Exclude commits that are reachable from (i.e. ancestors of) + . + +'..':: + Include commits that are reachable from but exclude + those that are reachable from . + +'\...':: + Include commits that are reachable from either or + but exclude those that are reachable from both. + +'{caret}@', e.g. 'HEAD{caret}@':: + A suffix '{caret}' followed by an at sign is the same as listing + all parents of '' (meaning, include anything reachable from + its parents, but not the commit itself). + +'{caret}!', e.g. 'HEAD{caret}!':: + A suffix '{caret}' followed by an exclamation mark is the same + as giving commit '' and then all its parents prefixed with + '{caret}' to exclude them (and their ancestors). + Here are a handful of examples: D G H D D F G H I J D F ^G D H D ^D B E I J F B + B..C C B...C G H D E B C ^D B C E I J F B C + C I J F C C^@ I J F + C^! C F^! D G H D F -- cgit v1.2.3