summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 7618e6b)
raw | patch | inline | side by side (parent: 7618e6b)
author | Shawn O. Pearce <spearce@spearce.org> | |
Thu, 5 Jul 2007 04:07:11 +0000 (00:07 -0400) | ||
committer | Shawn O. Pearce <spearce@spearce.org> | |
Mon, 9 Jul 2007 01:12:53 +0000 (21:12 -0400) |
When trying to create a branch from a tag most people are looking
for a recent tag, not one that is ancient history. Rather than
sorting tags by their string we now sort them by taggerdate, as
this places the recent tags at the top of the list and the very
old ones at the end. Tag date works nicely as an approximation
of the actual history order of commits.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
for a recent tag, not one that is ancient history. Rather than
sorting tags by their string we now sort them by taggerdate, as
this places the recent tags at the top of the list and the very
old ones at the end. Tag date works nicely as an approximation
of the actual history order of commits.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
lib/branch.tcl | patch | blob | history |
diff --git a/lib/branch.tcl b/lib/branch.tcl
index de638d02e8023636e4198d5546e1eb3ac6f6ab32..a6e6921174cde718fd7cf51b5a8d60cc41a06ab3 100644 (file)
--- a/lib/branch.tcl
+++ b/lib/branch.tcl
proc load_all_tags {} {
set all_tags [list]
- set fd [open "| git for-each-ref --format=%(refname) refs/tags" r]
+ set fd [open "| git for-each-ref --sort=-taggerdate --format=%(refname) refs/tags" r]
while {[gets $fd line] > 0} {
if {![regsub ^refs/tags/ $line {} name]} continue
lappend all_tags $name
}
close $fd
-
- return [lsort $all_tags]
+ return $all_tags
}
proc populate_branch_menu {} {