git-time-metric / gtm

Simple, seamless, lightweight time tracking for Git
MIT License
979 stars 52 forks source link

What does `[m]` and `[r]` mean ? #73

Open chenbotao828 opened 7 years ago

chenbotao828 commented 7 years ago

Hi everybody! I have one simple question about gtm output, in codes below:

$ gtm status

       20m 40s  53% [m] plugin/gtm.vim
       18m  5s  46% [r] Terminal
           15s   1% [m] .gitignore
       39m  0s          gtm-vim-plugin 

What does [m] and [r] mean ? Thanks if anyone can explain that!

mschenk42 commented 7 years ago

Good question, m is for modified and r is for read.

chenbotao828 commented 7 years ago

Thanks Another question: Why a file ,untracked by git, have a '[r]' sign, which means read ,is this a bug? For example:

$ gtm status
$ gtm status

       20m 40s  53% [r] plugin/gtm.vim
       18m  5s  46% [r] T
in/gtm.vim
       18m  5s  46% [r] Terminal
           15s   1% [m] .gitignore
       39m  0s          gtm-vim-plugin 

'plugin/gtm.vim' is untracked

mschenk42 commented 7 years ago

That's by design. We use git to determine the file status. If it's not in the git repo we default to r.