Closed marcusbuffett closed 8 years ago
I'm sorry but that is not acceptable.
For example, assume the following situation
M foobar/foobar.txt
M foobar/hogehoge.txt
And assume that you hit --
on M foobar/hogehoge.txt
to stage changes then:
M foobar/foobar.txt
M foobar/hogehoge.txt
And assume that you changed mind and hit --
on M foobar/hogehoge.txt
again to unstage changes then:
M foobar/foobar.txt
M foobar/hogehoge.txt
Note that the order of the appearance has not changed during the situation. If gita sort files by its state, everytime when you stage/unstage changes, the order of appearance would change and users would lost which file they just stage/unstage if there are tons of changes.
This is one of the main reason I'm not comfortable with fugitive.vim. I need to be really careful to find which file I just stage/unstage.
What about the option to have flags like git status
supports? Something like Gita status -uno
would be very helpful and would avoid that situation you described.
Hum... I'll think about it. Do you have any idea about the name of the option?
Yeah, the option is --untracked-files
, or -u
for short. You can set it to either no
(no untracked files are shown), normal
(self-explanatory), or all
(which is what Gita status shows now). Would be awesome if Gita could support those options, thanks for the quick responses!
Oops. Actually Gita status
support -u/--untracked-files
option but there is a bug.
https://github.com/lambdalisue/vim-gita/commit/5cf7fd19517c562f1b82e102e3d4753b8f1475a8 fix that issue so you can disable untracked files by --untracked-files=no
:Gita status
" => Equal to Gita status --untracked-files=normal
:Gita status --untracked-files
" => Equal to Gita status --untracked-files=all
:Gita status --untracked-files=no
" => No untracked files will be shown
So is this what you want? I thought you were talking about the order of appearance of files in Gita status
You're absolutely right, I should have read the docs, sorry about that. Yeah originally I was talking about the order but your explanation for why that doesn't work makes a lot of sense, and the -u
option solves the problem I was having. Thanks!
Would be a nice feature, most git programs put untracked last because they're least likely to be the files you care about.