tig icon indicating copy to clipboard operation
tig copied to clipboard

Cannot unstage blank or renamed files

Open liangkarl opened this issue 2 years ago • 6 comments

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.

liangkarl avatar Sep 03 '22 10:09 liangkarl

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

koutcher avatar Nov 19 '22 16:11 koutcher

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

liangkarl avatar Dec 02 '22 17:12 liangkarl

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

koutcher avatar Dec 02 '22 18:12 koutcher

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 avatar Dec 04 '22 10:12 liangkarl

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

liangkarl avatar Dec 04 '22 10:12 liangkarl

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.

koutcher avatar Dec 05 '22 18:12 koutcher