All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC/PATCH 0/3] Documentation: Improve revision documentation
@ 2010-07-05 16:11 Michael J Gruber
  2010-07-05 16:11 ` [RFC/PATCH 1/3] Documentation: split off rev doc into include file Michael J Gruber
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Michael J Gruber @ 2010-07-05 16:11 UTC (permalink / raw)
  To: git

This mini-series sets up a new gitrevisions(7) man page so that people
looking for revision syntax don't need to try to find it in
git-rev-parse(1) which is cluttered with a lot of unrelated stuff (it's
plumbing after all).

If that concepts is OK, I actually suggest changing the actual content a
bit. Also, I found a copule of typos around the areas which I touched
but saved this for an extension of this series.

Michael J Gruber (3):
  Documentation: split off rev doc into include file
  Documentation: gitrevisions
  Documentation: link to gitrevisions rather than git-rev-parse

 Documentation/Makefile                 |    2 +-
 Documentation/git-cat-file.txt         |    2 +-
 Documentation/git-check-ref-format.txt |    2 +-
 Documentation/git-cherry-pick.txt      |    4 +-
 Documentation/git-diff.txt             |    4 +-
 Documentation/git-fast-import.txt      |    2 +-
 Documentation/git-format-patch.txt     |    2 +-
 Documentation/git-log.txt              |    3 +-
 Documentation/git-push.txt             |    2 +-
 Documentation/git-reflog.txt           |    2 +-
 Documentation/git-rev-parse.txt        |  200 +-------------------------------
 Documentation/git-revert.txt           |    2 +-
 Documentation/git-show-branch.txt      |    2 +-
 Documentation/git-show.txt             |    2 +-
 Documentation/git.txt                  |    2 +-
 Documentation/gitcore-tutorial.txt     |    2 +-
 Documentation/gitk.txt                 |    2 +-
 Documentation/gitrevisions.txt         |   35 ++++++
 Documentation/revisions.txt            |  199 +++++++++++++++++++++++++++++++
 Documentation/user-manual.txt          |    8 +-
 20 files changed, 257 insertions(+), 222 deletions(-)
 create mode 100644 Documentation/gitrevisions.txt
 create mode 100644 Documentation/revisions.txt

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [RFC/PATCH 1/3] Documentation: split off rev doc into include file
  2010-07-05 16:11 [RFC/PATCH 0/3] Documentation: Improve revision documentation Michael J Gruber
@ 2010-07-05 16:11 ` Michael J Gruber
  2010-07-05 16:11 ` [RFC/PATCH 2/3] Documentation: gitrevisions Michael J Gruber
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 8+ messages in thread
From: Michael J Gruber @ 2010-07-05 16:11 UTC (permalink / raw)
  To: git

Currently, the documentation for revisions and ranges sits in the
git-rev-parse man page, i.e. a plumbing man page, along with the
documentation of all rev-parse modes.

Split off the revisions and ranges section into an included file to
prepare for restructuring.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
---
 Documentation/git-rev-parse.txt |  200 +--------------------------------------
 Documentation/revisions.txt     |  199 ++++++++++++++++++++++++++++++++++++++
 2 files changed, 200 insertions(+), 199 deletions(-)
 create mode 100644 Documentation/revisions.txt

diff --git a/Documentation/git-rev-parse.txt b/Documentation/git-rev-parse.txt
index 833a2a2..0727f43 100644
--- a/Documentation/git-rev-parse.txt
+++ b/Documentation/git-rev-parse.txt
@@ -174,205 +174,7 @@ shown.  If the pattern does not contain a globbing character (`?`,
 	Flags and parameters to be parsed.
 
 
-SPECIFYING REVISIONS
---------------------
-
-A revision parameter typically, but not necessarily, names a
-commit object.  They use what is called an 'extended SHA1'
-syntax.  Here are various ways to spell object names.  The
-ones listed near the end of this list are to name trees and
-blobs contained in a commit.
-
-* The full SHA1 object name (40-byte hexadecimal string), or
-  a substring of such that is unique within the repository.
-  E.g. dae86e1950b1277e545cee180551750029cfe735 and dae86e both
-  name the same commit object if there are no other object in
-  your repository whose object name starts with dae86e.
-
-* An output from 'git describe'; i.e. a closest tag, optionally
-  followed by a dash and a number of commits, followed by a dash, a
-  `g`, and an abbreviated object name.
-
-* A symbolic ref name.  E.g. 'master' typically means the 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 `<name>` is disambiguated by taking the
-  first match in the following rules:
-
-  . if `$GIT_DIR/<name>` exists, that is what you mean (this is usually
-    useful only for `HEAD`, `FETCH_HEAD`, `ORIG_HEAD` and `MERGE_HEAD`);
-
-  . otherwise, `refs/<name>` if exists;
-
-  . otherwise, `refs/tags/<name>` if exists;
-
-  . otherwise, `refs/heads/<name>` if exists;
-
-  . otherwise, `refs/remotes/<name>` if exists;
-
-  . otherwise, `refs/remotes/<name>/HEAD` if exists.
-+
-HEAD names the commit your changes in the working tree is based on.
-FETCH_HEAD records the branch you fetched from a remote repository
-with your last 'git fetch' invocation.
-ORIG_HEAD is created by commands that moves your HEAD in a drastic
-way, to record the position of the HEAD before their operation, so that
-you can change the tip of the branch back to the state before you ran
-them easily.
-MERGE_HEAD records the commit(s) you are merging into your branch
-when you run 'git merge'.
-+
-Note that any of the `refs/*` cases above may come either from
-the `$GIT_DIR/refs` directory or from the `$GIT_DIR/packed-refs` file.
-
-* A ref followed by the suffix '@' with a date specification
-  enclosed in a brace
-  pair (e.g. '\{yesterday\}', '\{1 month 2 weeks 3 days 1 hour 1
-  second ago\}' or '\{1979-02-26 18:30:00\}') to specify the value
-  of the ref at a prior point in time.  This suffix may only be
-  used immediately following a ref name and the ref must have an
-  existing log ($GIT_DIR/logs/<ref>). Note that this looks up the state
-  of your *local* ref at a given time; e.g., what was in your local
-  `master` branch last week. If you want to look at commits made during
-  certain times, see `--since` and `--until`.
-
-* A ref followed by the suffix '@' with an ordinal specification
-  enclosed in a brace pair (e.g. '\{1\}', '\{15\}') to specify
-  the n-th prior value of that ref.  For example 'master@\{1\}'
-  is the immediate prior value of 'master' while 'master@\{5\}'
-  is the 5th prior value of 'master'. This suffix may only be used
-  immediately following a ref name and the ref must have an existing
-  log ($GIT_DIR/logs/<ref>).
-
-* You can use the '@' construct with an empty ref part to get at a
-  reflog of the current branch. For example, if you are on the
-  branch 'blabla', then '@\{1\}' means the same as 'blabla@\{1\}'.
-
-* The special construct '@\{-<n>\}' means the <n>th branch checked out
-  before the current one.
-
-* The suffix '@\{upstream\}' to a ref (short form 'ref@\{u\}') refers to
-  the branch the ref is set to build on top of.  Missing ref defaults
-  to the current branch.
-
-* A suffix '{caret}' to a revision parameter (e.g. 'HEAD{caret}') means the first parent of
-  that commit object.  '{caret}<n>' means the <n>th parent (i.e.
-  'rev{caret}'
-  is equivalent to 'rev{caret}1').  As a special rule,
-  'rev{caret}0' means the commit itself and is used when 'rev' is the
-  object name of a tag object that refers to a commit object.
-
-* A suffix '{tilde}<n>' to a revision parameter means the commit
-  object that is the <n>th generation grand-parent of the named
-  commit object, following only the first parent.  I.e. rev~3 is
-  equivalent to rev{caret}{caret}{caret} which is equivalent to
-  rev{caret}1{caret}1{caret}1.  See below for a illustration of
-  the usage of this form.
-
-* A suffix '{caret}' followed by an object type name enclosed in
-  brace pair (e.g. `v0.99.8{caret}\{commit\}`) means the object
-  could be a tag, and dereference the tag recursively until an
-  object of that type is found or the object cannot be
-  dereferenced anymore (in which case, barf).  `rev{caret}0`
-  introduced earlier is a short-hand for `rev{caret}\{commit\}`.
-
-* A suffix '{caret}' followed by an empty brace pair
-  (e.g. `v0.99.8{caret}\{\}`) means the object could be a tag,
-  and dereference the tag recursively until a non-tag object is
-  found.
-
-* A colon, followed by a slash, followed by a text (e.g. `:/fix nasty bug`): this names
-  a commit whose commit message starts with the specified text.
-  This name returns the youngest matching commit which is
-  reachable from any ref.  If the commit message starts with a
-  '!', you have to repeat that;  the special sequence ':/!',
-  followed by something else than '!' is reserved for now.
-
-* A suffix ':' followed by a path (e.g. `HEAD:README`); this names the blob or tree
-  at the given path in the tree-ish object named by the part
-  before the colon.
-  ':path' (with an empty part before the colon, e.g. `:README`)
-  is a special case of the syntax described next: content
-  recorded in the index at the given path.
-
-* A colon, optionally followed by a stage number (0 to 3) and a
-  colon, followed by a path (e.g. `:0:README`); this names a blob object in the
-  index at the given path. Missing stage number (and the colon
-  that follows it, e.g. `:README`) names a stage 0 entry. During a merge, stage
-  1 is the common ancestor, stage 2 is the target branch's version
-  (typically the current branch), and stage 3 is the version from
-  the branch being merged.
-
-Here is an illustration, by Jon Loeliger.  Both commit nodes B
-and C are parents of commit node A.  Parent commits are ordered
-left-to-right.
-
-........................................
-G   H   I   J
- \ /     \ /
-  D   E   F
-   \  |  / \
-    \ | /   |
-     \|/    |
-      B     C
-       \   /
-        \ /
-         A
-........................................
-
-    A =      = A^0
-    B = A^   = A^1     = A~1
-    C = A^2  = A^2
-    D = A^^  = A^1^1   = A~2
-    E = B^2  = A^^2
-    F = B^3  = A^^3
-    G = A^^^ = A^1^1^1 = A~3
-    H = D^2  = B^^2    = A^^^2  = A~2^2
-    I = F^   = B^3^    = A^^3^
-    J = F^2  = B^3^2   = A^^3^2
-
-
-SPECIFYING RANGES
------------------
-
-History traversing commands such as 'git log' operate on a set
-of commits, not just a single commit.  To these commands,
-specifying a single revision with the notation described in the
-previous section means the set of commits reachable from that
-commit, following the commit ancestry chain.
-
-To exclude commits reachable from a commit, a prefix `{caret}`
-notation is used.  E.g. `{caret}r1 r2` means commits reachable
-from `r2` but exclude the ones reachable from `r1`.
-
-This set operation appears so often that there is a shorthand
-for it.  When you have two commits `r1` and `r2` (named according
-to the syntax explained in SPECIFYING REVISIONS above), you can ask
-for commits that are reachable from r2 excluding those that are reachable
-from r1 by `{caret}r1 r2` and it can be written as `r1..r2`.
-
-A similar notation `r1\...r2` is called symmetric difference
-of `r1` and `r2` and is defined as
-`r1 r2 --not $(git merge-base --all r1 r2)`.
-It is the set of commits that are reachable from either one of
-`r1` or `r2` but not from both.
-
-Two other shorthands for naming a set that is formed by a commit
-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.
-
-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            G H D E B C
-   ^D B C           E I J F B C
-   C^@              I J F
-   F^! D            G H D F
+include::revisions.txt[]
 
 PARSEOPT
 --------
diff --git a/Documentation/revisions.txt b/Documentation/revisions.txt
new file mode 100644
index 0000000..fe846f0
--- /dev/null
+++ b/Documentation/revisions.txt
@@ -0,0 +1,199 @@
+SPECIFYING REVISIONS
+--------------------
+
+A revision parameter typically, but not necessarily, names a
+commit object.  They use what is called an 'extended SHA1'
+syntax.  Here are various ways to spell object names.  The
+ones listed near the end of this list are to name trees and
+blobs contained in a commit.
+
+* The full SHA1 object name (40-byte hexadecimal string), or
+  a substring of such that is unique within the repository.
+  E.g. dae86e1950b1277e545cee180551750029cfe735 and dae86e both
+  name the same commit object if there are no other object in
+  your repository whose object name starts with dae86e.
+
+* An output from 'git describe'; i.e. a closest tag, optionally
+  followed by a dash and a number of commits, followed by a dash, a
+  `g`, and an abbreviated object name.
+
+* A symbolic ref name.  E.g. 'master' typically means the 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 `<name>` is disambiguated by taking the
+  first match in the following rules:
+
+  . if `$GIT_DIR/<name>` exists, that is what you mean (this is usually
+    useful only for `HEAD`, `FETCH_HEAD`, `ORIG_HEAD` and `MERGE_HEAD`);
+
+  . otherwise, `refs/<name>` if exists;
+
+  . otherwise, `refs/tags/<name>` if exists;
+
+  . otherwise, `refs/heads/<name>` if exists;
+
+  . otherwise, `refs/remotes/<name>` if exists;
+
+  . otherwise, `refs/remotes/<name>/HEAD` if exists.
++
+HEAD names the commit your changes in the working tree is based on.
+FETCH_HEAD records the branch you fetched from a remote repository
+with your last 'git fetch' invocation.
+ORIG_HEAD is created by commands that moves your HEAD in a drastic
+way, to record the position of the HEAD before their operation, so that
+you can change the tip of the branch back to the state before you ran
+them easily.
+MERGE_HEAD records the commit(s) you are merging into your branch
+when you run 'git merge'.
++
+Note that any of the `refs/*` cases above may come either from
+the `$GIT_DIR/refs` directory or from the `$GIT_DIR/packed-refs` file.
+
+* A ref followed by the suffix '@' with a date specification
+  enclosed in a brace
+  pair (e.g. '\{yesterday\}', '\{1 month 2 weeks 3 days 1 hour 1
+  second ago\}' or '\{1979-02-26 18:30:00\}') to specify the value
+  of the ref at a prior point in time.  This suffix may only be
+  used immediately following a ref name and the ref must have an
+  existing log ($GIT_DIR/logs/<ref>). Note that this looks up the state
+  of your *local* ref at a given time; e.g., what was in your local
+  `master` branch last week. If you want to look at commits made during
+  certain times, see `--since` and `--until`.
+
+* A ref followed by the suffix '@' with an ordinal specification
+  enclosed in a brace pair (e.g. '\{1\}', '\{15\}') to specify
+  the n-th prior value of that ref.  For example 'master@\{1\}'
+  is the immediate prior value of 'master' while 'master@\{5\}'
+  is the 5th prior value of 'master'. This suffix may only be used
+  immediately following a ref name and the ref must have an existing
+  log ($GIT_DIR/logs/<ref>).
+
+* You can use the '@' construct with an empty ref part to get at a
+  reflog of the current branch. For example, if you are on the
+  branch 'blabla', then '@\{1\}' means the same as 'blabla@\{1\}'.
+
+* The special construct '@\{-<n>\}' means the <n>th branch checked out
+  before the current one.
+
+* The suffix '@\{upstream\}' to a ref (short form 'ref@\{u\}') refers to
+  the branch the ref is set to build on top of.  Missing ref defaults
+  to the current branch.
+
+* A suffix '{caret}' to a revision parameter (e.g. 'HEAD{caret}') means the first parent of
+  that commit object.  '{caret}<n>' means the <n>th parent (i.e.
+  'rev{caret}'
+  is equivalent to 'rev{caret}1').  As a special rule,
+  'rev{caret}0' means the commit itself and is used when 'rev' is the
+  object name of a tag object that refers to a commit object.
+
+* A suffix '{tilde}<n>' to a revision parameter means the commit
+  object that is the <n>th generation grand-parent of the named
+  commit object, following only the first parent.  I.e. rev~3 is
+  equivalent to rev{caret}{caret}{caret} which is equivalent to
+  rev{caret}1{caret}1{caret}1.  See below for a illustration of
+  the usage of this form.
+
+* A suffix '{caret}' followed by an object type name enclosed in
+  brace pair (e.g. `v0.99.8{caret}\{commit\}`) means the object
+  could be a tag, and dereference the tag recursively until an
+  object of that type is found or the object cannot be
+  dereferenced anymore (in which case, barf).  `rev{caret}0`
+  introduced earlier is a short-hand for `rev{caret}\{commit\}`.
+
+* A suffix '{caret}' followed by an empty brace pair
+  (e.g. `v0.99.8{caret}\{\}`) means the object could be a tag,
+  and dereference the tag recursively until a non-tag object is
+  found.
+
+* A colon, followed by a slash, followed by a text (e.g. `:/fix nasty bug`): this names
+  a commit whose commit message starts with the specified text.
+  This name returns the youngest matching commit which is
+  reachable from any ref.  If the commit message starts with a
+  '!', you have to repeat that;  the special sequence ':/!',
+  followed by something else than '!' is reserved for now.
+
+* A suffix ':' followed by a path (e.g. `HEAD:README`); this names the blob or tree
+  at the given path in the tree-ish object named by the part
+  before the colon.
+  ':path' (with an empty part before the colon, e.g. `:README`)
+  is a special case of the syntax described next: content
+  recorded in the index at the given path.
+
+* A colon, optionally followed by a stage number (0 to 3) and a
+  colon, followed by a path (e.g. `:0:README`); this names a blob object in the
+  index at the given path. Missing stage number (and the colon
+  that follows it, e.g. `:README`) names a stage 0 entry. During a merge, stage
+  1 is the common ancestor, stage 2 is the target branch's version
+  (typically the current branch), and stage 3 is the version from
+  the branch being merged.
+
+Here is an illustration, by Jon Loeliger.  Both commit nodes B
+and C are parents of commit node A.  Parent commits are ordered
+left-to-right.
+
+........................................
+G   H   I   J
+ \ /     \ /
+  D   E   F
+   \  |  / \
+    \ | /   |
+     \|/    |
+      B     C
+       \   /
+        \ /
+         A
+........................................
+
+    A =      = A^0
+    B = A^   = A^1     = A~1
+    C = A^2  = A^2
+    D = A^^  = A^1^1   = A~2
+    E = B^2  = A^^2
+    F = B^3  = A^^3
+    G = A^^^ = A^1^1^1 = A~3
+    H = D^2  = B^^2    = A^^^2  = A~2^2
+    I = F^   = B^3^    = A^^3^
+    J = F^2  = B^3^2   = A^^3^2
+
+
+SPECIFYING RANGES
+-----------------
+
+History traversing commands such as 'git log' operate on a set
+of commits, not just a single commit.  To these commands,
+specifying a single revision with the notation described in the
+previous section means the set of commits reachable from that
+commit, following the commit ancestry chain.
+
+To exclude commits reachable from a commit, a prefix `{caret}`
+notation is used.  E.g. `{caret}r1 r2` means commits reachable
+from `r2` but exclude the ones reachable from `r1`.
+
+This set operation appears so often that there is a shorthand
+for it.  When you have two commits `r1` and `r2` (named according
+to the syntax explained in SPECIFYING REVISIONS above), you can ask
+for commits that are reachable from r2 excluding those that are reachable
+from r1 by `{caret}r1 r2` and it can be written as `r1..r2`.
+
+A similar notation `r1\...r2` is called symmetric difference
+of `r1` and `r2` and is defined as
+`r1 r2 --not $(git merge-base --all r1 r2)`.
+It is the set of commits that are reachable from either one of
+`r1` or `r2` but not from both.
+
+Two other shorthands for naming a set that is formed by a commit
+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.
+
+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            G H D E B C
+   ^D B C           E I J F B C
+   C^@              I J F
+   F^! D            G H D F
-- 
1.7.1.621.g01d76

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [RFC/PATCH 2/3] Documentation: gitrevisions
  2010-07-05 16:11 [RFC/PATCH 0/3] Documentation: Improve revision documentation Michael J Gruber
  2010-07-05 16:11 ` [RFC/PATCH 1/3] Documentation: split off rev doc into include file Michael J Gruber
@ 2010-07-05 16:11 ` Michael J Gruber
  2010-07-14  6:16   ` Stephen Boyd
  2010-07-05 16:11 ` [RFC/PATCH 3/3] Documentation: link to gitrevisions rather than git-rev-parse Michael J Gruber
  2010-07-05 17:26 ` [RFC/PATCH 0/3] Documentation: Improve revision documentation Ævar Arnfjörð Bjarmason
  3 siblings, 1 reply; 8+ messages in thread
From: Michael J Gruber @ 2010-07-05 16:11 UTC (permalink / raw)
  To: git

Create a new man page gitrevisions(7) which contains the revsions and
ranges documentation but not more. This uses (per include) the same bits
as the pertaining section of git-rev-parse(1).

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
---
 Documentation/Makefile         |    2 +-
 Documentation/gitrevisions.txt |   35 +++++++++++++++++++++++++++++++++++
 2 files changed, 36 insertions(+), 1 deletions(-)
 create mode 100644 Documentation/gitrevisions.txt

diff --git a/Documentation/Makefile b/Documentation/Makefile
index 04f69cf..a4c4063 100644
--- a/Documentation/Makefile
+++ b/Documentation/Makefile
@@ -6,7 +6,7 @@ MAN5_TXT=gitattributes.txt gitignore.txt gitmodules.txt githooks.txt \
 	gitrepository-layout.txt
 MAN7_TXT=gitcli.txt gittutorial.txt gittutorial-2.txt \
 	gitcvs-migration.txt gitcore-tutorial.txt gitglossary.txt \
-	gitdiffcore.txt gitworkflows.txt
+	gitdiffcore.txt gitrevisions.txt gitworkflows.txt
 
 MAN_TXT = $(MAN1_TXT) $(MAN5_TXT) $(MAN7_TXT)
 MAN_XML=$(patsubst %.txt,%.xml,$(MAN_TXT))
diff --git a/Documentation/gitrevisions.txt b/Documentation/gitrevisions.txt
new file mode 100644
index 0000000..fc4789f
--- /dev/null
+++ b/Documentation/gitrevisions.txt
@@ -0,0 +1,35 @@
+gitrevisions(7)
+================
+
+NAME
+----
+gitrevisions - specifying revisions and ranges for git
+
+SYNOPSIS
+--------
+gitrevisions
+
+
+DESCRIPTION
+-----------
+
+Many Git commands take revision parameters as arguments. Depending on
+the command, they denote a specific commit or, for commands which
+walk the revision graph (such as linkgit:git-log[1]), all commits which can
+be reached from that commit. In the latter case one can also specify a
+range of revisions explicitly.
+
+In addition, some Git commands (such as linkgit:git-show[1]) also take
+revision parameters which denote other objects than commits, e.g. blobs
+("files") or trees ("directories of files").
+
+include::revisions.txt[]
+
+
+SEE ALSO
+--------
+linkgit:git-rev-parse[1]
+
+GIT
+---
+Part of the linkgit:git[1] suite
-- 
1.7.1.621.g01d76

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [RFC/PATCH 3/3] Documentation: link to gitrevisions rather than git-rev-parse
  2010-07-05 16:11 [RFC/PATCH 0/3] Documentation: Improve revision documentation Michael J Gruber
  2010-07-05 16:11 ` [RFC/PATCH 1/3] Documentation: split off rev doc into include file Michael J Gruber
  2010-07-05 16:11 ` [RFC/PATCH 2/3] Documentation: gitrevisions Michael J Gruber
@ 2010-07-05 16:11 ` Michael J Gruber
  2010-07-05 17:26 ` [RFC/PATCH 0/3] Documentation: Improve revision documentation Ævar Arnfjörð Bjarmason
  3 siblings, 0 replies; 8+ messages in thread
From: Michael J Gruber @ 2010-07-05 16:11 UTC (permalink / raw)
  To: git

Currently, whenever we need documentation for revisions and ranges, we
link to the git-rev-parse man page, i.e. a plumbing man page, which has
this along with the documentation of all rev-parse modes.

Link to the new gitrevisions man page instead in all cases except
- when the actual git-rev-parse command is referred to or
- in very technical context (git-send-pack).

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
---
 Documentation/git-cat-file.txt         |    2 +-
 Documentation/git-check-ref-format.txt |    2 +-
 Documentation/git-cherry-pick.txt      |    4 ++--
 Documentation/git-diff.txt             |    4 ++--
 Documentation/git-fast-import.txt      |    2 +-
 Documentation/git-format-patch.txt     |    2 +-
 Documentation/git-log.txt              |    3 +--
 Documentation/git-push.txt             |    2 +-
 Documentation/git-reflog.txt           |    2 +-
 Documentation/git-revert.txt           |    2 +-
 Documentation/git-show-branch.txt      |    2 +-
 Documentation/git-show.txt             |    2 +-
 Documentation/git.txt                  |    2 +-
 Documentation/gitcore-tutorial.txt     |    2 +-
 Documentation/gitk.txt                 |    2 +-
 Documentation/user-manual.txt          |    8 ++++----
 16 files changed, 21 insertions(+), 22 deletions(-)

diff --git a/Documentation/git-cat-file.txt b/Documentation/git-cat-file.txt
index 9ebbe94..a3f56b0 100644
--- a/Documentation/git-cat-file.txt
+++ b/Documentation/git-cat-file.txt
@@ -27,7 +27,7 @@ OPTIONS
 <object>::
 	The name of the object to show.
 	For a more complete list of ways to spell object names, see
-	the "SPECIFYING REVISIONS" section in linkgit:git-rev-parse[1].
+	the "SPECIFYING REVISIONS" section in linkgit:gitrevisions[1].
 
 -t::
 	Instead of the content, show the object type identified by
diff --git a/Documentation/git-check-ref-format.txt b/Documentation/git-check-ref-format.txt
index 379eee6..f5c2e06 100644
--- a/Documentation/git-check-ref-format.txt
+++ b/Documentation/git-check-ref-format.txt
@@ -49,7 +49,7 @@ git imposes the following rules on how references are named:
 These rules make it easy for shell script based tools to parse
 reference names, pathname expansion by the shell when a reference name is used
 unquoted (by mistake), and also avoids ambiguities in certain
-reference name expressions (see linkgit:git-rev-parse[1]):
+reference name expressions (see linkgit:gitrevisions[1]):
 
 . A double-dot `..` is often used as in `ref1..ref2`, and in some
   contexts this notation means `{caret}ref1 ref2` (i.e. not in
diff --git a/Documentation/git-cherry-pick.txt b/Documentation/git-cherry-pick.txt
index ca485db..2cef579 100644
--- a/Documentation/git-cherry-pick.txt
+++ b/Documentation/git-cherry-pick.txt
@@ -20,8 +20,8 @@ OPTIONS
 -------
 <commit>...::
 	Commits to cherry-pick.
-	For a more complete list of ways to spell commits, see the
-	"SPECIFYING REVISIONS" section in linkgit:git-rev-parse[1].
+	For a more complete list of ways to spell commits, see
+	linkgit:gitrevisions[1].
 	Sets of commits can be passed but no traversal is done by
 	default, as if the '--no-walk' option was specified, see
 	linkgit:git-rev-list[1].
diff --git a/Documentation/git-diff.txt b/Documentation/git-diff.txt
index 723a648..08fd409 100644
--- a/Documentation/git-diff.txt
+++ b/Documentation/git-diff.txt
@@ -68,11 +68,11 @@ for the last two forms that use ".." notations, can be any
 <tree-ish>.
 
 For a more complete list of ways to spell <commit>, see
-"SPECIFYING REVISIONS" section in linkgit:git-rev-parse[1].
+"SPECIFYING REVISIONS" section in linkgit:gitrevisions[1].
 However, "diff" is about comparing two _endpoints_, not ranges,
 and the range notations ("<commit>..<commit>" and
 "<commit>\...<commit>") do not mean a range as defined in the
-"SPECIFYING RANGES" section in linkgit:git-rev-parse[1].
+"SPECIFYING RANGES" section in linkgit:gitrevisions[1].
 
 OPTIONS
 -------
diff --git a/Documentation/git-fast-import.txt b/Documentation/git-fast-import.txt
index 19082b0..77a0a24 100644
--- a/Documentation/git-fast-import.txt
+++ b/Documentation/git-fast-import.txt
@@ -439,7 +439,7 @@ Marks must be declared (via `mark`) before they can be used.
 * A complete 40 byte or abbreviated commit SHA-1 in hex.
 
 * Any valid Git SHA-1 expression that resolves to a commit.  See
-  ``SPECIFYING REVISIONS'' in linkgit:git-rev-parse[1] for details.
+  ``SPECIFYING REVISIONS'' in linkgit:gitrevisions[1] for details.
 
 The special case of restarting an incremental import from the
 current branch value should be written as:
diff --git a/Documentation/git-format-patch.txt b/Documentation/git-format-patch.txt
index c8c81e8..4b3f5ba 100644
--- a/Documentation/git-format-patch.txt
+++ b/Documentation/git-format-patch.txt
@@ -39,7 +39,7 @@ There are two ways to specify which commits to operate on.
    that leads to the <since> to be output.
 
 2. Generic <revision range> expression (see "SPECIFYING
-   REVISIONS" section in linkgit:git-rev-parse[1]) means the
+   REVISIONS" section in linkgit:gitrevisions[1]) means the
    commits in the specified range.
 
 The first rule takes precedence in the case of a single <commit>.  To
diff --git a/Documentation/git-log.txt b/Documentation/git-log.txt
index 0e6ff31..8a69647 100644
--- a/Documentation/git-log.txt
+++ b/Documentation/git-log.txt
@@ -34,8 +34,7 @@ include::diff-options.txt[]
 	either <since> or <until> is omitted, it defaults to
 	`HEAD`, i.e. the tip of the current branch.
 	For a more complete list of ways to spell <since>
-	and <until>, see "SPECIFYING REVISIONS" section in
-	linkgit:git-rev-parse[1].
+	and <until>, see linkgit:gitrevisions[1].
 
 --no-decorate::
 --decorate[=short|full|no]::
diff --git a/Documentation/git-push.txt b/Documentation/git-push.txt
index 4857024..b68abff 100644
--- a/Documentation/git-push.txt
+++ b/Documentation/git-push.txt
@@ -41,7 +41,7 @@ OPTIONS[[OPTIONS]]
 +
 The <src> is often the name of the branch you would want to push, but
 it can be any arbitrary "SHA-1 expression", such as `master~4` or
-`HEAD` (see linkgit:git-rev-parse[1]).
+`HEAD` (see linkgit:gitrevisions[1]).
 +
 The <dst> tells which ref on the remote side is updated with this
 push. Arbitrary expressions cannot be used here, an actual ref must
diff --git a/Documentation/git-reflog.txt b/Documentation/git-reflog.txt
index 4eaa62b..5a0451a 100644
--- a/Documentation/git-reflog.txt
+++ b/Documentation/git-reflog.txt
@@ -40,7 +40,7 @@ see linkgit:git-log[1].
 The reflog is useful in various git commands, to specify the old value
 of a reference. For example, `HEAD@\{2\}` means "where HEAD used to be
 two moves ago", `master@\{one.week.ago\}` means "where master used to
-point to one week ago", and so on. See linkgit:git-rev-parse[1] for
+point to one week ago", and so on. See linkgit:gitrevisions[1] for
 more details.
 
 To delete single entries from the reflog, use the subcommand "delete"
diff --git a/Documentation/git-revert.txt b/Documentation/git-revert.txt
index dea4f53..b7d9ef7 100644
--- a/Documentation/git-revert.txt
+++ b/Documentation/git-revert.txt
@@ -31,7 +31,7 @@ OPTIONS
 <commit>...::
 	Commits to revert.
 	For a more complete list of ways to spell commit names, see
-	"SPECIFYING REVISIONS" section in linkgit:git-rev-parse[1].
+	linkgit:gitrevisions[1].
 	Sets of commits can also be given but no traversal is done by
 	default, see linkgit:git-rev-list[1] and its '--no-walk'
 	option.
diff --git a/Documentation/git-show-branch.txt b/Documentation/git-show-branch.txt
index f1499bb..81ba296 100644
--- a/Documentation/git-show-branch.txt
+++ b/Documentation/git-show-branch.txt
@@ -32,7 +32,7 @@ no <rev> nor <glob> is given on the command line.
 OPTIONS
 -------
 <rev>::
-	Arbitrary extended SHA1 expression (see linkgit:git-rev-parse[1])
+	Arbitrary extended SHA1 expression (see linkgit:gitrevisions[1])
 	that typically names a branch head or a tag.
 
 <glob>::
diff --git a/Documentation/git-show.txt b/Documentation/git-show.txt
index 55e687a..0002bfb 100644
--- a/Documentation/git-show.txt
+++ b/Documentation/git-show.txt
@@ -36,7 +36,7 @@ OPTIONS
 <object>...::
 	The names of objects to show.
 	For a more complete list of ways to spell object names, see
-	"SPECIFYING REVISIONS" section in linkgit:git-rev-parse[1].
+	"SPECIFYING REVISIONS" section in linkgit:gitrevisions[1].
 
 include::pretty-options.txt[]
 
diff --git a/Documentation/git.txt b/Documentation/git.txt
index 8f0dd7f..12066ab 100644
--- a/Documentation/git.txt
+++ b/Documentation/git.txt
@@ -479,7 +479,7 @@ HEAD::
 	(i.e. the contents of `$GIT_DIR/refs/heads/<head>`).
 
 For a more complete list of ways to spell object names, see
-"SPECIFYING REVISIONS" section in linkgit:git-rev-parse[1].
+"SPECIFYING REVISIONS" section in linkgit:gitrevisions[1].
 
 
 File/Directory Structure
diff --git a/Documentation/gitcore-tutorial.txt b/Documentation/gitcore-tutorial.txt
index f7815e9..ed3ddc9 100644
--- a/Documentation/gitcore-tutorial.txt
+++ b/Documentation/gitcore-tutorial.txt
@@ -971,7 +971,7 @@ commits from the master branch.  The string inside brackets
 before the commit log message is a short name you can use to
 name the commit.  In the above example, 'master' and 'mybranch'
 are branch heads.  'master^' is the first parent of 'master'
-branch head.  Please see linkgit:git-rev-parse[1] if you want to
+branch head.  Please see linkgit:gitrevisions[1] if you want to
 see more complex cases.
 
 [NOTE]
diff --git a/Documentation/gitk.txt b/Documentation/gitk.txt
index 99baa24..05ac1c7 100644
--- a/Documentation/gitk.txt
+++ b/Documentation/gitk.txt
@@ -69,7 +69,7 @@ frequently used options.
 	the form "'<from>'..'<to>'" to show all revisions between '<from>' and
 	back to '<to>'. Note, more advanced revision selection can be applied.
 	For a more complete list of ways to spell object names, see
-	"SPECIFYING REVISIONS" section in linkgit:git-rev-parse[1].
+	linkgit:gitrevisions[1].
 
 <path>...::
 
diff --git a/Documentation/user-manual.txt b/Documentation/user-manual.txt
index fe6fb72..22aee34 100644
--- a/Documentation/user-manual.txt
+++ b/Documentation/user-manual.txt
@@ -397,7 +397,7 @@ is usually a shortcut for the HEAD branch in the repository "origin".
 For the complete list of paths which git checks for references, and
 the order it uses to decide which to choose when there are multiple
 references with the same shorthand name, see the "SPECIFYING
-REVISIONS" section of linkgit:git-rev-parse[1].
+REVISIONS" section of linkgit:gitrevisions[1].
 
 [[Updating-a-repository-With-git-fetch]]
 Updating a repository with git fetch
@@ -568,7 +568,7 @@ We have seen several ways of naming commits already:
 	- HEAD: refers to the head of the current branch
 
 There are many more; see the "SPECIFYING REVISIONS" section of the
-linkgit:git-rev-parse[1] man page for the complete list of ways to
+linkgit:gitrevisions[1] man page for the complete list of ways to
 name revisions.  Some examples:
 
 -------------------------------------------------
@@ -909,7 +909,7 @@ commits reachable from some head but not from any tag in the repository:
 $ gitk $( git show-ref --heads ) --not  $( git show-ref --tags )
 -------------------------------------------------
 
-(See linkgit:git-rev-parse[1] for explanations of commit-selecting
+(See linkgit:gitrevisions[1] for explanations of commit-selecting
 syntax such as `--not`.)
 
 [[making-a-release]]
@@ -1635,7 +1635,7 @@ you've checked out.
 The reflogs are kept by default for 30 days, after which they may be
 pruned.  See linkgit:git-reflog[1] and linkgit:git-gc[1] to learn
 how to control this pruning, and see the "SPECIFYING REVISIONS"
-section of linkgit:git-rev-parse[1] for details.
+section of linkgit:gitrevisions[1] for details.
 
 Note that the reflog history is very different from normal git history.
 While normal history is shared by every repository that works on the
-- 
1.7.1.621.g01d76

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [RFC/PATCH 0/3] Documentation: Improve revision documentation
  2010-07-05 16:11 [RFC/PATCH 0/3] Documentation: Improve revision documentation Michael J Gruber
                   ` (2 preceding siblings ...)
  2010-07-05 16:11 ` [RFC/PATCH 3/3] Documentation: link to gitrevisions rather than git-rev-parse Michael J Gruber
@ 2010-07-05 17:26 ` Ævar Arnfjörð Bjarmason
  3 siblings, 0 replies; 8+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-07-05 17:26 UTC (permalink / raw)
  To: Michael J Gruber; +Cc: git

On Mon, Jul 5, 2010 at 16:11, Michael J Gruber <git@drmicha.warpmail.net> wrote:
> This mini-series sets up a new gitrevisions(7) man page so that people
> looking for revision syntax don't need to try to find it in
> git-rev-parse(1) which is cluttered with a lot of unrelated stuff (it's
> plumbing after all).

I like this series a lot. I often forget what our revision behavior is
and whether it's documented in git-rev-list, git-rev-parse or
something else. Then when I finally find it in git-rev-parse I have to
page down the manpage to discover it.

This is definitely something that should be standalone in
gitrevisions(7).

Acked-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [RFC/PATCH 2/3] Documentation: gitrevisions
  2010-07-05 16:11 ` [RFC/PATCH 2/3] Documentation: gitrevisions Michael J Gruber
@ 2010-07-14  6:16   ` Stephen Boyd
  2010-07-14  8:42     ` Michael J Gruber
  0 siblings, 1 reply; 8+ messages in thread
From: Stephen Boyd @ 2010-07-14  6:16 UTC (permalink / raw)
  To: Michael J Gruber; +Cc: git

  On 07/05/2010 09:11 AM, Michael J Gruber wrote:
> +
> +DESCRIPTION
> +-----------
> +
> +Many Git commands take revision parameters as arguments. Depending on
> +the command, they denote a specific commit or, for commands which
> +walk the revision graph (such as linkgit:git-log[1]), all commits which can
> +be reached from that commit. In the latter case one can also specify a
> +range of revisions explicitly.
> +
> +In addition, some Git commands (such as linkgit:git-show[1]) also take
> +revision parameters which denote other objects than commits, e.g. blobs
> +("files") or trees ("directories of files").
> +

Is any of this text (section?) necessary besides including revisions.txt? It seems that revisions.txt nicely covers the types of revisions in the first paragraph of each section and these two paragraphs repeat that.

Can you squash this in?

--->8----

index fc4789f..0e25c5f 100644
--- a/Documentation/gitrevisions.txt
+++ b/Documentation/gitrevisions.txt
@@ -10,19 +10,6 @@ SYNOPSIS
  gitrevisions


-DESCRIPTION
------------
-
-Many Git commands take revision parameters as arguments. Depending on
-the command, they denote a specific commit or, for commands which
-walk the revision graph (such as linkgit:git-log[1]), all commits which can
-be reached from that commit. In the latter case one can also specify a
-range of revisions explicitly.
-
-In addition, some Git commands (such as linkgit:git-show[1]) also take
-revision parameters which denote other objects than commits, e.g. blobs
-("files") or trees ("directories of files").
-
  include::revisions.txt[]

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [RFC/PATCH 2/3] Documentation: gitrevisions
  2010-07-14  6:16   ` Stephen Boyd
@ 2010-07-14  8:42     ` Michael J Gruber
  2010-07-14 16:49       ` Stephen Boyd
  0 siblings, 1 reply; 8+ messages in thread
From: Michael J Gruber @ 2010-07-14  8:42 UTC (permalink / raw)
  To: Stephen Boyd; +Cc: git

Stephen Boyd venit, vidit, dixit 14.07.2010 08:16:
>   On 07/05/2010 09:11 AM, Michael J Gruber wrote:
>> +
>> +DESCRIPTION
>> +-----------
>> +
>> +Many Git commands take revision parameters as arguments. Depending on
>> +the command, they denote a specific commit or, for commands which
>> +walk the revision graph (such as linkgit:git-log[1]), all commits which can
>> +be reached from that commit. In the latter case one can also specify a
>> +range of revisions explicitly.
>> +
>> +In addition, some Git commands (such as linkgit:git-show[1]) also take
>> +revision parameters which denote other objects than commits, e.g. blobs
>> +("files") or trees ("directories of files").
>> +
> 
> Is any of this text (section?) necessary besides including revisions.txt? It seems that revisions.txt nicely covers the types of revisions in the first paragraph of each section and these two paragraphs repeat that.
> 
> Can you squash this in?
> 
> --->8----
> 
> index fc4789f..0e25c5f 100644
> --- a/Documentation/gitrevisions.txt
> +++ b/Documentation/gitrevisions.txt
> @@ -10,19 +10,6 @@ SYNOPSIS
>   gitrevisions
> 
> 
> -DESCRIPTION
> ------------
> -
> -Many Git commands take revision parameters as arguments. Depending on
> -the command, they denote a specific commit or, for commands which
> -walk the revision graph (such as linkgit:git-log[1]), all commits which can
> -be reached from that commit. In the latter case one can also specify a
> -range of revisions explicitly.
> -
> -In addition, some Git commands (such as linkgit:git-show[1]) also take
> -revision parameters which denote other objects than commits, e.g. blobs
> -("files") or trees ("directories of files").
> -
>   include::revisions.txt[]
> 
> 
> 

I added this text on purpose. The "DESCRIPTION" section is meant to give
a concise description of the overall picture so that, e.g., you
understand which section will answer which question without having to
read all of them. In this case it gives you a short overview of what can
be referred to by revisions (commit, commit range, general object)
before the sections go into the details of how to specify them.

Also, as I mentioned in the cover letter, I suggest a rework of the
actual (included, old) content if that structure is to stay. So, in a
second step, one could avoid duplications.

But here, I find it really natural (if not necessary) that the first
paragraph in each detailed section picks up on the pertaining parts of
the concise description.

Michael

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [RFC/PATCH 2/3] Documentation: gitrevisions
  2010-07-14  8:42     ` Michael J Gruber
@ 2010-07-14 16:49       ` Stephen Boyd
  0 siblings, 0 replies; 8+ messages in thread
From: Stephen Boyd @ 2010-07-14 16:49 UTC (permalink / raw)
  To: Michael J Gruber; +Cc: git

  On 07/14/2010 01:42 AM, Michael J Gruber wrote:
>
> I added this text on purpose. The "DESCRIPTION" section is meant to give
> a concise description of the overall picture so that, e.g., you
> understand which section will answer which question without having to
> read all of them. In this case it gives you a short overview of what can
> be referred to by revisions (commit, commit range, general object)
> before the sections go into the details of how to specify them.
>
> Also, as I mentioned in the cover letter, I suggest a rework of the
> actual (included, old) content if that structure is to stay. So, in a
> second step, one could avoid duplications.

Ok, I must have missed that in the cover letter. I hope in the next version we can rework the old content and integrate it into the two paragraphs in this patch. I don't see how keeping the DESCRIPTION section this verbose is helpful. At most it should say:

Many Git commands take revisions as parameters. A revision typically specifies a commit, but it can also specify a blob, a tree, or a set of commits. A set of commits is commonly referred to as a revision range. (or just range?)

And then I wonder if that should just go in the SYNOPSIS section and the DESCRIPTION should be deleted.

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2010-07-14 16:50 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-07-05 16:11 [RFC/PATCH 0/3] Documentation: Improve revision documentation Michael J Gruber
2010-07-05 16:11 ` [RFC/PATCH 1/3] Documentation: split off rev doc into include file Michael J Gruber
2010-07-05 16:11 ` [RFC/PATCH 2/3] Documentation: gitrevisions Michael J Gruber
2010-07-14  6:16   ` Stephen Boyd
2010-07-14  8:42     ` Michael J Gruber
2010-07-14 16:49       ` Stephen Boyd
2010-07-05 16:11 ` [RFC/PATCH 3/3] Documentation: link to gitrevisions rather than git-rev-parse Michael J Gruber
2010-07-05 17:26 ` [RFC/PATCH 0/3] Documentation: Improve revision documentation Ævar Arnfjörð Bjarmason

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.