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

Re: rebase parents, or tracking upstream but removing non-distributable bits

From
AIAlexandre Erwin Ittner <listas@ittner.com.br>
Date
Dec 30, 2010, 22:58 UTC
Message-ID
<20101230205840.bb5d3370.listas@ittner.com.br>
In-Reply-To
<ord3ojb0yy.fsf@livre.localdomain>
Alexandre Oliva <lxoliva@fsfla.org> wrote
> I need to be able to maintain and publish a modified repository, that
> filters out the unwanted portions, but still be able to pull changes
> from the upstream repository.

Have you tried something with "git filter-branch"? I have never tried something like this but I think it is possible to automate a process to (1) pull the changes from the origin into a complete clone, (2) branch from the HEAD and run "filter-branch" with a customized script to create a temporary sanitized branch, (3) merge this temporary branch into a complete sanitized branch, (4) record all the branchpoints, sparing the next iteration from running through all the history again, and, (5) push the sanitized branch somewhere.

Of course, this approach creates a complete nightmare with the integration, testing, and code attribution: it changes the SHA1s, invalidates signed tags, forces the use of patches instead of pull requests to the upstream contributions, may taint the validity of the commit messages and authorship, etc. Publishing edited commits seems a delicate subject for me -- your "filter-branch" script should mark their commit messages as such.

Att.
-- 
Alexandre Erwin Ittner - alexandre@ittner.com.br
OpenPGP pubkey 0x0041A1FB @ http://pgp.mit.edu
Previous: Yann Dirson
Message 7 of 7 in “rebase parents, or tracking upstream but removing non-distributable bits”
  1. Alexandre OlivaDec 30, 2010
  2. Jonathan NiederDec 30, 2010
  3. Alexandre OlivaDec 30, 2010
  4. Jakub NarebskiDec 30, 2010
  5. Alexandre OlivaJan 5, 2011
  6. Yann DirsonDec 30, 2010
  7. Alexandre Erwin IttnerDec 30, 2010

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.