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

Re: [PATCH 0/7] gitweb: Trying to improve history view speed

From
Linus Torvalds <torvalds@osdl.org>
Date
Sep 6, 2006, 15:57 UTC
Message-ID
<Pine.LNX.4.64.0609060847521.27779@g5.osdl.org>
In-Reply-To
<200609061504.40725.jnareb@gmail.com>
On Wed, 6 Sep 2006, Jakub Narebski wrote:
Show 7 quoted lines
>
> Unfortunately, git-rev-list is broken: 'git rev-list <commit> 
> --full-history --parents -- <filename>' shows all merges in addition
> to what 'git rev-list <commit> --parents -- <filename>' and 
> 'git rev-list <commit> --full-history -- <filename>' shows, see
> "git-rev-list --full-history --parents doesn't respect path limit 
> and shows all merges" thread

If you ask for "--full-history" and "--parents", then pretty much by _definition_ you need every single merge, because otherwise your history wouldn't be fully connected.

Without that, things like "gitk" and "qgit" wouldn't work.
> So probably those patches should be dropped or put in freezer until
> git-rev-list is corrected.

git-rev-list _is_ correct, and if you want something else, you need to either use a different set of flags (like _only_ using "--full-history") or ask for a totally new flag (like "--most-history").

So the rule is:
 - using "--full-history" + "--parents" means that you want (surprise 
   surprise) full history with parenthood, which means that you get all 
   the connecting merges too. And since you asked for the _full_ history, 
   that means EVERY SINGLE MERGE.
 - using _just_ "--parents" means that you want a connected history with 
   parenthood information, but since you didn't ask for the _full_ 
   history, it will optimize away the merges that didn't change the file, 
   and only follow the changed side. You still get merges, but now you get 
   only those merges where both (all) sides actually mattered.
 - using _just_ "--full-history" (without asking for parenthood) means 
   that you're not asking for a connected history (since you're not asking 
   for parents), and as such, it will only show individual _commits_ that 
   change the file. That does potentially include merges, but again, it 
   only includes merges that actually _changed_ something.

In other words, "--parents" means a lot more than just "show what the parents" were. In particular, it means (and always has meant, apart from bugs) that we show the _rewritten_ parents after we've done history munging, and that we always output enough commits to actually make sense of that history from the result.

So what you are asking for is pretty nonsensical. You ask for parenthood info, but then you seem to not want to actually connect the dots. So why do you ask for parents in the first place? If you don't want to connect the commits to their parents, you shouldn't ask for it.

		Linus
Previous: Jakub NarebskiNext: Jakub Narebski
Message 19 of 28 in “gitweb: Trying to improve history view speed”
  1. 0/7 gitweb: Trying to improve history view speedJakub Narebski, Sep 6, 2006
  2. 1/7 gitweb: Make pickaxe search a featureJakub Narebski, Sep 6, 2006
  3. 2/7 gitweb: Paginate history outputJakub Narebski, Sep 6, 2006
  4. 3/7 gitweb: Use @hist_opts as git-rev-list parameters in git_historyJakub Narebski, Sep 6, 2006
  5. 4/7 gitweb: Add parse_rev_list for later useJakub Narebski, Sep 6, 2006
  6. 5/7 gitweb: Use parse_rev_list in git_shortlog and git_historyJakub Narebski, Sep 6, 2006
  7. 6/7 gitweb: Assume parsed revision list in git_shortlog_body and git_history_bodyJakub Narebski, Sep 6, 2006
  8. 7/7 gitweb: Set page to 0 if it is not defined, in git_historyJakub Narebski, Sep 6, 2006
  9. 8/8 gitweb: Remove --parents from call to git-rev-list in parse_rev_listJakub Narebski, Sep 6, 2006
  10. Linus TorvaldsSep 6, 2006
  11. Jakub NarebskiSep 6, 2006
  12. Junio C HamanoSep 6, 2006
  13. Jakub NarebskiSep 6, 2006
  14. Jakub NarebskiSep 7, 2006
  15. Junio C HamanoSep 7, 2006
  16. Jakub NarebskiSep 7, 2006
  17. Junio C HamanoSep 7, 2006
  18. Jakub NarebskiSep 7, 2006
  19. Linus TorvaldsSep 6, 2006
  20. Jakub NarebskiSep 6, 2006
  21. Linus TorvaldsSep 6, 2006
  22. Jakub NarebskiSep 6, 2006
  23. Linus TorvaldsSep 6, 2006
  24. Junio C HamanoSep 6, 2006
  25. Jakub NarebskiSep 9, 2006
  26. Junio C HamanoSep 9, 2006
  27. Jakub NarebskiSep 9, 2006
  28. Junio C HamanoSep 9, 2006

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.