From: Thomas Rast <trast@student.ethz.ch>
To: Jan Wielemaker <J.Wielemaker@uva.nl>, git@vger.kernel.org
Cc: gitster@pobox.com, Johannes Schindelin <Johannes.Schindelin@gmx.de>
Subject: [PATCH v2] Documentation: filter-branch: document how to filter all refs
Date: Thu, 7 Aug 2008 16:16:03 +0200 [thread overview]
Message-ID: <1218118563-28579-1-git-send-email-trast@student.ethz.ch> (raw)
In-Reply-To: <1218117841-27398-1-git-send-email-trast@student.ethz.ch>
Document the '--' option that can be used to pass rev-list options
(not just arguments), and give an example usage of '-- --all'. Remove
reference to "the new branch name"; filter-branch takes arbitrary
arguments to rev-list since dfd05e3.
Signed-off-by: Thomas Rast <trast@student.ethz.ch>
---
At second glance, it turned out the documentation was actually older
than the code. So rewrite the documentation of <rev-list options>.
Documentation/git-filter-branch.txt | 21 ++++++++++++++++-----
1 files changed, 16 insertions(+), 5 deletions(-)
diff --git a/Documentation/git-filter-branch.txt b/Documentation/git-filter-branch.txt
index a518ba6..31d3cae 100644
--- a/Documentation/git-filter-branch.txt
+++ b/Documentation/git-filter-branch.txt
@@ -13,7 +13,7 @@ SYNOPSIS
[--msg-filter <command>] [--commit-filter <command>]
[--tag-name-filter <command>] [--subdirectory-filter <directory>]
[--original <namespace>] [-d <directory>] [-f | --force]
- [<rev-list options>...]
+ [--] [<rev-list options>...]
DESCRIPTION
-----------
@@ -168,10 +168,10 @@ to other tags will be rewritten to point to the underlying commit.
'refs/original/', unless forced.
<rev-list options>...::
- When options are given after the new branch name, they will
- be passed to 'git-rev-list'. Only commits in the resulting
- output will be filtered, although the filtered commits can still
- reference parents which are outside of that set.
+ Arguments for 'git-rev-list'. All positive refs included by
+ these options are rewritten. You may also specify options
+ such as '--all', but you must use '--' to separate them from
+ the 'git-filter-branch' options.
Examples
@@ -196,6 +196,17 @@ git filter-branch --index-filter 'git rm --cached filename' HEAD
Now, you will get the rewritten history saved in HEAD.
+To rewrite the repository to look as if 'foodir/' had been its project
+root, and discard all other history:
+
+-------------------------------------------------------
+git filter-branch --subdirectory-filter foodir -- --all
+-------------------------------------------------------
+
+Thus you can, e.g., turn a library subdirectory into a repository of
+its own. Note the '--' that separates 'filter-branch' options from
+revision options, and the '--all' to rewrite all branches and tags.
+
To set a commit (which typically is at the tip of another
history) to be the parent of the current initial commit, in
order to paste the other history behind the current history:
--
1.6.0.rc1.106.g98a7
prev parent reply other threads:[~2008-08-07 14:17 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-06 13:39 git filter-branch --subdirectory-filter, still a mistery Jan Wielemaker
2008-08-07 7:13 ` Jan Wielemaker
2008-08-07 7:50 ` Thomas Rast
2008-08-07 10:14 ` Jan Wielemaker
2008-08-07 23:48 ` Thomas Rast
2008-08-07 23:50 ` [PATCH] filter-branch: be more helpful when an annotated tag changes Thomas Rast
2008-08-08 20:10 ` [TOY PATCH] filter-branch: add option --delete-unchanged Thomas Rast
2008-08-09 0:35 ` Johannes Schindelin
2008-08-11 10:43 ` Jan Wielemaker
2008-09-14 16:29 ` Felipe Contreras
2008-08-07 23:54 ` [RFH] filter-branch: ancestor detection weirdness Thomas Rast
2008-08-08 11:42 ` Johannes Schindelin
2008-08-08 14:14 ` Thomas Rast
2008-08-08 14:16 ` [PATCH] filter-branch: fix ancestor discovery for --subdirectory-filter Thomas Rast
2008-08-08 14:39 ` [RFH] filter-branch: ancestor detection weirdness Johannes Schindelin
2008-08-08 18:37 ` Thomas Rast
2008-08-08 18:39 ` [PATCH v2] filter-branch: fix ref rewriting with --subdirectory-filter Thomas Rast
2008-08-09 0:16 ` [RFH] filter-branch: ancestor detection weirdness Johannes Schindelin
2008-08-09 1:25 ` Junio C Hamano
2008-08-09 9:25 ` Thomas Rast
2008-08-09 9:35 ` Thomas Rast
2008-08-10 14:02 ` [PATCH] filter-branch: use --simplify-merges Thomas Rast
2008-08-12 1:54 ` Junio C Hamano
2008-08-12 2:13 ` Junio C Hamano
2008-08-12 5:47 ` Thomas Rast
2008-08-12 6:59 ` Junio C Hamano
2008-08-12 8:45 ` [PATCH 0/3] filter-branch --subdirectory-filter improvements Thomas Rast
2008-08-12 12:11 ` Jan Wielemaker
2008-08-12 8:45 ` [PATCH 1/3] filter-branch: Extend test to show rewriting bug Thomas Rast
2008-08-12 8:45 ` [PATCH 2/3] filter-branch: fix ref rewriting with --subdirectory-filter Thomas Rast
2008-08-12 8:45 ` [PATCH 3/3] filter-branch: use --simplify-merges Thomas Rast
2008-08-12 8:18 ` [RFH] filter-branch: ancestor detection weirdness Petr Baudis
2008-08-12 18:33 ` Junio C Hamano
2008-08-09 10:00 ` Thomas Rast
2008-08-12 21:33 ` Junio C Hamano
2008-08-12 22:15 ` Thomas Rast
2008-08-08 7:44 ` git filter-branch --subdirectory-filter, still a mistery Jan Wielemaker
2008-08-08 11:25 ` Jan Wielemaker
2008-08-07 14:04 ` [PATCH] Documentation: filter-branch: document how to filter all refs Thomas Rast
2008-08-07 14:16 ` Thomas Rast [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1218118563-28579-1-git-send-email-trast@student.ethz.ch \
--to=trast@student.ethz.ch \
--cc=J.Wielemaker@uva.nl \
--cc=Johannes.Schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).