more logs when loading defaults
This commit is contained in:
parent
49c73be97a
commit
59fe6373dc
@ -70,6 +70,7 @@ func (d *Defaults) Load(dir, suffix string, value Rev, data []byte) (err error)
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (d *Defaults) Open(rev, filePath string) (rd io.Reader, err error) {
|
func (d *Defaults) Open(rev, filePath string) (rd io.Reader, err error) {
|
||||||
|
log.Printf("openning defaults at %s:%s", rev, filePath)
|
||||||
tree, err := d.treeAt(rev)
|
tree, err := d.treeAt(rev)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
@ -94,6 +95,7 @@ func (d *Defaults) ReadAll(rev, filePath string) (ba []byte, err error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (d *Defaults) List(rev, dir string) (names []string, err error) {
|
func (d *Defaults) List(rev, dir string) (names []string, err error) {
|
||||||
|
log.Printf("listing defaults at %s:%s", rev, dir)
|
||||||
tree, err := d.treeAt(rev)
|
tree, err := d.treeAt(rev)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
@ -130,6 +132,11 @@ func (d *Defaults) treeAt(rev string) (tree *object.Tree, err error) {
|
|||||||
obj, err = o.Object()
|
obj, err = o.Object()
|
||||||
|
|
||||||
case *object.Commit: // commit -> tree
|
case *object.Commit: // commit -> tree
|
||||||
|
msg := o.Message
|
||||||
|
if len(msg) > 30 {
|
||||||
|
msg = msg[:27] + "..."
|
||||||
|
}
|
||||||
|
log.Printf("open defaults at commit %s: %s", o.Hash.String()[:7], msg)
|
||||||
return o.Tree()
|
return o.Tree()
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
Loading…
Reference in New Issue
Block a user