Closed liuyinz closed 1 year ago
Hi, thanks for the PR.
This has come up before in #46 but unfortunately we were unable to come to a conclusion. Have a look a the commentary there are let me know your thoughts.
@sshaw oh thanks. I don't notice that since it's about years ago.
git-link-prefer-branch
rather than git-link-use-commit
is more intuitive, you could defalias or depreciate that.That's how my patch works, just use boolean not use as-fallback
thing and it seems git-link-use-commit
was only used in git-link--new
, it would be very easy to fix that
When you are not on any branch and set
git-link-use-commit
tonil
, functiongit-link--branch
return empty string "", and returned url is wrong. So use commit hash as fallback if branch name is empty.