28 lines
563 B
Go
28 lines
563 B
Go
package main
|
|
|
|
import(
|
|
"log"
|
|
)
|
|
|
|
func cmdHead(config configCollect) {
|
|
rc := NewRepoCommits(config)
|
|
|
|
rc.CollectDescs()
|
|
log.Println("Repo contains", len(rc.CommitDesc), "commits")
|
|
|
|
rc.CollectContent()
|
|
rc.BuildGraph()
|
|
log.Println("Repo has", len(rc.Root), "sources")
|
|
if len(rc.Root) > 1 {
|
|
for cn, _ := range rc.Root {
|
|
log.Println("Commit "+cn.Id+"\n"+cn.Content.String())
|
|
}
|
|
}
|
|
|
|
rc.FindLeafs()
|
|
log.Println("Repo has", len(rc.Leafs), "sinks")
|
|
|
|
rc.ChooseHead()
|
|
log.Println("Proposing following HEAD:\n"+rc.Head.Content.String())
|
|
}
|