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

Re: import files w/ history

From
Jeff King <peff@peff.net>
Date
Mar 10, 2009, 18:03 UTC
Message-ID
<20090310180353.GC26351@sigill.intra.peff.net>
In-Reply-To
<slrngr99ei.1t4t.csaba-ml@beastie.creo.hu>
On Mon, Mar 09, 2009 at 05:15:16AM +0000, Csaba Henk wrote:
Show 12 quoted lines
> But I still had a hard time with it... Finally I realized that if I do
> filtering this way, I have to start filtering from the topmost commit
> which affects the given file.
> 
> If I just start from origin/HEAD (assuming that it's on a commit which
> does not affect the file), then it won't be found as a key of the mapping
> created by git-filter-branch (as it's ignored because rev-listing was
> narrowed down to the file), and therefore filter-branch finally punts
> with "WARNING: Ref '<sha1>' is unchanged". I don't know if it's an
> intended behaviour, or something which could/should be improved, or at
> least documented... seems to be some sort of POLS violation to me (at
> least I was surprised :) ).

I think passing path limiters to filter-branch is just something that nobody ever really tried before. I think the solutions are, in order of decreasing easiness and increasing difficulty:

  1. document the problem in Documentation/git-filter-branch.txt
  2. create a failing test for it in the test suite
  3. fix the failing test. ;)
Do you want to try a patch for one (or more!) of those?
-Peff
Previous: Csaba HenkNext: Csaba Henk
Message 7 of 8 in “import files w/ history”
  1. Csaba HenkMar 3, 2009
  2. Jeff KingMar 3, 2009
  3. Csaba HenkMar 6, 2009
  4. Miklos VajnaMar 6, 2009
  5. Jeff KingMar 8, 2009
  6. Csaba HenkMar 9, 2009
  7. Jeff KingMar 10, 2009
  8. Csaba HenkMar 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.