File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -14,8 +14,9 @@ func fatalf(fmt string, args ...interface{}) {
14
14
15
15
var usage_str = `
16
16
Commands:
17
- cid <ref> Print the id of a tracking commit based on the given ref
18
- update Update all local branches with a matching *.trac branch
17
+ cid <ref> Print the id of a tracking commit based on the given ref
18
+ dump <refs...> Print the cache after loading the given branch ref(s)
19
+ update Update all local branches with a matching *.trac branch
19
20
`
20
21
21
22
func usage () {
@@ -79,6 +80,17 @@ func main() {
79
80
fatalf ("%v\n " , err )
80
81
}
81
82
fmt .Printf ("%v\n " , trac .Hash )
83
+ case "dump" :
84
+ if len (args ) < 2 {
85
+ usagef ("command 'dump' takes at least 1 argument" )
86
+ }
87
+ for _ , refname := range args [1 :] {
88
+ _ , err := c .TracByRef (refname )
89
+ if err != nil {
90
+ fatalf ("%v\n " , err )
91
+ }
92
+ }
93
+ fmt .Printf ("%v\n " , c )
82
94
default :
83
95
usagef ("unknown command %v" , args [0 ])
84
96
}
You can’t perform that action at this time.
0 commit comments