Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
magicdrive committed Sep 19, 2021
2 parents 50cbe93 + 44ce341 commit 004dbab
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ USAGE
* [--la|--left-alias] [alias] # Left side git ref alias. (default: use --left value)
* [-r|--right] [hash|tag|branch] # Right side git ref used for compare. (default: current branch)
* [--ra|--right-alias] [alias] # Right side git ref alias. (default: use --right value)
* [-o|--refs-mode] [r|l|lr] # Specify url ref hash mode. r or l or lr or rl(default: l)
* [-o|--refs-mode] [r|l|lr|none] # Specify url ref hash mode. r or l or lr or rl(default: l)
* [--version] # Show version.
* [-v|--verbose] # Verbose mode.
* [-s|--simple] # Simple output mode.
Expand Down
12 changes: 8 additions & 4 deletions git-gh-diff-url
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# * [--la|--left-alias] [alias] # Left side git ref alias. (default: use --left value)
# * [-r|--right] [hash|tag|branch] # Right side git ref used for compare. (default: current branch)
# * [--ra|--right-alias] [alias] # Right side git ref alias. (default: use --right value)
# * [-o|--refs-mode] [r|l|lr] # Specify url ref hash mode. r or l or lr or rl(default: l)
# * [-o|--refs-mode] [r|l|lr|none] # Specify url ref hash mode. r or l or lr or rl(default: l)
# * [--version] # Show version.
# * [-v|--verbose] # Verbose mode on.
# * [-s|--simple] # Simple mode on.
Expand Down Expand Up @@ -58,7 +58,7 @@ USAGE:
* [--la|--left-alias] [alias] # Left side git ref alias. (default: use --left value)
* [-r|--right] [hash|tag|branch] # Right side git ref used for compare. (default: current branch)
* [--ra|--right-alias] [alias] # Right side git ref alias. (default: use --right value)
* [-o|--refs-mode] [r|l|lr] # Specify url ref hash mode. r or l or lr or rl(default: l)
* [-o|--refs-mode] [r|l|lr|none] # Specify url ref hash mode. r or l or lr or rl or none. (default: l)
* [--version] # Show version.
* [-v|--verbose] # Verbose mode on.
* [-s|--simple] # Simple mode on.
Expand Down Expand Up @@ -196,6 +196,10 @@ git::gh:d:u::main() {
_right=$(git::gh:d:u::head_hash "${_right}")
_left=$(git::gh:d:u::head_hash "${_left}")
;;
none)
_left="$(git::gh:d:u::left)"
_right="$(git::gh:d:u::right)"
;;
esac

echo "$(git::gh:d:u::branch_name)"
Expand Down Expand Up @@ -253,7 +257,7 @@ while getopts "$optspec" optchar; do
;;
refs-mode)
val="${!OPTIND}"; OPTIND=$(( $OPTIND + 1 ))
if [[ ${val} =~ ^(r|l|lr|rl)$ ]]; then
if [[ ${val} =~ ^(r|l|lr|rl|none)$ ]]; then
__CONFIG_REFS_MODE="${val}"
else
echo "Unknown option --refs-mode ${val}" >&2
Expand Down Expand Up @@ -302,7 +306,7 @@ while getopts "$optspec" optchar; do
__CONFIG_RIGHT="${OPTARG}"
;;
o)
if [[ ${OPTARG} =~ ^(r|l|lr|rl)$ ]]; then
if [[ ${OPTARG} =~ ^(r|l|lr|rl|none)$ ]]; then
__CONFIG_REFS_MODE="${OPTARG}"
else
echo "Unknown option -o ${OPTARG}" >&2
Expand Down
2 changes: 1 addition & 1 deletion git-gh-diff-url.1
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ git\-gh\-diff\-url \- Generate github refs diff url (github.com/{user}/{repo}/co
* [\-\-la|\-\-left-alias] [alias] # Left side git ref alias. (default: use \-\-left value)
* [\-r|\-\-right] [hash|tag|branch] # Right side git ref used for compare. (default: current branch)
* [\-\-ra|\-\-right-alias] [alias] # Right side git ref alias. (default: use \-\-right value)
* [\-o|\-\-refs\-mode] [r|l|lr] # Specify url ref hash mode. r or l or lr or rl(default: l)
* [\-o|\-\-refs\-mode] [r|l|lr|none] # Specify url ref hash mode. r or l or lr or rl(default: l)
* [\-\-version] # Show version.
* [\-v|\-\-verbose] # Verbose mode.
* [\-s|\-\-simple] # Simple output mode.
Expand Down

0 comments on commit 004dbab

Please sign in to comment.