Skip to content

Commit acd2d56

Browse files
committed
Update can-ff-merge to use older git branch name
Update can-ff-merge alias to use older git branch name technique instead of git branch --show-current, so we can support Git before version 2.22.0 Resolves #1
1 parent a532c81 commit acd2d56

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

gitconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
can-ff-merge = "!f() { \
33
[ -e "${1}" ] && echo "Missing branch name to merge" && exit 1; \
44
git "merge-base --is-ancestor \
5-
$(git branch --show-current) ${1}" \
5+
$(git rev-parse --abbrev-ref HEAD) ${1}" \
66
&& echo 'Yes, this can ff-merge' && exit 0 \
77
|| echo 'No, this can NOT ff-merge' && exit 1; \
88
}; f"

0 commit comments

Comments
 (0)