summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--jj_config.toml12
1 files changed, 12 insertions, 0 deletions
diff --git a/jj_config.toml b/jj_config.toml
index 179bb5c..d5ce62f 100644
--- a/jj_config.toml
+++ b/jj_config.toml
@@ -10,6 +10,18 @@ diff-formatter = ["difft", "--color=always", "$left", "$right"]
tug = ["bookmark", "move", "--from", "closest_bookmark(@-)", "--to", "@-"]
ml = ["log", "-r", "visible_heads() & mine()"]
lf = ["log", "-r", "visible_heads()"]
+pull = ["util", "exec", "--", "sh", "-c", '''
+ target="$(
+ jj bookmark list -r 'exactly(closest_bookmark(@-), 1)' \
+ -T 'name ++ "\n"' 2>/dev/null
+)" || target=""
+
+ jj git fetch || exit $?
+
+ if [ -n "$target" ]; then
+ jj new "$target";
+ fi;
+''']
[templates]
git_push_bookmark = '"tslil/push-" ++ change_id.short()'