Skip to content

Commit

Permalink
libgit: extra debugging for issue where browser tree goes nil
Browse files Browse the repository at this point in the history
Issue: KBFS-4077
  • Loading branch information
strib authored and aaazalea committed Apr 19, 2019
1 parent 8b7129d commit f26df15
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion go/kbfs/libgit/autogit_node_wrappers.go
Original file line number Diff line number Diff line change
Expand Up @@ -186,9 +186,15 @@ func (rdn *repoDirNode) GetFS(ctx context.Context) billy.Filesystem {
if rdn.subdir == "" {
// If this is the root node for the repo, register it exactly once.
rdn.once.Do(func() {
// TODO(KBFS-4077): remove this debugging when we find the bug
// where b.tree seems to be disappearing.
rdn.am.log.CDebugf(
ctx, "Got browser %p for repo=%s, branch=%s, subdir=%s, "+
"with tree %p", b, rdn.repo, rdn.branch, rdn.subdir,
b.tree)
billyFS, err := rdn.gitRootFS.Chroot(rdn.repo)
if err != nil {
rdn.am.log.CDebugf(nil, "Error getting repo FS: %+v", err)
rdn.am.log.CDebugf(ctx, "Error getting repo FS: %+v", err)
return
}
repoFS := billyFS.(*libfs.FS)
Expand Down

0 comments on commit f26df15

Please sign in to comment.