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

Re: merge time

From
Jakub Narebski <jnareb@gmail.com>
Date
Jul 29, 2007, 23:19 UTC
Message-ID
<f8j795$qfi$1@sea.gmane.org>
In-Reply-To
<630183.45851.qm@web51001.mail.re2.yahoo.com>
[Cc: Matthew L Foster <mfoster167@yahoo.com>, git@vger.kernel.org]
Please, word wrap lines around 70 - 76 column.
Matthew L Foster wrote:
Show 8 quoted lines
> Sorry to bring up the time issue again [that I am perhaps still confused
> about] but I have been playing around with git more and I think I can
> phrase my question/observation better. 
> 
> From viewing gitweb.cgi I have observed a situation where Linus creates
> a tag, say rc1, and then he later merges changes but some subset of those
> changes/commits show up in the list in time order as taking place _before_
> the rc1 tag was made even though they were merged after.

Of course. The time ordering is by the time commits were _created_, not when they were merged.

In git, you can try tu use --topo-order parameter to git-log. In gitweb, not yet.

> Do I describe a real or possible phenomenon?
Real phenomenon.
> And does this happen because the developer that made the subset of changes
> in question commit them to his/her local repository in time order before
> the rc1 tag was made? So an external repository had the change before the
> rc1 tag was made but Linus' repository didn't?

That's correct. Well, Linus' repository might have had change, but just not merged in, but that is just small detail.

> But internally git on Linus' machine knows that the 
> gitweb.cgi displayed time order is wrong as far as the state is concerned
> because each repository's index file keeps local track of the true local
> state [just time isn't reconcilable], or am I missing something(s)? 

Git does not know, and git proper has no utility to show for each commit when it was merged to given branch. And that is even more complicated by the fast-forward merges. Reflog (local matter, not displayed in gitweb, available as "git reflog show <branch>" or "git log --show-reflog [<branch>]" in git) keeps track of the branch tip history; it doesn't offer information [you think] you want.

Show 5 quoted lines
> Is it possible for gitweb.cgi to have a new view mode that sorts/displays
> the list based on merge time for commits (the time merged into Linus' or
> whatever repository) so the above situation doesn't happen?  The actual
> time of a local commit should be the time it was merged locally not the  
> time it was created externally/originally, right?
I don't think that it is possible, but you are welcome to try...
> Where can I find the gitweb.cgi source/package?
> I could maybe hack gitweb.cgi myself.
Gitweb is now in the git.git repository, in gitweb/gitweb.perl
(see also gitweb/README and gitweb/INSTALL).
 
> Please CC me on any replies since I am not subscribed to the list.
Please Cc: list.
-- 
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git
Previous: Matthew L FosterNext: Linus Torvalds
Message 2 of 35 in “merge time”
  1. Matthew L FosterJul 29, 2007
  2. Jakub NarebskiJul 29, 2007
  3. Linus TorvaldsJul 29, 2007
  4. Matthew L FosterJul 30, 2007
  5. david@lang.hmJul 30, 2007
  6. Linus TorvaldsJul 30, 2007
  7. Matthew L FosterJul 30, 2007
  8. Linus TorvaldsJul 30, 2007
  9. Linus TorvaldsJul 30, 2007
  10. Matthew L FosterJul 30, 2007
  11. SeanJul 30, 2007
  12. Matthew L FosterJul 30, 2007
  13. Steffen ProhaskaJul 30, 2007
  14. Junio C HamanoJul 30, 2007
  15. Steffen ProhaskaJul 30, 2007
  16. Shawn O. PearceJul 30, 2007
  17. Steffen ProhaskaJul 30, 2007
  18. Jeff KingJul 30, 2007
  19. Junio C HamanoJul 30, 2007
  20. Jeff KingJul 30, 2007
  21. Steffen ProhaskaJul 30, 2007
  22. Jeff KingJul 30, 2007
  23. david@lang.hmJul 30, 2007
  24. Jeff KingJul 30, 2007
  25. Linus TorvaldsJul 30, 2007
  26. Steffen ProhaskaJul 31, 2007
  27. david@lang.hmJul 31, 2007
  28. Rogan DawesJul 30, 2007
  29. Matthew L FosterJul 30, 2007
  30. Johannes SchindelinJul 30, 2007
  31. Matthew L FosterJul 30, 2007
  32. Rogan DawesJul 30, 2007
  33. Matthew L FosterJul 30, 2007
  34. david@lang.hmJul 30, 2007
  35. Jakub NarebskiJul 30, 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.