* [PATCH] git-commit: document --append
@ 2006-04-05 19:16 Marco Roeland
2006-04-05 19:34 ` Junio C Hamano
0 siblings, 1 reply; 5+ messages in thread
From: Marco Roeland @ 2006-04-05 19:16 UTC (permalink / raw)
To: git
The "--amend" option is used to amend the tip of the current branch. This
documentation text was copied straight from the commit that implemented it.
Signed-off-by: Marco Roeland <marco.roeland@xs4all.nl>
---
Documentation/git-commit.txt | 22 +++++++++++++++++++++-
1 files changed, 21 insertions(+), 1 deletions(-)
ca7d3b4fdd0cb24b7353da312fb9306531468f54
diff --git a/Documentation/git-commit.txt b/Documentation/git-commit.txt
index d04b342..3701cb3 100644
--- a/Documentation/git-commit.txt
+++ b/Documentation/git-commit.txt
@@ -9,7 +9,8 @@ SYNOPSIS
--------
[verse]
'git-commit' [-a] [-s] [-v] [(-c | -C) <commit> | -F <file> | -m <msg>]
- [-e] [--author <author>] [--] [[-i | -o ]<file>...]
+ [--no-verify] [--amend] [-e] [--author <author>]
+ [--] [[-i | -o ]<file>...]
DESCRIPTION
-----------
@@ -70,6 +71,25 @@ OPTIONS
`-m`, and from file with `-C` are usually used as the
commit log message unmodified. This option lets you
further edit the message taken from these sources.
+
+--amend::
+
+ Used to amend the tip of the current branch. Prepare the tree
+ object you would want to replace the latest commit as usual
+ (this includes the usual -i/-o and explicit paths), and the
+ commit log editor is seeded with the commit message from the
+ tip of the current branch. The commit you create replaces the
+ current tip -- if it was a merge, it will have the parents of
+ the current tip as parents -- so the current top commit is
+ discarded.
+
+ It is a rough equivalent for:
+
+ $ git reset --soft HEAD^
+ $ ... do something else to come up with the right tree ...
+ $ git commit -c ORIG_HEAD
+
+ but can be used to amend a merge commit.
-i|--include::
Instead of committing only the files specified on the
--
1.3.0.rc2.gca38
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] git-commit: document --append
2006-04-05 19:16 [PATCH] git-commit: document --append Marco Roeland
@ 2006-04-05 19:34 ` Junio C Hamano
2006-04-05 19:46 ` [PATCH] git-commit: document --append (amend really!) Marco Roeland
0 siblings, 1 reply; 5+ messages in thread
From: Junio C Hamano @ 2006-04-05 19:34 UTC (permalink / raw)
To: Marco Roeland; +Cc: git
Thanks for resurrecting this.
I suspect that some formatting tweak is needed; I recall
asciidoc needs some special formatting when multi- paragraph
description is involved in the list.
Of course, munging the patch title with s/append/amend/ would
not hurt ;-).
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] git-commit: document --append (amend really!)
2006-04-05 19:34 ` Junio C Hamano
@ 2006-04-05 19:46 ` Marco Roeland
2006-04-05 19:55 ` Junio C Hamano
0 siblings, 1 reply; 5+ messages in thread
From: Marco Roeland @ 2006-04-05 19:46 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Marco Roeland, git
On Wednesday April 5th 2006 Junio C Hamano wrote:
> Thanks for resurrecting this.
>
> I suspect that some formatting tweak is needed; I recall
> asciidoc needs some special formatting when multi- paragraph
> description is involved in the list.
Here with asciidoc 7.1.2 (Debian 'sid') it looks good in the generated
man page. But I'll investigate if nobody beats me to it. Perhaps we
should develop a "sparse" like module for asciidoc.
> Of course, munging the patch title with s/append/amend/ would
> not hurt ;-).
Oops. Well I suppose I could use "git commit --amend" and then run "git
format-patch" again I suppose. ;-)
--
Marco Roeland
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] git-commit: document --append (amend really!)
2006-04-05 19:46 ` [PATCH] git-commit: document --append (amend really!) Marco Roeland
@ 2006-04-05 19:55 ` Junio C Hamano
2006-04-05 20:28 ` [PATCH] git-commit: document --amend Marco Roeland
0 siblings, 1 reply; 5+ messages in thread
From: Junio C Hamano @ 2006-04-05 19:55 UTC (permalink / raw)
To: Marco Roeland; +Cc: git
Marco Roeland <marco.roeland@xs4all.nl> writes:
> Here with asciidoc 7.1.2 (Debian 'sid') it looks good in the generated
> man page. But I'll investigate if nobody beats me to it.
Please see below for an example.
> Oops. Well I suppose I could use "git commit --amend" and then run "git
> format-patch" again I suppose. ;-)
Yup ;-).
diff-tree b0d08a504bee17dfc46f761e166ff2c20c59a91a (from 3103cf9e1e09b0045a60542f24a2a1e4ed7b1237)
Author: Francis Daly <francis@daoine.org>
Date: Wed Mar 22 09:53:57 2006 +0000
Format tweaks for asciidoc.
Some documentation "options" were followed by independent preformatted
paragraphs. Now they are associated plain text paragraphs. The
difference is clear in the generated html.
Signed-off-by: Junio C Hamano <junkio@cox.net>
diff --git a/Documentation/git-grep.txt b/Documentation/git-grep.txt
index fbd2394..d55456a 100644
--- a/Documentation/git-grep.txt
+++ b/Documentation/git-grep.txt
@@ -24,13 +24,13 @@ OPTIONS
<option>...::
Either an option to pass to `grep` or `git-ls-files`.
-
- The following are the specific `git-ls-files` options
- that may be given: `-o`, `--cached`, `--deleted`, `--others`,
- `--killed`, `--ignored`, `--modified`, `--exclude=*`,
- `--exclude-from=*`, and `--exclude-per-directory=*`.
-
- All other options will be passed to `grep`.
++
+The following are the specific `git-ls-files` options
+that may be given: `-o`, `--cached`, `--deleted`, `--others`,
+`--killed`, `--ignored`, `--modified`, `--exclude=\*`,
+`--exclude-from=\*`, and `--exclude-per-directory=\*`.
++
+All other options will be passed to `grep`.
<pattern>::
The pattern to look for. The first non option is taken
^ permalink raw reply related [flat|nested] 5+ messages in thread* [PATCH] git-commit: document --amend
2006-04-05 19:55 ` Junio C Hamano
@ 2006-04-05 20:28 ` Marco Roeland
0 siblings, 0 replies; 5+ messages in thread
From: Marco Roeland @ 2006-04-05 20:28 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Marco Roeland, git
The "--amend" option is used to amend the tip of the current branch. This
documentation text was copied straight from the commit that implemented it.
Some minor format tweaks for asciidoc were taken from work by Francis Daly
in commit b0d08a5.. It looks good now also in the html page.
Signed-off-by: Marco Roeland <marco.roeland@xs4all.nl>
---
Documentation/git-commit.txt | 24 +++++++++++++++++++++++-
1 files changed, 23 insertions(+), 1 deletions(-)
293dccf6f8c47294a42376ad96d8c1130b06c9b9
diff --git a/Documentation/git-commit.txt b/Documentation/git-commit.txt
index d04b342..ec8b562 100644
--- a/Documentation/git-commit.txt
+++ b/Documentation/git-commit.txt
@@ -9,7 +9,8 @@ SYNOPSIS
--------
[verse]
'git-commit' [-a] [-s] [-v] [(-c | -C) <commit> | -F <file> | -m <msg>]
- [-e] [--author <author>] [--] [[-i | -o ]<file>...]
+ [--no-verify] [--amend] [-e] [--author <author>]
+ [--] [[-i | -o ]<file>...]
DESCRIPTION
-----------
@@ -70,6 +71,27 @@ OPTIONS
`-m`, and from file with `-C` are usually used as the
commit log message unmodified. This option lets you
further edit the message taken from these sources.
+
+--amend::
+
+ Used to amend the tip of the current branch. Prepare the tree
+ object you would want to replace the latest commit as usual
+ (this includes the usual -i/-o and explicit paths), and the
+ commit log editor is seeded with the commit message from the
+ tip of the current branch. The commit you create replaces the
+ current tip -- if it was a merge, it will have the parents of
+ the current tip as parents -- so the current top commit is
+ discarded.
++
+It is a rough equivalent for:
++
+$ git reset --soft HEAD^
++
+$ ... do something else to come up with the right tree ...
++
+$ git commit -c ORIG_HEAD
++
+but can be used to amend a merge commit.
-i|--include::
Instead of committing only the files specified on the
--
1.3.0.rc2.gca38
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2006-04-05 20:28 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-04-05 19:16 [PATCH] git-commit: document --append Marco Roeland
2006-04-05 19:34 ` Junio C Hamano
2006-04-05 19:46 ` [PATCH] git-commit: document --append (amend really!) Marco Roeland
2006-04-05 19:55 ` Junio C Hamano
2006-04-05 20:28 ` [PATCH] git-commit: document --amend Marco Roeland
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox