diff options
author | Pierre Habouzit <madcoder@debian.org> | 2008-10-31 10:12:21 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2009-01-10 17:35:58 -0800 |
commit | d3240d935c4b844db71e4570eeedfac4cff73f78 (patch) | |
tree | c6ad63efa78ac0133564147be4958280c70b3bc8 /Documentation | |
parent | c123b7c5fb596d93cd015645212c379fc3c381d5 (diff) | |
download | git-d3240d935c4b844db71e4570eeedfac4cff73f78.tar.gz git-d3240d935c4b844db71e4570eeedfac4cff73f78.tar.xz |
filter-branch: add git_commit_non_empty_tree and --prune-empty.
git_commit_non_empty_tree is added to the functions that can be run from
commit filters. Its effect is to commit only commits actually touching the
tree and that are not merge points either.
The option --prune-empty is added. It defaults the commit-filter to
'git_commit_non_empty_tree "$@"', and can be used with any other
combination of filters, except --commit-hook that must used
'git_commit_non_empty_tree "$@"' where one puts 'git commit-tree "$@"'
usually to achieve the same result.
Signed-off-by: Pierre Habouzit <madcoder@debian.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/git-filter-branch.txt | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Documentation/git-filter-branch.txt b/Documentation/git-filter-branch.txt index fed6de6a7..451950bab 100644 --- a/Documentation/git-filter-branch.txt +++ b/Documentation/git-filter-branch.txt @@ -122,6 +122,10 @@ You can use the 'map' convenience function in this filter, and other convenience functions, too. For example, calling 'skip_commit "$@"' will leave out the current commit (but not its changes! If you want that, use 'git-rebase' instead). ++ +You can also use the 'git_commit_non_empty_tree "$@"' instead of +'git commit-tree "$@"' if you don't wish to keep commits with a single parent +and that makes no change to the tree. --tag-name-filter <command>:: This is the filter for rewriting tag names. When passed, @@ -151,6 +155,16 @@ to other tags will be rewritten to point to the underlying commit. The result will contain that directory (and only that) as its project root. +--prune-empty:: + Some kind of filters will generate empty commits, that left the tree + untouched. This switch allow git-filter-branch to ignore such + commits. Though, this switch only applies for commits that have one + and only one parent, it will hence keep merges points. Also, this + option is not compatible with the use of '--commit-filter'. Though you + just need to use the function 'git_commit_non_empty_tree "$@"' instead + of the 'git commit-tree "$@"' idiom in your commit filter to make that + happen. + --original <namespace>:: Use this option to set the namespace where the original commits will be stored. The default value is 'refs/original'. |