jonas / tig

Text-mode interface for git
https://jonas.github.io/tig/
GNU General Public License v2.0
12.47k stars 611 forks source link

Cannot unstage blank or renamed files #1233

Open liangkarl opened 2 years ago

liangkarl commented 2 years ago

The reproduced steps are as follow:

  1. touch test.txt and enter tig
  2. In the status view, press u to add the test.txt
  3. Now the test.txt is in stage view and it's useless to press u to unstage test.txt
  4. The only way to unstage test.txt is git reset by typing this command manually.
koutcher commented 1 year ago

What about 4. In the status view, press u to unstage text.txt ?

liangkarl commented 1 year ago

Uh, tig would show the message, fail to update files.

koutcher commented 1 year ago

This message is from the stage view, switch to the status view (s).

liangkarl commented 1 year ago

Thanks. It's worked that unstage text.txt in the status view. However, I think it's quite weird that we couldn't unstage files in the stage view.

liangkarl commented 1 year ago

If possible, I'd like to suggest tig to correct this SW behavior with the lowest priority. :)

koutcher commented 1 year ago

I'm not too optimistic, the stage view implementation is essentially based on using diff chunk headers and in this case, there isn't a full one.