From: Junio C Hamano Date: Sun, 12 Apr 2009 23:01:25 +0000 (-0700) Subject: Merge branch 'maint' X-Git-Tag: v1.6.3-rc0~8 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/a54c4edc511608fdba513cc94812c31fd4b497f6?ds=inline;hp=-c Merge branch 'maint' * maint: GIT 1.6.2.3 State the effect of filter-branch on graft explicitly process_{tree,blob}: Remove useless xstrdup calls Conflicts: GIT-VERSION-GEN --- a54c4edc511608fdba513cc94812c31fd4b497f6 diff --combined Documentation/git-filter-branch.txt index 237f85e767,c1193953a1..ab527b5b31 --- a/Documentation/git-filter-branch.txt +++ b/Documentation/git-filter-branch.txt @@@ -31,6 -31,9 +31,9 @@@ changes, which would normally have no e useful in the future for compensating for some git bugs or such, therefore such a usage is permitted. + *NOTE*: This command honors `.git/info/grafts`. If you have any grafts + defined, running this command will make them permanent. + *WARNING*! The rewritten history will have different object names for all the objects and will not converge with the original branch. You will not be able to easily push and distribute the rewritten branch on top of the @@@ -91,9 -94,7 +94,9 @@@ OPTION --index-filter :: This is the filter for rewriting the index. It is similar to the tree filter but does not check out the tree, which makes it much - faster. For hairy cases, see linkgit:git-update-index[1]. + faster. Frequently used with `git rm \--cached + \--ignore-unmatch ...`, see EXAMPLES below. For hairy + cases, see linkgit:git-update-index[1]. --parent-filter :: This is the filter for rewriting the commit's parent list. @@@ -206,18 -207,19 +209,18 @@@ However, if the file is absent from th a simple `rm filename` will fail for that tree and commit. Thus you may instead want to use `rm -f filename` as the script. -A significantly faster version: +Using `\--index-filter` with 'git-rm' yields a significantly faster +version. Like with using `rm filename`, `git rm --cached filename` +will fail if the file is absent from the tree of a commit. If you +want to "completely forget" a file, it does not matter when it entered +history, so we also add `\--ignore-unmatch`: -------------------------------------------------------------------------- -git filter-branch --index-filter 'git rm --cached filename' HEAD +git filter-branch --index-filter 'git rm --cached --ignore-unmatch filename' HEAD -------------------------------------------------------------------------- Now, you will get the rewritten history saved in HEAD. -As with using `rm filename`, `git rm --cached filename` will fail -if the file is absent from the tree of a commit. If it is not important -whether the file is already absent from the tree, you can use -`git rm --cached --ignore-unmatch filename` instead. - To rewrite the repository to look as if `foodir/` had been its project root, and discard all other history: diff --combined builtin-pack-objects.c index 99181fd7ee,6cf5b86e15..e58d300e3f --- a/builtin-pack-objects.c +++ b/builtin-pack-objects.c @@@ -1612,7 -1612,7 +1612,7 @@@ static void ll_find_deltas(struct objec return; } if (progress > pack_to_stdout) - fprintf(stderr, "Delta compression using %d threads.\n", + fprintf(stderr, "Delta compression using up to %d threads.\n", delta_search_threads); /* Partition the work amongst work threads. */ @@@ -1912,6 -1912,8 +1912,8 @@@ static void show_object(struct object_a add_preferred_base_object(p->name); add_object_entry(p->item->sha1, p->item->type, p->name, 0); p->item->flags |= OBJECT_ADDED; + free((char *)p->name); + p->name = NULL; } static void show_edge(struct commit *commit)