summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README14
-rw-r--r--home-mrconfig6
2 files changed, 18 insertions, 2 deletions
diff --git a/README b/README
index 0d6dae51..6306abda 100644
--- a/README
+++ b/README
@@ -1,3 +1,17 @@
This is Sean Whitton's dotfiles. I try to make it clear when stuff
was written by me, and when it was taken from elsewhere. Stuff I've
written is GPL v3 or any later versions published by the FSF.
+
+The master branch should work on most hosts, and host-specific
+configurations for host `host.domain' live in the branch `host'. All
+such host branches have master as their parent and are rebased onto
+master: the only exception is some branches based on `win32' for
+specific Windows hosts.
+
+This restriction is to make usage less complex, even if it results in
+some patches being duplicated between multiple host branches (that
+aren't suitable for master). My dotfiles are too important for the
+repository to require time-consuming, complex rebase operations. In
+particular, the restriction allows for the `mr update' and `mr rebase'
+commands to be simple scripts that almost always do exactly what's
+needed.
diff --git a/home-mrconfig b/home-mrconfig
index 86ff0baf..2d997c0e 100644
--- a/home-mrconfig
+++ b/home-mrconfig
@@ -111,8 +111,10 @@ rebase =
git rebase master
# fallback elif to still do something automatic in the simplest case
elif [ "$branch" = "$hostname" ]; then
- # determine nearest parent branch by
- # https://stackoverflow.com/questions/3161204/find-the-parent-branch-of-a-branch#comment35666518_17843908
+ # Determine nearest parent branch by
+ # <https://stackoverflow.com/questions/3161204/find-the-parent-branch-of-a-branch#comment35666518_17843908>.
+ # This should always be master per README, but check just in
+ # case.
parent="$(git show-branch -a | grep '*' | egrep -v "\[${branch}[0-9^~]*\]" | head -n1 | sed 's/.*\[\(.*\)\].*/\1/' | sed 's/[\^~].*//')"
if [ "$parent" = "master" ]; then
git checkout $branch