Open frangio opened 5 years ago
How about :Gina commit -- %
? Does that work?
I haven't used git commit <single file>
so I didn't consider such a case.
Yes, -- %
does work. Interesting. Is that by design though?
Also just noticed %
is ignored in other commands like :Gina diff %
.
Well, it's a bit complecated. Gina add %
works because Gina add
uses Gina _raw add
command internally and that command expand any arguments which look like %
or %:p
or so on (for convinience). However, Gina commit
does not touch unexpected arguments so %
leaves as-is.
You said Gina diff %
doesn' work but it's wrong usage. The correct one is Gina diff :%
. Read :help gina-misc-treeish
for more detail.
So, it's complicated to change the current behavior and at least Gina commit -- %
works. I think I'm not going to fix the behavior. Sorry for that.
I expected
:Gina commit %
to commit the current file but it instead silently ignores%
.:Gina add %
does expand the%
so I expected that to work consistently across commands.