Jon Smirl wrote: > On 11/10/07, Jakub Narebski <jnareb@xxxxxxxxx> wrote: >> On Saturday, 10 November 2007, Jon Smirl wrote: >>> On 11/10/07, Jon Smirl <jonsmirl@xxxxxxxxx> wrote: >>> >>>> [daedalus]$ git for-each-ref --format="%(refname):%09%(committer)" \ >>>> --sort=-committerdate refs/heads >>>> refs/heads/m24: Jon Smirl <jonsmirl@xxxxxxxxx> 1191362799 -0400 >>>> refs/heads/m25: Jon Smirl <jonsmirl@xxxxxxxxx> 1191472422 -0400 >>>> refs/heads/m26: Jon Smirl <jonsmirl@xxxxxxxxx> 1194382038 -0500 >>>> refs/heads/m28: Jon Smirl <jonsmirl@xxxxxxxxx> 1194385071 -0500 >>>> refs/heads/m29: Jon Smirl <jonsmirl@xxxxxxxxx> 1194585780 -0500 >>> >>> It appears to be using the first head instead of the most recent date. >> >> It appears to not _sort_ the output by committerdate, as it should with >> '--sort=-committerdate'. > > It is sorted by committerdate, the sort is ascending. Did you expect > it to be descending, pick off the last entry instead of the first? Excerpts from git-for-each-ref(1): git-for-each-ref [--count=<count>]* (...) [--sort=<key>]* (...) <count> By default the command shows all refs that match <pattern>. This option makes it stop after showing that many refs. <key> A field name to sort on. Prefix - to sort in descending order of the value. When unspecified, refname is used. More than one sort keys can be given. So I expect --sort=-committerdate to sort by date of committing, descending, and --count=1 pick first one, which means most recent. It looks like "your" gitweb sorts ascending instead... strange... How does git_get_last_activity subroutine in your gitweb.cgi looks like? Does it have '--sort=-commiterdate'? If it has, then I think it is some strange bug in git, if it doesn't it is strange modification of gitweb. HTH -- Jakub Narebski Poland - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html