mirror of
https://github.com/wfxr/forgit.git
synced 2026-09-10 07:16:23 -04:00
Fix branch preview for branches that have the same name as a file (#374)
The preview for branches (when using gbd or gcb) did not work for branches that have the same name as a file in the repository. This commit fixes this behavior by separating files and revisions with '--' as git suggests, while leaving the files blank to keep matching all files.
This commit is contained in:
parent
1a1153978f
commit
032b52f6d5
|
|
@ -742,7 +742,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() {
|
||||
|
|
|
|||
Loading…
Reference in a new issue