From b4fbe4dd12f217b48347e04eac19a60cbd33db4e Mon Sep 17 00:00:00 2001 From: Benedikt Heine Date: Sun, 18 Jan 2026 22:50:39 +0100 Subject: [PATCH 1/3] nvim: Use bufferline --- nvim/lazy-lock.json | 1 + nvim/lua/plugins/bufferline.lua | 27 +++++++++++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 nvim/lua/plugins/bufferline.lua diff --git a/nvim/lazy-lock.json b/nvim/lazy-lock.json index cf5ca3f..5ada03b 100644 --- a/nvim/lazy-lock.json +++ b/nvim/lazy-lock.json @@ -1,4 +1,5 @@ { + "bufferline.nvim": { "branch": "main", "commit": "655133c3b4c3e5e05ec549b9f8cc2894ac6f51b3" }, "gitsigns.nvim": { "branch": "main", "commit": "42d6aed4e94e0f0bbced16bbdcc42f57673bd75e" }, "lualine.nvim": { "branch": "master", "commit": "47f91c416daef12db467145e16bed5bbfe00add8" }, "nvim-autopairs": { "branch": "master", "commit": "c2a0dd0d931d0fb07665e1fedb1ea688da3b80b4" }, diff --git a/nvim/lua/plugins/bufferline.lua b/nvim/lua/plugins/bufferline.lua new file mode 100644 index 0000000..10ec00e --- /dev/null +++ b/nvim/lua/plugins/bufferline.lua @@ -0,0 +1,27 @@ +return { + "akinsho/bufferline.nvim", + version = "*", + dependencies = { + "nvim-tree/nvim-web-devicons", + }, + event = "VeryLazy", + opts = { + options = { + mode = "buffers", -- show buffers, not tabs + numbers = "none", + diagnostics = "nvim_lsp", + separator_style = "slant", + show_buffer_close_icons = true, + show_close_icon = false, + always_show_bufferline = true, + offsets = { + { + filetype = "NvimTree", + text = "File Explorer", + highlight = "Directory", + separator = true, + }, + }, + }, + }, +} From 837517dad78e69b38476b9cc79654a2244689d18 Mon Sep 17 00:00:00 2001 From: Benedikt Heine Date: Wed, 3 Dec 2025 12:34:41 +0100 Subject: [PATCH 2/3] Fix hard coded master/main HEAD branch --- bin/git-rewrite-commits.sh | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/bin/git-rewrite-commits.sh b/bin/git-rewrite-commits.sh index 217aa60..4ccf73c 100755 --- a/bin/git-rewrite-commits.sh +++ b/bin/git-rewrite-commits.sh @@ -8,23 +8,15 @@ # Enforce being in a git repository git rev-parse --is-inside-work-tree >/dev/null || exit $? -# We actually should check out the head branch via `git remote show ${REMOTE}`, -# but this requires active connection and active 2FA verification. Tedious to -# have multiple calls for this -if git rev-parse --verify main &>/dev/null; then - MAIN_BRANCH=main -else - MAIN_BRANCH=master -fi +HEAD_REMOT="$(git rev-parse --abbrev-ref origin/HEAD | cut -d/ -f2)" +HEAD_LOCAL="$(git rev-parse --abbrev-ref HEAD)" -CURRENT_BRANCH="$(git rev-parse --abbrev-ref HEAD)" - -if [ "${CURRENT_BRANCH}" = "${MAIN_BRANCH}" ]; then - echo "Cannot rebase commits from '${CURRENT_BRANCH}' (HEAD) onto '${MAIN_BRANCH}'" >&2 +if [ "${HEAD_LOCAL}" = "${HEAD_REMOT}" ]; then + echo "Cannot rebase commits from '${HEAD_LOCAL}' (HEAD) onto '${HEAD_REMOT}'" >&2 exit 1 fi -MERGE_BASE="$(git merge-base "${MAIN_BRANCH}" HEAD)" +MERGE_BASE="$(git merge-base "${HEAD_REMOT}" HEAD)" # Show the next command set -x From 48ef0a52d1c1dd20585f977a22bd9f0a68232e98 Mon Sep 17 00:00:00 2001 From: Benedikt Heine Date: Thu, 4 Dec 2025 16:28:57 +0100 Subject: [PATCH 3/3] Fix hard coded master/main branch on git-ard As previous change, but now for git-ard, too --- bin/git-ard.sh | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/bin/git-ard.sh b/bin/git-ard.sh index a1d5311..1d11cb5 100755 --- a/bin/git-ard.sh +++ b/bin/git-ard.sh @@ -5,19 +5,12 @@ # Enforce being in a git repository git rev-parse --is-inside-work-tree >/dev/null || exit $? -# We actually should check out the head branch via `git remote show ${REMOTE}`, -# but this requires active connection and active 2FA verification. Tedious to -# have multiple calls for this -if git rev-parse --verify main &>/dev/null; then - MAIN_BRANCH=main -else - MAIN_BRANCH=master -fi - -CURRENT_BRANCH="$(git rev-parse --abbrev-ref HEAD)" GIT_REMOTE=origin +HEAD_REMOT="$(git rev-parse --abbrev-ref ${GIT_REMOTE}/HEAD | cut -d/ -f2)" +HEAD_LOCAL="$(git rev-parse --abbrev-ref HEAD)" + # Show the next command set -x -git range-diff "${GIT_REMOTE}/${MAIN_BRANCH}..${GIT_REMOTE}/${CURRENT_BRANCH}" "${MAIN_BRANCH}..${CURRENT_BRANCH}" +git range-diff "${GIT_REMOTE}/${HEAD_REMOT}..${GIT_REMOTE}/${HEAD_LOCAL}" "${HEAD_REMOT}..${HEAD_LOCAL}"