logoalt Hacker News

webstrandyesterday at 3:46 PM1 replyview on HN

If you don't provide it a <tree-ish> it reads from the index (staged files). So you're right its not really pointed anywhere, since the index isn't a ref.


Replies

saghmyesterday at 4:11 PM

That's my overall point: the argument itself (with respect to the current state of the repo) is what determines the behavior. I don't think this is anywhere close to as intuitive as commands that only ever accept one "type" of argument (and erroring if it's different).

show 1 reply