git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v5 2/2] filter-branch: nearest-ancestor rewriting outside subdir filter

From
Junio C Hamano <gitster@pobox.com>
Date
Nov 11, 2009, 18:22 UTC
Message-ID
<7vocn8q5v2.fsf@alter.siamese.dyndns.org>
In-Reply-To
<4AFA7C1E.1050606@viscovery.net>
Johannes Sixt <j.sixt@viscovery.net> writes:
Show 15 quoted lines
> However, that rewriting strategy is also a useful building block in
> other tasks.  For example, if you want to split out a subset of files
> from your history, you would typically call
>
>   git filter-branch -- <refs> -- <files>
>
> But this fails for all refs that do not point directly to a commit
> that affects <files>, because their referenced commit will not be
> rewritten and the ref remains untouched.
>
> The code was already there for the --subdirectory-filter case, so just
> introduce an option that enables it independently.
>
> Signed-off-by: Thomas Rast <trast@student.ethz.ch>
> Signed-off-by: Johannes Sixt <j6t@kdbg.org>

Up to this point, nothing mentions the name of the new option. Please write your log for a person who needs to write the release notes by looking at "git shortlog" output ;-)

I am wondering if this even needs an option to trigger. Shouldn't you want this behaviour always when you give any pathspec?

What are the sane reasons to leave the rewritten ref to point at the old commit, essentially making the rewritten history unreachable?

Previous: Johannes SixtNext: Thomas Rast
Message 17 of 22 in “filter-branch: stop special-casing $filter_subdir argument”
  1. 1/2 filter-branch: stop special-casing $filter_subdir argumentThomas Rast, Oct 21, 2009
  2. 2/2 filter-branch: nearest-ancestor rewriting outside subdir filterThomas Rast, Oct 21, 2009
  3. 1/2 filter-branch: stop special-casing $filter_subdir argumentThomas Rast, Oct 21, 2009
  4. 2/2 filter-branch: nearest-ancestor rewriting outside subdir filterThomas Rast, Oct 21, 2009
  5. Johannes SixtOct 22, 2009
  6. Thomas RastOct 22, 2009
  7. Johannes SixtOct 22, 2009
  8. 1/2 filter-branch: stop special-casing $filter_subdir argumentThomas Rast, Oct 28, 2009
  9. 2/2 filter-branch: nearest-ancestor rewriting outside subdir filterThomas Rast, Oct 28, 2009
  10. Johannes SixtOct 29, 2009
  11. Johannes SixtOct 29, 2009
  12. 1/2 filter-branch: stop special-casing $filter_subdir argumentThomas Rast, Nov 10, 2009
  13. 2/2 filter-branch: nearest-ancestor rewriting outside subdir filterThomas Rast, Nov 10, 2009
  14. Johannes SixtNov 11, 2009
  15. 1/2 filter-branch: stop special-casing $filter_subdir argumentJohannes Sixt, Nov 11, 2009
  16. 2/2 filter-branch: nearest-ancestor rewriting outside subdir filterJohannes Sixt, Nov 11, 2009
  17. Junio C HamanoNov 11, 2009
  18. Thomas RastNov 11, 2009
  19. Johannes SixtNov 11, 2009
  20. Thomas RastNov 11, 2009
  21. Johannes SixtNov 11, 2009
  22. Junio C HamanoNov 11, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.