git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] git-apply: document remaining options in the man page
@ 2006-08-18  8:45 Jonas Fonseca
  2006-08-18  9:43 ` Junio C Hamano
  0 siblings, 1 reply; 9+ messages in thread
From: Jonas Fonseca @ 2006-08-18  8:45 UTC (permalink / raw)
  To: git

Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
---

[ On top of next if that matters. ]

I'm not sure if I got the --exclude note right, which says that running
apply from a subdirectory automatically excludes files outside the
subdirectory. As I mention below it looks like this excluding is only
done when --index or --cached is specified. It led me to investigate a
bit further and I think I might have found an issue or two.

I was playing with the prefix checking in use_patch() to try and see if
I could break it. I noticed that the patch filename will be prefixed
with the prefix, but not the paths in the patch. This means that if I
apply a patch created with a non-git diff for a file in a directory
with a name longer than the changed file it will not be applied, e.g.
git-am.txt in Documentation. So

	v1.4.2-g169bec6:git/Documentation > git apply --index git-am.diff

will silently drop the change. Or maybe it is just me who doesn't know
how to see diffs in the index (git-diff-index reports no change to
Documentation/git-am.txt). The code from use_patch():

        if (0 < prefix_length) { /* strlen("Documentation") = 13 */
		int pathlen = strlen("git-am.txt"); /* = 10 */
		if (pathlen <= prefix_length ||
		    memcmp(prefix, pathname, prefix_length))
			return 0;
	}

Anyway, the prefix check is only ever performed when using --index or
--cached. These options doesn't seem to support being run from a
subdirectories if the patch is given on stdin:

	v1.4.2-g169bec6:git/Documentation > git apply --cached < git-am.diff
	fatal: unable to create '.git/index': No such file or directory

I can make a follow-up patch if this is the way it's supposed to work.
In that case a better error message might be good to clearify things.

Lastly, `log -S<option>` is so great when doing these man pages updates
and you, like me, don't know the code very well, since you can "just"
paraphrase the commit message that will sometimes also describe the
scenario where the option is applicable. :)

 Documentation/git-apply.txt |   28 +++++++++++++++++++++++-----
 1 files changed, 23 insertions(+), 5 deletions(-)

diff --git a/Documentation/git-apply.txt b/Documentation/git-apply.txt
index f1ab1f9..33d63a4 100644
--- a/Documentation/git-apply.txt
+++ b/Documentation/git-apply.txt
@@ -10,9 +10,9 @@ SYNOPSIS
 --------
 [verse]
 'git-apply' [--stat] [--numstat] [--summary] [--check] [--index] [--apply]
-	  [--no-add] [--index-info] [--allow-binary-replacement]
-	  [--reverse] [-z] [-pNUM]
-	  [-CNUM] [--whitespace=<nowarn|warn|error|error-all|strip>]
+	  [--no-add] [--index-info] [--allow-binary-replacement | --binary]
+	  [-R | --reverse] [-z] [-pNUM] [-CNUM] [--inaccurate-eof] [--cached]
+	  [--whitespace=<nowarn|warn|error|error-all|strip>] [--exclude=PATH]
 	  [<patch>...]
 
 DESCRIPTION
@@ -56,6 +56,11 @@ OPTIONS
 	up-to-date, it is flagged as an error.  This flag also
 	causes the index file to be updated.
 
+--cached::
+	Apply a patch without touching the working tree. Instead, take the
+	cached data, apply the patch, and store the result in the index,
+	without using the working tree. This implies '--index'.
+
 --index-info::
 	Newer git-diff output has embedded 'index information'
 	for each blob to help identify the original version that
@@ -63,7 +68,7 @@ OPTIONS
 	the original version of the blob is available locally,
 	outputs information about them to the standard output.
 
---reverse::
+-R, --reverse::
 	Apply the patch in reverse.
 
 -z::
@@ -97,7 +102,7 @@ OPTIONS
 	the result with this option, which would apply the
 	deletion part but not addition part.
 
---allow-binary-replacement::
+--allow-binary-replacement, --binary::
 	When applying a patch, which is a git-enhanced patch
 	that was prepared to record the pre- and post-image object
 	name in full, and the path being patched exactly matches
@@ -108,6 +113,13 @@ OPTIONS
 	result.  This allows binary files to be patched in a
 	very limited way.
 
+--exclude=<path-pattern>::
+	Don't apply changes to files matching the given path pattern. This can
+	be useful when importing patchsets, where you want to exclude certain
+	files or directories. Note, if you run git-apply from a subdirectory
+	it will automatically exclude changes for files outside the
+	subdirectory.
+
 --whitespace=<option>::
 	When applying a patch, detect a new or modified line
 	that ends with trailing whitespaces (this includes a
@@ -128,6 +140,12 @@ OPTIONS
 * `strip` outputs warnings for a few such errors, strips out the
   trailing whitespaces and applies the patch.
 
+--inacurate-eof::
+	Under certain circumstances, some versions of diff do not correctly
+	detect a missing new-line at the end of the file. As a result, patches
+	created by such diff programs do not record incomplete lines
+	correctly. This option adds support for applying such patches by
+	working around this bug.
 
 Configuration
 -------------

-- 
Jonas Fonseca

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

* Re: [PATCH] git-apply: document remaining options in the man page
  2006-08-18  8:45 [PATCH] git-apply: document remaining options in the man page Jonas Fonseca
@ 2006-08-18  9:43 ` Junio C Hamano
  2006-08-25  0:56   ` [PATCH 1/7] git-apply(1): document missing options and improve existing ones Jonas Fonseca
  0 siblings, 1 reply; 9+ messages in thread
From: Junio C Hamano @ 2006-08-18  9:43 UTC (permalink / raw)
  To: Jonas Fonseca; +Cc: git

Jonas Fonseca <fonseca@diku.dk> writes:

> Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
> ---
>
> [ On top of next if that matters. ]

I'd appreciate if you can hold this off for a while; I'll be
updating git-apply a bit further, to add --verbose ("patching
foo...", "rejected hunk #4", etc.) and perhaps --clobber (apply
to working tree files that have local modifications), together
with --reject (apply hunks that could, while leaving
unapplicable ones out).  I've been reluctant to spray .rej files
all over the tree and was planning to spit all into a single
stream (stdout), which is what is on "pu" now, but I changed my
mind and decided to mimic what other people do (that format is
more useful to work with because other tools like wiggle expect
.rej files next to the target files).

> I'm not sure if I got the --exclude note right, which says that running
> apply from a subdirectory automatically excludes files outside the
> subdirectory.

I was thinking about dropping the exclude altogether, actually.

Also I've never thought about the possibility of anybody running
git-apply from a subdirectory.  git diffs by design always come
with full paths from the project toplevel, so I simply had a
preconception that everybody understood that applying would also
be always from the toplevel.

Don't get me wrong -- I do not mean to say that running apply
from a subdirectory is wrong.  I just haven't thought about
doing so, and need to think the implications through.

> Lastly, `log -S<option>` is so great when doing these man pages updates
> and you, like me, don't know the code very well, since you can "just"
> paraphrase the commit message that will sometimes also describe the
> scenario where the option is applicable. :)

Praise pickaxe, and say no to annotate ;-).

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

* [PATCH 1/7] git-apply(1): document missing options and improve existing ones
  2006-08-18  9:43 ` Junio C Hamano
@ 2006-08-25  0:56   ` Jonas Fonseca
  2006-08-25  0:58     ` [PATCH 2/7] git-ls-remote(1): document --upload-pack Jonas Fonseca
  0 siblings, 1 reply; 9+ messages in thread
From: Jonas Fonseca @ 2006-08-25  0:56 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git

Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
---
 Documentation/git-apply.txt |   45 ++++++++++++++++++++++++++++++++-----------
 1 files changed, 33 insertions(+), 12 deletions(-)

Junio C Hamano <junkio@cox.net> wrote Fri, Aug 18, 2006:
> Jonas Fonseca <fonseca@diku.dk> writes:
> > [ On top of next if that matters. ]
> 
> I'd appreciate if you can hold this off for a while;
> I'll be updating git-apply a bit further [...]

I don't know if it's been a while, but I see that some of the changes
you mentioned has migrated to 'next', so here's an updated patch plus
a few other documentation updates that I did in the train today.

Changes to the former patch includes adding --verbose description and
removing the part about subdirectories from the patch.

> > I'm not sure if I got the --exclude note right, which says that
> > running apply from a subdirectory automatically excludes files
> > outside the subdirectory.
> 
> I was thinking about dropping the exclude altogether, actually.

It does sound a bit special and mostly suited for batch work.

diff --git a/Documentation/git-apply.txt b/Documentation/git-apply.txt
index 11641a9..20e12ce 100644
--- a/Documentation/git-apply.txt
+++ b/Documentation/git-apply.txt
@@ -10,10 +10,10 @@ SYNOPSIS
 --------
 [verse]
 'git-apply' [--stat] [--numstat] [--summary] [--check] [--index] [--apply]
-	  [--no-add] [--index-info] [--allow-binary-replacement]
-	  [--reverse] [--reject] [-z] [-pNUM]
-	  [-CNUM] [--whitespace=<nowarn|warn|error|error-all|strip>]
-	  [<patch>...]
+	  [--no-add] [--index-info] [--allow-binary-replacement | --binary]
+	  [-R | --reverse] [--reject] [-z] [-pNUM] [-CNUM] [--inaccurate-eof]
+	  [--whitespace=<nowarn|warn|error|error-all|strip>] [--exclude=PATH]
+	  [--cached] [--verbose] [<patch>...]
 
 DESCRIPTION
 -----------
@@ -56,6 +56,11 @@ OPTIONS
 	up-to-date, it is flagged as an error.  This flag also
 	causes the index file to be updated.
 
+--cached::
+	Apply a patch without touching the working tree. Instead, take the
+	cached data, apply the patch, and store the result in the index,
+	without using the working tree. This implies '--index'.
+
 --index-info::
 	Newer git-diff output has embedded 'index information'
 	for each blob to help identify the original version that
@@ -63,14 +68,14 @@ OPTIONS
 	the original version of the blob is available locally,
 	outputs information about them to the standard output.
 
---reverse::
+-R, --reverse::
 	Apply the patch in reverse.
 
 --reject::
-	For atomicity, `git apply` fails the whole patch and
+	For atomicity, gitlink:git-apply[1] by default fails the whole patch and
 	does not touch the working tree when some of the hunks
-	do not apply by default.  This option makes it apply
-	parts of the patch that are applicable, and send the
+	do not apply.  This option makes it apply
+	the parts of the patch that are applicable, and send the
 	rejected hunks to the standard output of the command.
 
 -z::
@@ -91,8 +96,8 @@ OPTIONS
 	ever ignored.
 
 --apply::
-	If you use any of the options marked ``Turns off
-	"apply"'' above, git-apply reads and outputs the
+	If you use any of the options marked "Turns off
+	'apply'" above, gitlink:git-apply[1] reads and outputs the
 	information you asked without actually applying the
 	patch.  Give this flag after those flags to also apply
 	the patch.
@@ -104,7 +109,7 @@ OPTIONS
 	the result with this option, which would apply the
 	deletion part but not addition part.
 
---allow-binary-replacement::
+--allow-binary-replacement, --binary::
 	When applying a patch, which is a git-enhanced patch
 	that was prepared to record the pre- and post-image object
 	name in full, and the path being patched exactly matches
@@ -115,13 +120,18 @@ OPTIONS
 	result.  This allows binary files to be patched in a
 	very limited way.
 
+--exclude=<path-pattern>::
+	Don't apply changes to files matching the given path pattern. This can
+	be useful when importing patchsets, where you want to exclude certain
+	files or directories.
+
 --whitespace=<option>::
 	When applying a patch, detect a new or modified line
 	that ends with trailing whitespaces (this includes a
 	line that solely consists of whitespaces).  By default,
 	the command outputs warning messages and applies the
 	patch.
-	When `git-apply` is used for statistics and not applying a
+	When gitlink:git-apply[1] is used for statistics and not applying a
 	patch, it defaults to `nowarn`.
 	You can use different `<option>` to control this
 	behavior:
@@ -135,6 +145,17 @@ OPTIONS
 * `strip` outputs warnings for a few such errors, strips out the
   trailing whitespaces and applies the patch.
 
+--inacurate-eof::
+	Under certain circumstances, some versions of diff do not correctly
+	detect a missing new-line at the end of the file. As a result, patches
+	created by such diff programs do not record incomplete lines
+	correctly. This option adds support for applying such patches by
+	working around this bug.
+
+--verbose::
+	Report progress to stderr. By default, only a message about the
+	current patch being applied will be printed. This option will cause
+	additional information to be reported.
 
 Configuration
 -------------
-- 
1.4.2.GIT


-- 
Jonas Fonseca

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

* [PATCH 2/7] git-ls-remote(1): document --upload-pack
  2006-08-25  0:56   ` [PATCH 1/7] git-apply(1): document missing options and improve existing ones Jonas Fonseca
@ 2006-08-25  0:58     ` Jonas Fonseca
  2006-08-25  1:01       ` [PATCH 3/7] git-blame(1): mention options in the synopsis and advertise pickaxe Jonas Fonseca
  0 siblings, 1 reply; 9+ messages in thread
From: Jonas Fonseca @ 2006-08-25  0:58 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git

... and mention that '.' will list the local repo references.

Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
---
 Documentation/git-ls-remote.txt |   18 ++++++++++++++----
 1 files changed, 14 insertions(+), 4 deletions(-)

diff --git a/Documentation/git-ls-remote.txt b/Documentation/git-ls-remote.txt
index ae4c1a2..c8a4c5a 100644
--- a/Documentation/git-ls-remote.txt
+++ b/Documentation/git-ls-remote.txt
@@ -3,16 +3,19 @@ git-ls-remote(1)
 
 NAME
 ----
-git-ls-remote - Look at references other repository has
+git-ls-remote - List references in a remote repository
 
 
 SYNOPSIS
 --------
-'git-ls-remote' [--heads] [--tags] <repository> <refs>...
+[verse]
+'git-ls-remote' [--heads] [--tags]  [-u <exec> | --upload-pack <exec>]
+	      <repository> <refs>...
 
 DESCRIPTION
 -----------
-Displays the references other repository has.
+Displays references available in a remote repository along with the associated
+commit IDs.
 
 
 OPTIONS
@@ -23,9 +26,16 @@ OPTIONS
 	both, references stored in refs/heads and refs/tags are
 	displayed.
 
+-u <exec>, --upload-pack=<exec>::
+	Specify the full path of gitlink:git-upload-pack[1] on the remote
+	host. This allows listing references from repositories accessed via
+	SSH and where the SSH deamon does not use the PATH configured by the
+	user. Also see the '--exec' option for gitlink:git-peek-remote[1].
+
 <repository>::
 	Location of the repository.  The shorthand defined in
-	$GIT_DIR/branches/ can be used.
+	$GIT_DIR/branches/ can be used. Use "." (dot) to list references in
+	the local repository.
 
 <refs>...::
 	When unspecified, all references, after filtering done
-- 
1.4.2.GIT

-- 
Jonas Fonseca

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

* [PATCH 3/7] git-blame(1): mention options in the synopsis and advertise pickaxe
  2006-08-25  0:58     ` [PATCH 2/7] git-ls-remote(1): document --upload-pack Jonas Fonseca
@ 2006-08-25  1:01       ` Jonas Fonseca
  2006-08-25  1:04         ` [PATCH 4/7] gitk(1): expand the manpage to look less like a template Jonas Fonseca
  0 siblings, 1 reply; 9+ messages in thread
From: Jonas Fonseca @ 2006-08-25  1:01 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git

Inspired by the cvs annotate documentation improve and expand the man page
to also mention the limitations of file annotations. Since people coming
from the SVN/CVS world might first look here, also briefly advertise how
the pickaxe interface makes it easy to go beyond these limitation.

Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
---
 Documentation/git-blame.txt |   29 +++++++++++++++++++++++------
 1 files changed, 23 insertions(+), 6 deletions(-)

The advertising might be a bit too much, as in not belonging there.

diff --git a/Documentation/git-blame.txt b/Documentation/git-blame.txt
index bfed945..e1f8944 100644
--- a/Documentation/git-blame.txt
+++ b/Documentation/git-blame.txt
@@ -3,21 +3,38 @@ git-blame(1)
 
 NAME
 ----
-git-blame - Blame file lines on commits
+git-blame - Show what revision and author last modified each line of a file
 
 SYNOPSIS
 --------
-git-blame file [options] file [revision]
+'git-blame' [-c] [-l] [-t] [-S <revs-file>] [--] <file> [<rev>]
 
 DESCRIPTION
 -----------
-Annotates each line in the given file with information from the commit
-which introduced the line. Start annotation from the given revision.
+
+Annotates each line in the given file with information from the revision which
+last modified the line. Optionally, start annotating from the given revision.
+
+This report doesn't tell you anything about lines which have been deleted or
+replaced; you need to use a tool such as gitlink:git-diff[1] or the "pickaxe"
+interface briefly mentioned in the following paragraph.
+
+Apart from supporting file annotation, git also supports searching the
+development history for when a code snippet occured in a change. This makes it
+possible to track when a code snippet was added to a file, moved or copied
+between files, and eventually deleted or replaced. It works by searching for
+a text string in the diff. A small example:
+
+-----------------------------------------------------------------------------
+$ git log --pretty=oneline -S'blame_usage'
+5040f17eba15504bad66b14a645bddd9b015ebb7 blame -S <ancestry-file>
+ea4c7f9bf69e781dd0cd88d2bccb2bf5cc15c9a7 git-blame: Make the output
+-----------------------------------------------------------------------------
 
 OPTIONS
 -------
 -c, --compatibility::
-	Use the same output mode as git-annotate (Default: off).
+	Use the same output mode as gitlink:git-annotate[1] (Default: off).
 
 -l, --long::
 	Show long rev (Default: off).
@@ -26,7 +43,7 @@ OPTIONS
 	Show raw timestamp (Default: off).
 
 -S, --rev-file <revs-file>::
-	Use revs from revs-file instead of calling git-rev-list.
+	Use revs from revs-file instead of calling gitlink:git-rev-list[1].
 
 -h, --help::
 	Show help message.
-- 
1.4.2.GIT


-- 
Jonas Fonseca

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

* [PATCH 4/7] gitk(1): expand the manpage to look less like a template
  2006-08-25  1:01       ` [PATCH 3/7] git-blame(1): mention options in the synopsis and advertise pickaxe Jonas Fonseca
@ 2006-08-25  1:04         ` Jonas Fonseca
  2006-08-25  1:05           ` [PATCH 5/7] git(7): put the synopsis in a verse style paragraph Jonas Fonseca
  0 siblings, 1 reply; 9+ messages in thread
From: Jonas Fonseca @ 2006-08-25  1:04 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git

Add a short description and document a few selected options additionally to
the different "entities" in the standard calling convention. Advertise
other git repository browsers. Lastly, climb Mount Ego.

Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
---
 Documentation/gitk.txt |   60 ++++++++++++++++++++++++++++++++++++++++--------
 1 files changed, 50 insertions(+), 10 deletions(-)

diff --git a/Documentation/gitk.txt b/Documentation/gitk.txt
index cb482bf..23be005 100644
--- a/Documentation/gitk.txt
+++ b/Documentation/gitk.txt
@@ -3,26 +3,52 @@ gitk(1)
 
 NAME
 ----
-gitk - Some git command not yet documented.
-
+gitk - git repository browser
 
 SYNOPSIS
 --------
-'gitk' [ --option ] <args>...
+'gitk' [<option>...] [<revs>] [--] [<path>...]
 
 DESCRIPTION
 -----------
-Does something not yet documented.
+Displays changes in a repository or a selected set of commits. This includes
+visualizing the commit graph, showing information related to each commit, and
+the files in the trees of each revision.
 
+Historically, gitk was the first repository browser. It's written in tcl/tk
+and started off in a separate repository but was later merged into the main
+git repository.
 
 OPTIONS
 -------
---option::
-	Some option not yet documented.
+To control which revisions to shown, the command takes options applicable to
+the gitlink:git-rev-list[1] command. This manual page describes only the most
+frequently used options.
+
+-n <number>, --max-count=<number>::
+
+	Limits the number of commits to show.
+
+--since=<date>::
+
+	Show commits more recent than a specific date.
+
+--until=<date>::
+
+	Show commits older than a specific date.
 
-<args>...::
-	Some argument not yet documented.
+<revs>::
 
+	Limit the revisions to show. This can be either a single revision
+	meaning show from the given revision and back, or it can be a range in
+	the form "'<from>'..'<to>'" to show all revisions between '<from>' and
+	back to '<to>'. Note, more advanced revision selection can be applied.
+
+<path>::
+
+	Limit commits to the ones touching files in the given paths. Note, to
+	avoid ambiguity wrt. revision names use "--" to separate the paths
+	from any preceeding options.
 
 Examples
 --------
@@ -37,13 +63,27 @@ gitk --since="2 weeks ago" \-- gitk::
 	The "--" is necessary to avoid confusion with the *branch* named
 	'gitk'
 
+See Also
+--------
+'qgit(1)'::
+	A repository browser written in C++ using Qt.
+
+'gitview(1)'::
+	A repository browser written in Python using Gtk. It's based on
+	'bzrk(1)' and distributed in the contrib area of the git repository.
+
+'tig(1)'::
+	A minimal repository browser and git tool output highlighter written
+	in C using Ncurses.
+
 Author
 ------
-Written by Paul Mackerras <paulus@samba.org>
+Written by Paul Mackerras <paulus@samba.org>.
 
 Documentation
 --------------
-Documentation by Junio C Hamano and the git-list <git@vger.kernel.org>.
+Documentation by Junio C Hamano, Jonas Fonseca, and the git-list
+<git@vger.kernel.org>.
 
 GIT
 ---
-- 
1.4.2.GIT


-- 
Jonas Fonseca

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

* [PATCH 5/7] git(7): put the synopsis in a verse style paragraph
  2006-08-25  1:04         ` [PATCH 4/7] gitk(1): expand the manpage to look less like a template Jonas Fonseca
@ 2006-08-25  1:05           ` Jonas Fonseca
  2006-08-25  1:06             ` [PATCH 6/7] gitview.txt: improve asciidoc markup Jonas Fonseca
  0 siblings, 1 reply; 9+ messages in thread
From: Jonas Fonseca @ 2006-08-25  1:05 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git

... so it wraps properly in small terminals.

Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
---
 Documentation/git.txt |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/Documentation/git.txt b/Documentation/git.txt
index 3de5fa9..a9c87e3 100644
--- a/Documentation/git.txt
+++ b/Documentation/git.txt
@@ -8,8 +8,9 @@ git - the stupid content tracker
 
 SYNOPSIS
 --------
+[verse]
 'git' [--version] [--exec-path[=GIT_EXEC_PATH]] [-p|--paginate]
-	[--bare] [--git-dir=GIT_DIR] [--help] COMMAND [ARGS]
+    [--bare] [--git-dir=GIT_DIR] [--help] COMMAND [ARGS]
 
 DESCRIPTION
 -----------
-- 
1.4.2.GIT

-- 
Jonas Fonseca

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

* [PATCH 6/7] gitview.txt: improve asciidoc markup
  2006-08-25  1:05           ` [PATCH 5/7] git(7): put the synopsis in a verse style paragraph Jonas Fonseca
@ 2006-08-25  1:06             ` Jonas Fonseca
  2006-08-25  1:07               ` [PATCH 7/7] git-svn(1): " Jonas Fonseca
  0 siblings, 1 reply; 9+ messages in thread
From: Jonas Fonseca @ 2006-08-25  1:06 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git

Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
---
 contrib/gitview/gitview.txt |   56 +++++++++++++++++++++++++------------------
 1 files changed, 33 insertions(+), 23 deletions(-)

diff --git a/contrib/gitview/gitview.txt b/contrib/gitview/gitview.txt
index 6924df2..77c29de 100644
--- a/contrib/gitview/gitview.txt
+++ b/contrib/gitview/gitview.txt
@@ -7,40 +7,50 @@ gitview - A GTK based repository browser
 
 SYNOPSIS
 --------
-'gitview'  [options] [args]
+'gitview' [options] [args]
 
 DESCRIPTION
 ---------
 
-Dependencies
+Dependencies:
 
 * Python 2.4
 * PyGTK 2.8 or later
 * PyCairo 1.0 or later
 
 OPTIONS
-------
-	--without-diff
-		If the user doesn't want to list the commit diffs in the main window. This may speed up the repository browsing.
-
-	<args>
-		All the valid option for git-rev-list(1)
-	Key Bindings:
-	F4:
-		To maximize the window
-	F5:
-		To reread references.
-	F11:
-		Full screen
-	F12:
-		Leave full screen
+-------
+--without-diff::
+
+	If the user doesn't want to list the commit diffs in the main window.
+	This may speed up the repository browsing.
+
+<args>::
+
+	All the valid option for gitlink:git-rev-list[1].
+
+Key Bindings
+------------
+F4::
+	To maximize the window
+
+F5::
+	To reread references.
+
+F11::
+	Full screen
+
+F12::
+	Leave full screen
 
 EXAMPLES
-------
-	gitview v2.6.12.. include/scsi drivers/scsi
-	  Show as the changes since version v2.6.12 that changed any file in the include/scsi
-	  or drivers/scsi subdirectories
+--------
+
+gitview v2.6.12.. include/scsi drivers/scsi::
+
+	Show as the changes since version v2.6.12 that changed any file in the
+	include/scsi or drivers/scsi subdirectories
 
-	gitview --since=2.weeks.ago
-	  Show the changes during the last two weeks
+gitview --since=2.weeks.ago::
 
+	Show the changes during the last two weeks
-- 
1.4.2.GIT

-- 
Jonas Fonseca

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

* [PATCH 7/7] git-svn(1): improve asciidoc markup
  2006-08-25  1:06             ` [PATCH 6/7] gitview.txt: improve asciidoc markup Jonas Fonseca
@ 2006-08-25  1:07               ` Jonas Fonseca
  0 siblings, 0 replies; 9+ messages in thread
From: Jonas Fonseca @ 2006-08-25  1:07 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git

Use list continuation to have better wrapping. This accounts for most of
the changes because it reindents a lot of text without applying other
changes.

Use cross-referencing for interlinking and the gitlink macro for pointing
to other tools in the git suite.

Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
---
 Documentation/git-svn.txt |  199 ++++++++++++++++++++++++++-------------------
 1 files changed, 114 insertions(+), 85 deletions(-)

diff --git a/Documentation/git-svn.txt b/Documentation/git-svn.txt
index 7d86809..f21aced 100644
--- a/Documentation/git-svn.txt
+++ b/Documentation/git-svn.txt
@@ -12,10 +12,8 @@ SYNOPSIS
 DESCRIPTION
 -----------
 git-svn is a simple conduit for changesets between a single Subversion
-branch and git.
-
-git-svn is not to be confused with git-svnimport.  The were designed
-with very different goals in mind.
+branch and git. It is not to be confused with gitlink:git-svnimport[1].
+They were designed with very different goals in mind.
 
 git-svn is designed for an individual developer who wants a
 bidirectional flow of changesets between a single branch in Subversion
@@ -34,26 +32,29 @@ git-svnimport is designed for.
 
 COMMANDS
 --------
-init::
+--
+
+'init'::
 	Creates an empty git repository with additional metadata
 	directories for git-svn.  The Subversion URL must be specified
 	as a command-line argument.
 
-fetch::
-	Fetch unfetched revisions from the Subversion URL we are
-	tracking.  refs/remotes/git-svn will be updated to the
-	latest revision.
+'fetch'::
 
-	Note: You should never attempt to modify the remotes/git-svn
-	branch outside of git-svn.  Instead, create a branch from
-	remotes/git-svn and work on that branch.  Use the 'commit'
-	command (see below) to write git commits back to
-	remotes/git-svn.
+Fetch unfetched revisions from the Subversion URL we are
+tracking.  refs/remotes/git-svn will be updated to the
+latest revision.
 
-	See 'Additional Fetch Arguments' if you are interested in
-	manually joining branches on commit.
+Note: You should never attempt to modify the remotes/git-svn
+branch outside of git-svn.  Instead, create a branch from
+remotes/git-svn and work on that branch.  Use the 'commit'
+command (see below) to write git commits back to
+remotes/git-svn.
 
-commit::
+See '<<fetch-args,Additional Fetch Arguments>>' if you are interested in
+manually joining branches on commit.
+
+'commit'::
 	Commit specified commit or tree objects to SVN.  This relies on
 	your imported fetch data being up-to-date.  This makes
 	absolutely no attempts to do patching when committing to SVN, it
@@ -61,9 +62,9 @@ commit::
 	commit.  All merging is assumed to have taken place
 	independently of git-svn functions.
 
-rebuild::
+'rebuild'::
 	Not a part of daily usage, but this is a useful command if
-	you've just cloned a repository (using git-clone) that was
+	you've just cloned a repository (using gitlink:git-clone[1]) that was
 	tracked with git-svn.  Unfortunately, git-clone does not clone
 	git-svn metadata and the svn working tree that git-svn uses for
 	its operations.  This rebuilds the metadata so git-svn can
@@ -71,130 +72,152 @@ rebuild::
 	specified at the command-line if the directory/repository you're
 	tracking has moved or changed protocols.
 
-show-ignore::
+'show-ignore'::
 	Recursively finds and lists the svn:ignore property on
 	directories.  The output is suitable for appending to
 	the $GIT_DIR/info/exclude file.
 
+--
+
 OPTIONS
 -------
+--
+
 -r <ARG>::
 --revision <ARG>::
-	Only used with the 'fetch' command.
 
-	Takes any valid -r<argument> svn would accept and passes it
-	directly to svn. -r<ARG1>:<ARG2> ranges and "{" DATE "}" syntax
-	is also supported.  This is passed directly to svn, see svn
-	documentation for more details.
+Only used with the 'fetch' command.
 
-	This can allow you to make partial mirrors when running fetch.
+Takes any valid -r<argument> svn would accept and passes it
+directly to svn. -r<ARG1>:<ARG2> ranges and "{" DATE "}" syntax
+is also supported.  This is passed directly to svn, see svn
+documentation for more details.
+				
+This can allow you to make partial mirrors when running fetch.
 
 -::
 --stdin::
-	Only used with the 'commit' command.
 
-	Read a list of commits from stdin and commit them in reverse
-	order.  Only the leading sha1 is read from each line, so
-	git-rev-list --pretty=oneline output can be used.
+Only used with the 'commit' command.
+
+Read a list of commits from stdin and commit them in reverse
+order.  Only the leading sha1 is read from each line, so
+git-rev-list --pretty=oneline output can be used.
 
 --rmdir::
-	Only used with the 'commit' command.
 
-	Remove directories from the SVN tree if there are no files left
-	behind.  SVN can version empty directories, and they are not
-	removed by default if there are no files left in them.  git
-	cannot version empty directories.  Enabling this flag will make
-	the commit to SVN act like git.
+Only used with the 'commit' command.
 
-	repo-config key: svn.rmdir
+Remove directories from the SVN tree if there are no files left
+behind.  SVN can version empty directories, and they are not
+removed by default if there are no files left in them.  git
+cannot version empty directories.  Enabling this flag will make
+the commit to SVN act like git.
+
+repo-config key: svn.rmdir
 
 -e::
 --edit::
-	Only used with the 'commit' command.
 
-	Edit the commit message before committing to SVN.  This is off by
-	default for objects that are commits, and forced on when committing
-	tree objects.
+Only used with the 'commit' command.
+
+Edit the commit message before committing to SVN.  This is off by
+default for objects that are commits, and forced on when committing
+tree objects.
 
-	repo-config key: svn.edit
+repo-config key: svn.edit
 
 -l<num>::
 --find-copies-harder::
-	Both of these are only used with the 'commit' command.
 
-	They are both passed directly to git-diff-tree see
-	git-diff-tree(1) for more information.
+Both of these are only used with the 'commit' command.
 
-	repo-config key: svn.l
-	repo-config key: svn.findcopiesharder
+They are both passed directly to git-diff-tree see
+gitlink:git-diff-tree[1] for more information.
+
+[verse]
+repo-config key: svn.l 
+repo-config key: svn.findcopiesharder
 
 -A<filename>::
 --authors-file=<filename>::
 
-	Syntax is compatible with the files used by git-svnimport and
-	git-cvsimport:
+Syntax is compatible with the files used by git-svnimport and
+git-cvsimport:
 
 ------------------------------------------------------------------------
-loginname = Joe User <user@example.com>
+	loginname = Joe User <user@example.com>
 ------------------------------------------------------------------------
 
-	If this option is specified and git-svn encounters an SVN
-	committer name that does not exist in the authors-file, git-svn
-	will abort operation. The user will then have to add the
-	appropriate entry.  Re-running the previous git-svn command
-	after the authors-file is modified should continue operation.
+If this option is specified and git-svn encounters an SVN
+committer name that does not exist in the authors-file, git-svn
+will abort operation. The user will then have to add the
+appropriate entry.  Re-running the previous git-svn command
+after the authors-file is modified should continue operation.
+
+repo-config key: svn.authors-file
 
-	repo-config key: svn.authors-file
+--
 
 ADVANCED OPTIONS
 ----------------
+--
+
 -b<refname>::
 --branch <refname>::
-	Used with 'fetch' or 'commit'.
+Used with 'fetch' or 'commit'.
 
-	This can be used to join arbitrary git branches to remotes/git-svn
-	on new commits where the tree object is equivalent.
+This can be used to join arbitrary git branches to remotes/git-svn
+on new commits where the tree object is equivalent.
 
-	When used with different GIT_SVN_ID values, tags and branches in
-	SVN can be tracked this way, as can some merges where the heads
-	end up having completely equivalent content.  This can even be
-	used to track branches across multiple SVN _repositories_.
+When used with different GIT_SVN_ID values, tags and branches in
+SVN can be tracked this way, as can some merges where the heads
+end up having completely equivalent content.  This can even be
+used to track branches across multiple SVN _repositories_.
 
-	This option may be specified multiple times, once for each
-	branch.
+This option may be specified multiple times, once for each
+branch.
 
-	repo-config key: svn.branch
+repo-config key: svn.branch
 
 -i<GIT_SVN_ID>::
 --id <GIT_SVN_ID>::
-	This sets GIT_SVN_ID (instead of using the environment).  See
-	the section on "Tracking Multiple Repositories or Branches" for
-	more information on using GIT_SVN_ID.
+
+This sets GIT_SVN_ID (instead of using the environment).  See the
+section on
+'<<tracking-multiple-repos,Tracking Multiple Repositories or Branches>>'
+for more information on using GIT_SVN_ID.
+
+--
 
 COMPATIBILITY OPTIONS
 ---------------------
+--
+
 --upgrade::
-	Only used with the 'rebuild' command.
+Only used with the 'rebuild' command.
 
-	Run this if you used an old version of git-svn that used
-	"git-svn-HEAD" instead of "remotes/git-svn" as the branch
-	for tracking the remote.
+Run this if you used an old version of git-svn that used
+"git-svn-HEAD" instead of "remotes/git-svn" as the branch
+for tracking the remote.
 
 --no-ignore-externals::
-	Only used with the 'fetch' and 'rebuild' command.
+Only used with the 'fetch' and 'rebuild' command.
+
+By default, git-svn passes --ignore-externals to svn to avoid
+fetching svn:external trees into git.  Pass this flag to enable
+externals tracking directly via git.
 
-	By default, git-svn passes --ignore-externals to svn to avoid
-	fetching svn:external trees into git.  Pass this flag to enable
-	externals tracking directly via git.
+Versions of svn that do not support --ignore-externals are
+automatically detected and this flag will be automatically
+enabled for them.
 
-	Versions of svn that do not support --ignore-externals are
-	automatically detected and this flag will be automatically
-	enabled for them.
+Otherwise, do not enable this flag unless you know what you're
+doing.
 
-	Otherwise, do not enable this flag unless you know what you're
-	doing.
+repo-config key: svn.noignoreexternals
 
-	repo-config key: svn.noignoreexternals
+--
 
 Basic Examples
 ~~~~~~~~~~~~~~
@@ -226,6 +249,7 @@ any automated merge/branch tracking on t
 entirely up to the user on the git side.  It's simply not worth it to do
 a useful translation when the original signal is weak.
 
+[[tracking-multiple-repos]]
 TRACKING MULTIPLE REPOSITORIES OR BRANCHES
 ------------------------------------------
 This is for advanced users, most users should ignore this section.
@@ -241,6 +265,7 @@ invocation.  The interface branch will b
 remotes/git-svn.  Any remotes/$GIT_SVN_ID branch should never be modified
 by the user outside of git-svn commands.
 
+[[fetch-args]]
 ADDITIONAL FETCH ARGUMENTS
 --------------------------
 This is for advanced users, most users should ignore this section.
@@ -251,11 +276,15 @@ optionally be specified in the form of s
 command-line.  Unfetched SVN revisions may also be tied to particular
 git commits with the following syntax:
 
+------------------------------------------------
 	svn_revision_number=git_commit_sha1
+------------------------------------------------
 
-This allows you to tie unfetched SVN revision 375 to your current HEAD::
+This allows you to tie unfetched SVN revision 375 to your current HEAD:
 
-	`git-svn fetch 375=$(git-rev-parse HEAD)`
+------------------------------------------------
+	git-svn fetch 375=$(git-rev-parse HEAD)
+------------------------------------------------
 
 Advanced Example: Tracking a Reorganized Repository
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- 
1.4.2.GIT

-- 
Jonas Fonseca

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

end of thread, other threads:[~2006-08-25  1:07 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-08-18  8:45 [PATCH] git-apply: document remaining options in the man page Jonas Fonseca
2006-08-18  9:43 ` Junio C Hamano
2006-08-25  0:56   ` [PATCH 1/7] git-apply(1): document missing options and improve existing ones Jonas Fonseca
2006-08-25  0:58     ` [PATCH 2/7] git-ls-remote(1): document --upload-pack Jonas Fonseca
2006-08-25  1:01       ` [PATCH 3/7] git-blame(1): mention options in the synopsis and advertise pickaxe Jonas Fonseca
2006-08-25  1:04         ` [PATCH 4/7] gitk(1): expand the manpage to look less like a template Jonas Fonseca
2006-08-25  1:05           ` [PATCH 5/7] git(7): put the synopsis in a verse style paragraph Jonas Fonseca
2006-08-25  1:06             ` [PATCH 6/7] gitview.txt: improve asciidoc markup Jonas Fonseca
2006-08-25  1:07               ` [PATCH 7/7] git-svn(1): " Jonas Fonseca

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).