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

Re: [RFC] Replace rebase with filtering

From
Steven Grimm <koreth@midwinter.com>
Date
Jan 17, 2007, 22:21 UTC
Message-ID
<45AEA15F.70001@midwinter.com>
In-Reply-To
<Pine.LNX.4.63.0701162218070.22628@wbgn013.biozentrum.uni-wuerzburg.de>
  Johannes Schindelin wrote:
Show 7 quoted lines
>> Okay, great, that is certainly an improvement over what I thought was
>> happening. But it won't work if you had to manually resolve a conflict during
>> the rebase, yes? In that case the diffs would presumably not match.
>>     
> Correct. There is no automatic way any program could verify that such a 
> patch is indeed what is already in upstream.
>   

Well, yes there is, in fact: don't forget the existing history like rebase currently does. Merge doesn't have the same problem. That's kind of the crux of what I'm proposing here: if you change the implementation of git's "Don't clutter my history with meaningless merges" feature from a history-lossy operation (rebase as it stands today) to a display-time filter (regular merge with an added "I'm just an update" marker) then this problem evaporates and it becomes safe to clone *any* repository and pull updates from it, not just ones where the owner is being careful never to run rebase when there are pending changes.

I think filtering is consistent with the way git does other things. Renames would be the big example; they are detected after the fact and dealt with at the point where they're actually relevant to what the user is doing (merging, etc.) rather than appearing as an explicit part of the repository's history. Why shouldn't no-op "sync with upstream" changes work the same way?

Show 5 quoted lines
> Usually, however, this results in a conflict which you have to resolve. 
> And _you_ do not have a hard time verifying that the patch already went 
> in, and you just say "git rebase --skip" and the rebasing will continue 
> _without_ having committed the now obsolete patch.
>   

True enough, but if the computer can retain the information it needs to do that for me (which it does if I merge instead of rebase) then why shouldn't it?

-Steve
Previous: Johannes Schindelin
Message 16 of 16 in “[RFC] Replace rebase with filtering”
  1. Steven GrimmJan 16, 2007
  2. Johannes SchindelinJan 16, 2007
  3. Steven GrimmJan 16, 2007
  4. Steven GrimmJan 16, 2007
  5. Johannes SchindelinJan 16, 2007
  6. Steven GrimmJan 16, 2007
  7. Jakub NarebskiJan 16, 2007
  8. Shawn O. PearceJan 16, 2007
  9. Johannes SchindelinJan 16, 2007
  10. Johannes SchindelinJan 16, 2007
  11. Jakub NarebskiJan 16, 2007
  12. Brian GernhardtJan 16, 2007
  13. Johannes SchindelinJan 16, 2007
  14. Junio C HamanoJan 16, 2007
  15. Johannes SchindelinJan 16, 2007
  16. Steven GrimmJan 17, 2007

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.