wakatime / wakatime-cli

Command line interface used by all WakaTime text editor plugins
https://wakatime.com/plugins
BSD 3-Clause "New" or "Revised" License
266 stars 41 forks source link

Fix git detection for worktree on bare repo #1005

Closed gandarez closed 6 months ago

gandarez commented 6 months ago

This PR fixes a corner case when worktree is created in a bare repo.

Fixes #1001

codecov-commenter commented 6 months ago

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (93ef411) 62.90% compared to head (c0bda1b) 62.92%.

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

@@             Coverage Diff             @@
##           develop    #1005      +/-   ##
===========================================
+ Coverage    62.90%   62.92%   +0.01%     
===========================================
  Files          372      372              
  Lines        15885    15890       +5     
===========================================
+ Hits          9993     9999       +6     
+ Misses        5365     5364       -1     
  Partials       527      527              
Flag Coverage Δ
unittests 62.92% <93.33%> (+0.01%) :arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
pkg/apikey/apikey.go 100.00% <100.00%> (ø)
pkg/project/file.go 75.00% <100.00%> (ø)
pkg/project/mercurial.go 73.17% <100.00%> (ø)
pkg/project/project.go 93.82% <100.00%> (ø)
pkg/project/subversion.go 67.94% <100.00%> (ø)
pkg/project/tfvc.go 86.95% <100.00%> (ø)
pkg/remote/remote.go 64.62% <100.00%> (ø)
pkg/project/git.go 62.82% <88.23%> (+1.24%) :arrow_up: