From 9002318f7660c678b75838bf4ef4e51b72d5026a Mon Sep 17 00:00:00 2001 From: J23 Date: Sat, 23 Nov 2024 16:12:43 +0800 Subject: [PATCH] status: fix verbose --- pkg/command/command_status.go | 1 + pkg/zeta/worktree_status.go | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/command/command_status.go b/pkg/command/command_status.go index 8427869..303b8c7 100644 --- a/pkg/command/command_status.go +++ b/pkg/command/command_status.go @@ -36,6 +36,7 @@ func (s *Status) Run(g *Globals) error { } defer r.Close() w := r.Worktree() + w.ShowFs(g.Verbose) shortFormat := s.Short || s.Z status, err := w.Status(context.Background(), !shortFormat) if err != nil { diff --git a/pkg/zeta/worktree_status.go b/pkg/zeta/worktree_status.go index 5e00be1..9ee9fcf 100644 --- a/pkg/zeta/worktree_status.go +++ b/pkg/zeta/worktree_status.go @@ -57,7 +57,7 @@ var ( ErrGlobNoMatches = errors.New("glob pattern did not match any files") ) -func (w *Worktree) showFs(verbose bool) { +func (w *Worktree) ShowFs(verbose bool) { if !verbose { return } @@ -76,7 +76,6 @@ func (w *Worktree) showFs(verbose bool) { // Status returns the working tree status. func (w *Worktree) Status(ctx context.Context, verbose bool) (Status, error) { - w.showFs(verbose) // var hash plumbing.Hash ref, err := w.Current()