hotoo / gitopen

:twisted_rightwards_arrows: Open git/hg/svn remote url via web browser from terminal.
https://hotoo.github.io/blog/post/gitopen
42 stars 6 forks source link

fix: allow opening commits from another branch #67

Closed Stamo-Gochev closed 5 years ago

Stamo-Gochev commented 6 years ago

Currently, it is not possible to open the commits page without checkout-ing the corresponding branch. This is because the "branch" option is not passed from the command line arguments. Thus "options.branch" is undefined at: https://github.com/hotoo/gitopen/blob/5f7c46f23c0fa80d6b7a90277824a1215cc06195/lib/index.js

Stamo-Gochev commented 6 years ago

Although this is a duplicate of "options.hash", I think it is a better name for what it refers (branch). Also, this was the name of the option used in the current version of the code.

coveralls commented 6 years ago

Coverage Status

Coverage remained the same at 82.222% when pulling 9a8f67bfb99e4e64c5952a9020f462c41ed69417 on Stamo-Gochev:master into 5f7c46f23c0fa80d6b7a90277824a1215cc06195 on hotoo:master.

hotoo commented 5 years ago

-b <branchName>, --branch <branchName> is the correct bash option.