Skip to content

Commit 3f189d0

Browse files
committed
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"
2 parents 64d5fe0 + 83e355a commit 3f189d0

File tree

3 files changed

+26
-8
lines changed

3 files changed

+26
-8
lines changed

Documentation/git-clone.txt

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,16 @@ These objects may be removed by normal git operations (such as 'git-commit')
7272
which automatically call `git gc --auto`. (See linkgit:git-gc[1].)
7373
If these objects are removed and were referenced by the cloned repository,
7474
then the cloned repository will become corrupt.
75-
76-
75+
+
76+
Note that running `git repack` without the `-l` option in a repository
77+
cloned with `-s` will copy objects from the source repository into a pack
78+
in the cloned repository, removing the disk space savings of `clone -s`.
79+
It is safe, however, to run `git gc`, which uses the `-l` option by
80+
default.
81+
+
82+
If you want to break the dependency of a repository cloned with `-s` on
83+
its source repository, you can simply run `git repack -a` to copy all
84+
objects from the source repository into a pack in the cloned repository.
7785

7886
--reference <repository>::
7987
If the reference repository is on the local machine

Documentation/git-filter-branch.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,16 @@ range in addition to the new branch name. The new branch name will
305305
point to the top-most revision that a 'git-rev-list' of this range
306306
will print.
307307

308+
If you need to add 'Acked-by' lines to, say, the last 10 commits (none
309+
of which is a merge), use this command:
310+
311+
--------------------------------------------------------
312+
git filter-branch --msg-filter '
313+
cat &&
314+
echo "Acked-by: Bugs Bunny <[email protected]>"
315+
' HEAD~10..HEAD
316+
--------------------------------------------------------
317+
308318
*NOTE* the changes introduced by the commits, and which are not reverted
309319
by subsequent commits, will still be in the rewritten branch. If you want
310320
to throw out _changes_ together with the commits, you should use the

git-filter-branch.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -97,12 +97,12 @@ set_ident () {
9797
echo "case \"\$GIT_${uid}_NAME\" in \"\") GIT_${uid}_NAME=\"\${GIT_${uid}_EMAIL%%@*}\" && export GIT_${uid}_NAME;; esac"
9898
}
9999

100-
USAGE="[--env-filter <command>] [--tree-filter <command>] \
101-
[--index-filter <command>] [--parent-filter <command>] \
102-
[--msg-filter <command>] [--commit-filter <command>] \
103-
[--tag-name-filter <command>] [--subdirectory-filter <directory>] \
104-
[--original <namespace>] [-d <directory>] [-f | --force] \
105-
[<rev-list options>...]"
100+
USAGE="[--env-filter <command>] [--tree-filter <command>]
101+
[--index-filter <command>] [--parent-filter <command>]
102+
[--msg-filter <command>] [--commit-filter <command>]
103+
[--tag-name-filter <command>] [--subdirectory-filter <directory>]
104+
[--original <namespace>] [-d <directory>] [-f | --force]
105+
[<rev-list options>...]"
106106

107107
OPTIONS_SPEC=
108108
. git-sh-setup

0 commit comments

Comments
 (0)