diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 00000000..11b5ff66 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,3 @@ +# 0.0.13 +- Fixes bug that prevented users wih git versions below 2.21 to be able to use 'mob'. + \ No newline at end of file diff --git a/mob.go b/mob.go index 281a07ac..6326c76b 100644 --- a/mob.go +++ b/mob.go @@ -10,7 +10,7 @@ import ( "time" ) -const versionNumber = "0.0.12" +const versionNumber = "0.0.13" var wipBranch = "mob-session" // override with MOB_WIP_BRANCH environment variable var baseBranch = "master" // override with MOB_BASE_BRANCH environment variable @@ -394,7 +394,8 @@ func gitRemoteBranches() string { } func gitCurrentBranch() string { - return strings.TrimSpace(silentgit("branch", "--show-current")) + // upgrade to branch --show-current when git v2.21 is more widely spread + return strings.TrimSpace(silentgit("rev-parse", "--abbrev-ref", "HEAD")) } func gitUserName() string {