mirror of
https://github.com/Stunkymonkey/dotfiles.git
synced 2026-03-13 03:24:06 +01:00
Compare commits
3 commits
9a319d8bf7
...
48ef0a52d1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
48ef0a52d1 | ||
|
|
837517dad7 | ||
|
|
b4fbe4dd12 |
4 changed files with 37 additions and 24 deletions
|
|
@ -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}"
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
|
|
@ -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" },
|
||||||
|
|
|
||||||
27
nvim/lua/plugins/bufferline.lua
Normal file
27
nvim/lua/plugins/bufferline.lua
Normal 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,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue