git-open icon indicating copy to clipboard operation
git-open copied to clipboard

git open commit

Open monkindey opened this issue 7 years ago • 8 comments

How about git open --commit xxxx?

monkindey avatar Jun 23 '18 14:06 monkindey

Good idea!

But somebody has to do it :wink:

ffes avatar Jun 24 '18 09:06 ffes

It should be able to auto-detect (see if the commit exists) maybe? Instead of having a flag for it

derimagia avatar Jun 24 '18 19:06 derimagia

Feature request: git open opens the latest pull request opened for the current branch.

iliaskarim avatar Jul 10 '18 15:07 iliaskarim

@ILI4S it was attempted here https://github.com/paulirish/git-open/pull/53 but currently resolving the pull request URL is nontrivial, so we prefer one of two options:

  1. load the branch page (which has a link to the PR in the ui): image

  2. use issue branch naming and use the --issue flag, as documented in the readme.

paulirish avatar Jul 10 '18 19:07 paulirish

Pull request #144 added this option:

    -c, --commit          open current commit

As documented it is only for the current commit; trying to open a commit with an explicit value results in an error:

git-open --commit=8bb53b52560ea
error: option `commit' takes no value

And git-open -c 8bb53b52560ea results in a nonsense URL like https://8bb53b52560ea/8bb53b52560ea/commit/56ddf13245a99490b5c079cdc4ab66b77809dae4

We may have to change the way the current commit works, or even with the flag do what derimagia said and check values so that existing commits aren't misinterpreted.

mlncn avatar Sep 20 '19 17:09 mlncn

PR #155 allows me to pass a specific commit hash

wingleung avatar Oct 21 '19 16:10 wingleung

Does anyone still need this feature?

skypesky avatar Jan 27 '23 07:01 skypesky

done in #https://github.com/skypesky/to-where-cli/pull/45

npm cli: npmjs.com/package/to-where-cli

skypesky avatar Jan 27 '23 08:01 skypesky