Compare commits

..

No commits in common. "48ef0a52d1c1dd20585f977a22bd9f0a68232e98" and "9a319d8bf7808af98935bbead384d85db684e255" have entirely different histories.

4 changed files with 24 additions and 37 deletions

View file

@ -5,12 +5,19 @@
# 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 $?
GIT_REMOTE=origin # 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 ${GIT_REMOTE}/HEAD | cut -d/ -f2)" CURRENT_BRANCH="$(git rev-parse --abbrev-ref HEAD)"
HEAD_LOCAL="$(git rev-parse --abbrev-ref HEAD)" GIT_REMOTE=origin
# Show the next command # Show the next command
set -x set -x
git range-diff "${GIT_REMOTE}/${HEAD_REMOT}..${GIT_REMOTE}/${HEAD_LOCAL}" "${HEAD_REMOT}..${HEAD_LOCAL}" git range-diff "${GIT_REMOTE}/${MAIN_BRANCH}..${GIT_REMOTE}/${CURRENT_BRANCH}" "${MAIN_BRANCH}..${CURRENT_BRANCH}"

View file

@ -8,15 +8,23 @@
# 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 $?
HEAD_REMOT="$(git rev-parse --abbrev-ref origin/HEAD | cut -d/ -f2)" # We actually should check out the head branch via `git remote show ${REMOTE}`,
HEAD_LOCAL="$(git rev-parse --abbrev-ref HEAD)" # 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
if [ "${HEAD_LOCAL}" = "${HEAD_REMOT}" ]; then CURRENT_BRANCH="$(git rev-parse --abbrev-ref HEAD)"
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 "${HEAD_REMOT}" HEAD)" MERGE_BASE="$(git merge-base "${MAIN_BRANCH}" HEAD)"
# Show the next command # Show the next command
set -x set -x

View file

@ -1,5 +1,4 @@
{ {
"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

@ -1,27 +0,0 @@
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,
},
},
},
},
}