Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2c0282778e | ||
|
|
1a264a66f8 |
@@ -1 +1,26 @@
|
||||
.DS_Store
|
||||
.localized
|
||||
__MACOSX/
|
||||
.AppleDouble
|
||||
.LSOverride
|
||||
|
||||
# Resource forks
|
||||
._*
|
||||
|
||||
# Files and directories that might appear in the root of a volume
|
||||
.DocumentRevisions-V100
|
||||
.fseventsd
|
||||
.Spotlight-V100
|
||||
.TemporaryItems
|
||||
.Trashes
|
||||
.VolumeIcon.icns
|
||||
.com.apple.timemachine.donotpresent
|
||||
.com.apple.timemachine.supported
|
||||
.PKInstallSandboxManager
|
||||
.PKInstallSandboxManager-SystemSoftware
|
||||
.hotfiles.btree
|
||||
.vol
|
||||
.file
|
||||
.disk_label*
|
||||
lost+found
|
||||
.nobackup
|
||||
|
||||
+11
-5
@@ -6,14 +6,20 @@
|
||||
[[ -f ~/.zsh/.virtual_env_config.zsh ]] && source ~/.zsh/.virtual_env_config.zsh
|
||||
[[ -f ~/.zsh/.local_config ]] && source ~/.zsh/.local_config
|
||||
|
||||
# On shell start, bring ~/dotfiles up to date by fast-forwarding the CURRENT
|
||||
# branch to its upstream only. Never rebase or stash in the background: if the
|
||||
# branch diverged or local edits block it, warn and leave it for a manual pull.
|
||||
# Per-branch, so `server` on each device fast-forwards to origin/server.
|
||||
update_dotfiles() {
|
||||
cd ~/dotfiles || return
|
||||
if git fetch --dry-run 2>&1 | grep -q .; then
|
||||
git pull > /dev/null 2>&1
|
||||
fi
|
||||
local repo="$HOME/dotfiles"
|
||||
git -C "$repo" fetch --quiet 2>/dev/null || return
|
||||
git -C "$repo" rev-parse --abbrev-ref '@{u}' >/dev/null 2>&1 || return # no upstream
|
||||
git -C "$repo" merge-base --is-ancestor '@{u}' HEAD 2>/dev/null && return # already current
|
||||
git -C "$repo" merge --ff-only --quiet '@{u}' 2>/dev/null \
|
||||
|| print -u2 "⚠ dotfiles: $(git -C "$repo" symbolic-ref --short HEAD) can't fast-forward to @{u} — run: git -C ~/dotfiles pull"
|
||||
}
|
||||
|
||||
update_dotfiles 2>&1 &!
|
||||
update_dotfiles &!
|
||||
export LC_OSC52=1
|
||||
|
||||
# Load Antidote
|
||||
|
||||
Reference in New Issue
Block a user