Compare commits

..

3 commits

Author SHA1 Message Date
Benedikt Heine
48ef0a52d1 Fix hard coded master/main branch on git-ard
Some checks are pending
Build / Lint Code Base (push) Waiting to run
CI / build (push) Waiting to run
As previous change, but now for git-ard, too
2026-01-18 23:38:59 +01:00
Benedikt Heine
837517dad7 Fix hard coded master/main HEAD branch 2026-01-18 23:38:51 +01:00
Benedikt Heine
b4fbe4dd12 nvim: Use bufferline 2026-01-18 23:17:04 +01:00
4 changed files with 37 additions and 24 deletions

View file

@ -5,19 +5,12 @@
# Enforce being in a git repository # Enforce being in a git repository
git rev-parse --is-inside-work-tree >/dev/null || exit $? 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 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 # Show the next command
set -x 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}"

View file

@ -8,23 +8,15 @@
# Enforce being in a git repository # Enforce being in a git repository
git rev-parse --is-inside-work-tree >/dev/null || exit $? git rev-parse --is-inside-work-tree >/dev/null || exit $?
# We actually should check out the head branch via `git remote show ${REMOTE}`, HEAD_REMOT="$(git rev-parse --abbrev-ref origin/HEAD | cut -d/ -f2)"
# but this requires active connection and active 2FA verification. Tedious to HEAD_LOCAL="$(git rev-parse --abbrev-ref HEAD)"
# 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)" if [ "${HEAD_LOCAL}" = "${HEAD_REMOT}" ]; then
echo "Cannot rebase commits from '${HEAD_LOCAL}' (HEAD) onto '${HEAD_REMOT}'" >&2
if [ "${CURRENT_BRANCH}" = "${MAIN_BRANCH}" ]; then
echo "Cannot rebase commits from '${CURRENT_BRANCH}' (HEAD) onto '${MAIN_BRANCH}'" >&2
exit 1 exit 1
fi fi
MERGE_BASE="$(git merge-base "${MAIN_BRANCH}" HEAD)" MERGE_BASE="$(git merge-base "${HEAD_REMOT}" HEAD)"
# Show the next command # Show the next command
set -x set -x

View file

@ -1,4 +1,5 @@
{ {
"bufferline.nvim": { "branch": "main", "commit": "655133c3b4c3e5e05ec549b9f8cc2894ac6f51b3" },
"gitsigns.nvim": { "branch": "main", "commit": "42d6aed4e94e0f0bbced16bbdcc42f57673bd75e" }, "gitsigns.nvim": { "branch": "main", "commit": "42d6aed4e94e0f0bbced16bbdcc42f57673bd75e" },
"lualine.nvim": { "branch": "master", "commit": "47f91c416daef12db467145e16bed5bbfe00add8" }, "lualine.nvim": { "branch": "master", "commit": "47f91c416daef12db467145e16bed5bbfe00add8" },
"nvim-autopairs": { "branch": "master", "commit": "c2a0dd0d931d0fb07665e1fedb1ea688da3b80b4" }, "nvim-autopairs": { "branch": "master", "commit": "c2a0dd0d931d0fb07665e1fedb1ea688da3b80b4" },

View file

@ -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,
},
},
},
},
}