From 1f528995837008d76b0674d9bbf8a5a42359b525 Mon Sep 17 00:00:00 2001 From: sandroid Date: Mon, 25 Mar 2024 21:57:31 +0100 Subject: [PATCH] Fix branch preview for branches that have the same name as a file --- bin/git-forgit | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bin/git-forgit b/bin/git-forgit index 2db6d77..6f642bc 100755 --- a/bin/git-forgit +++ b/bin/git-forgit @@ -740,7 +740,9 @@ _forgit_checkout_commit() { } _forgit_branch_preview() { - git log "$1" "${_forgit_log_preview_options[@]}" + # the trailing '--' ensures that this works for branches that have a name + # that is identical to a file + git log "$1" "${_forgit_log_preview_options[@]}" -- } _forgit_git_branch_delete() {