Merge branch 'maint'

* maint:
  filter-branch: make the usage string fit on 80 chars terminals.
  filter-branch: add an example how to add ACKs to a range of commits
  docs: describe impact of repack on "clone -s"
This commit is contained in:
Junio C Hamano 2009-08-18 14:40:10 -07:00
commit 3f189d0ffc
3 changed files with 26 additions and 8 deletions

View File

@ -72,8 +72,16 @@ These objects may be removed by normal git operations (such as 'git-commit')
which automatically call `git gc --auto`. (See linkgit:git-gc[1].) which automatically call `git gc --auto`. (See linkgit:git-gc[1].)
If these objects are removed and were referenced by the cloned repository, If these objects are removed and were referenced by the cloned repository,
then the cloned repository will become corrupt. then the cloned repository will become corrupt.
+
Note that running `git repack` without the `-l` option in a repository
cloned with `-s` will copy objects from the source repository into a pack
in the cloned repository, removing the disk space savings of `clone -s`.
It is safe, however, to run `git gc`, which uses the `-l` option by
default.
+
If you want to break the dependency of a repository cloned with `-s` on
its source repository, you can simply run `git repack -a` to copy all
objects from the source repository into a pack in the cloned repository.
--reference <repository>:: --reference <repository>::
If the reference repository is on the local machine If the reference repository is on the local machine

View File

@ -305,6 +305,16 @@ range in addition to the new branch name. The new branch name will
point to the top-most revision that a 'git-rev-list' of this range point to the top-most revision that a 'git-rev-list' of this range
will print. will print.
If you need to add 'Acked-by' lines to, say, the last 10 commits (none
of which is a merge), use this command:
--------------------------------------------------------
git filter-branch --msg-filter '
cat &&
echo "Acked-by: Bugs Bunny <bunny@bugzilla.org>"
' HEAD~10..HEAD
--------------------------------------------------------
*NOTE* the changes introduced by the commits, and which are not reverted *NOTE* the changes introduced by the commits, and which are not reverted
by subsequent commits, will still be in the rewritten branch. If you want by subsequent commits, will still be in the rewritten branch. If you want
to throw out _changes_ together with the commits, you should use the to throw out _changes_ together with the commits, you should use the

View File

@ -97,12 +97,12 @@ set_ident () {
echo "case \"\$GIT_${uid}_NAME\" in \"\") GIT_${uid}_NAME=\"\${GIT_${uid}_EMAIL%%@*}\" && export GIT_${uid}_NAME;; esac" echo "case \"\$GIT_${uid}_NAME\" in \"\") GIT_${uid}_NAME=\"\${GIT_${uid}_EMAIL%%@*}\" && export GIT_${uid}_NAME;; esac"
} }
USAGE="[--env-filter <command>] [--tree-filter <command>] \ USAGE="[--env-filter <command>] [--tree-filter <command>]
[--index-filter <command>] [--parent-filter <command>] \ [--index-filter <command>] [--parent-filter <command>]
[--msg-filter <command>] [--commit-filter <command>] \ [--msg-filter <command>] [--commit-filter <command>]
[--tag-name-filter <command>] [--subdirectory-filter <directory>] \ [--tag-name-filter <command>] [--subdirectory-filter <directory>]
[--original <namespace>] [-d <directory>] [-f | --force] \ [--original <namespace>] [-d <directory>] [-f | --force]
[<rev-list options>...]" [<rev-list options>...]"
OPTIONS_SPEC= OPTIONS_SPEC=
. git-sh-setup . git-sh-setup