summaryrefslogtreecommitdiff
path: root/lib-src/mr/config
diff options
context:
space:
mode:
Diffstat (limited to 'lib-src/mr/config')
-rw-r--r--lib-src/mr/config17
1 files changed, 16 insertions, 1 deletions
diff --git a/lib-src/mr/config b/lib-src/mr/config
index 6a8a8743..e5622594 100644
--- a/lib-src/mr/config
+++ b/lib-src/mr/config
@@ -23,6 +23,21 @@ git_update = git pull-safe "$@"
# Sometimes will want to redefine for a repository to include --no-tags.
git_push = git push-all "$@"
+# Look for branches with unpushed commits in only the main working tree, but
+# look for loose commits on a possibly-detached HEAD in all working trees.
+# Thus, we assume that for each linked working tree registered with myrepos,
+# its main working tree is also registered (we don't assume the converse).
+git_status =
+ git status --short "$@" ||:
+ if [ ! -h .git -a -d .git ]; then
+ git --no-pager log HEAD --branches --not --remotes \
+ --simplify-by-decoration --decorate --oneline ||:
+ git --no-pager stash list
+ else
+ git --no-pager log HEAD --not --branches --remotes \
+ --simplify-by-decoration --decorate --oneline ||:
+ fi
+
# Custom actions to be configured repository-by-repository.
sync = :
autoci = :
@@ -86,7 +101,7 @@ lib =
mine() {
workstation || on spwhitton@athena spwhitton@erebus
}
- # myrepos git_status assumes a separate registration for each worktree.
+ #
git_worktree_checkout () {
local repo=$1; shift
local i=0