feat(just): maintain の冒頭で dotfiles を git pull (ワンショット化) - #83
Merged
Conversation
maintain は flake input を更新するのに自分のリポは pull せず、local が古い まま旧レシピで維持して失敗する事故が起きていた。maintain の趣旨は「全部 最新にする」なので、冒頭で本体ツリーを git pull --rebase --autostash する。 - main ブランチのときだけ pull (feature/detached では触らない)。WIP は autostash。 - pull が post-merge/post-rewrite hook を発火し二重 rebuild になるのを、 DOTFILES_MAINTAIN=1 を export し hook 側で早期 exit して抑止。 - macOS/Linux 両 maintain に適用。 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
gapul
enabled auto-merge (squash)
July 28, 2026 00:29
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
背景
jd maintainは flake input を更新するが自分の dotfiles リポは pull しないため、修正が main にマージ済みでも local が古いと旧レシピで維持して失敗する事故が起きた(今日の brew/pear-desktop 連鎖はこれが一因)。変更
_maintain-macos/_maintain-linuxの冒頭で本体ツリーをgit pull --rebase --autostash(main ブランチのときだけ)。これで「同期 → 更新 → rebuild → gc」の真のワンショットになる。二重 rebuild 対策: pull は post-merge/post-rewrite hook を発火して
just rebuildを走らせるが、maintain はこの後に自前で rebuild する。maintain がDOTFILES_MAINTAIN=1を export し、nix/home/git-hooks.nixの hook が同変数で早期 exit してスキップする。--autostashで保全🤖 Generated with Claude Code