Worktrunk is a CLI for Git worktree management, designed for parallel AI agent workflows
Add demo environment and GIF recordings
Maximilian Roos4ba6fc21041f
diff --git a/docs/demos/out/.demo-wt-core/.config/glab-cli/aliases.yml b/docs/demos/out/.demo-wt-core/.config/glab-cli/aliases.ymlnew file mode 100644index 000000000..0121550d8--- /dev/null+++ b/docs/demos/out/.demo-wt-core/.config/glab-cli/aliases.yml@@ -0,0 +1,2 @@+ci: pipeline ci+co: mr checkoutdiff --git a/docs/demos/out/.demo-wt-core/.config/glab-cli/config.yml b/docs/demos/out/.demo-wt-core/.config/glab-cli/config.ymlnew file mode 100644index 000000000..496396e22--- /dev/null+++ b/docs/demos/out/.demo-wt-core/.config/glab-cli/config.yml@@ -0,0 +1,40 @@+# What protocol to use when performing Git operations. Supported values: ssh, https.+git_protocol: ssh+# What editor glab should run when creating issues, merge requests, etc. This global config cannot be overridden by hostname.+editor:+# What browser glab should run when opening links. This global config cannot be overridden by hostname.+browser:+# Set your desired Markdown renderer style. Available options are [dark, light, notty]. To set a custom style, refer to https://github.com/charmbracelet/glamour#styles+glamour_style: dark+# Allow glab to automatically check for updates and notify you when there are new updates.+check_update: true+# Last update check timestamp, used for checking when the last update check was performed.+last_update_check_timestamp: 2025-12-30T12:10:40-08:00+# Whether or not to display hyperlink escape characters when listing items like issues or merge requests. Set to TRUE to display hyperlinks in TTYs only. Force hyperlinks by setting FORCE_HYPERLINKS=1 as an environment variable.+display_hyperlinks: false+# Default GitLab hostname to use.+host: gitlab.com+# Set to true (1) to disable prompts, or false (0) to enable them.+no_prompt: false+# Set to false (0) to disable sending usage data to your GitLab instance or true (1) to enable.+# See https://docs.gitlab.com/administration/settings/usage_statistics/+# for more information+telemetry: true+# Configuration specific for GitLab instances.+hosts:+ gitlab.com:+ # What protocol to use to access the API endpoint. Supported values: http, https.+ api_protocol: https+ # Configure host for API endpoint. Defaults to the host itself.+ api_host: gitlab.com+ # Your GitLab access token. To get one, read https://docs.gitlab.com/user/profile/personal_access_tokens/+ token:+ # The domains of associated container registries. These are used to configure the+ # Docker credential helper.+ container_registry_domains: gitlab.com,gitlab.com:443,registry.gitlab.com+ # Custom HTTP headers to add to all HTTP requests made by glab. Supports both direct values and environment variable loading.+ # - name: Proxy-Authorization+ # value: Bearer token123+ # - name: Cf-Access-Client-Secret+ # valueFromEnv: MY_SECRET_VALUE+ custom_headers: []diff --git a/docs/demos/out/.demo-wt-core/.config/worktrunk/config.toml b/docs/demos/out/.demo-wt-core/.config/worktrunk/config.tomlnew file mode 100644index 000000000..edc4efdb7--- /dev/null+++ b/docs/demos/out/.demo-wt-core/.config/worktrunk/config.toml@@ -0,0 +1,2 @@+[projects."/Users/maximilian/workspace/worktrunk.demo-background/docs/demos/out/.demo-wt-core/remote"]+approved-commands = ['npm run dev -- --port {{ branch | hash_port }}', 'flyctl scale count 0']diff --git a/docs/demos/out/.demo-wt-core/bin/cargo b/docs/demos/out/.demo-wt-core/bin/cargonew file mode 100755index 000000000..8d4876fa5--- /dev/null+++ b/docs/demos/out/.demo-wt-core/bin/cargo@@ -0,0 +1,10 @@+#!/bin/bash+if [[ "$1" == "nextest" && "$2" == "run" ]]; then+ sleep 0.3+ echo " Finished \`test\` profile [unoptimized + debuginfo] target(s) in 0.02s"+ echo " Starting 2 tests across 1 binary"+ echo " PASS [ 0.001s] acme::tests::test_add"+ echo " PASS [ 0.001s] acme::tests::test_add_zeros"+ echo "------------"+ echo " Summary [ 0.002s] 2 tests run: 2 passed, 0 skipped"+fidiff --git a/docs/demos/out/.demo-wt-core/bin/cat b/docs/demos/out/.demo-wt-core/bin/catnew file mode 100755index 000000000..68a6dd279--- /dev/null+++ b/docs/demos/out/.demo-wt-core/bin/cat@@ -0,0 +1,7 @@+#!/bin/bash+# Use bat for syntax highlighting if file is toml+if [[ "$1" == *.toml ]]; then+ exec bat --style=plain --paging=never "$@"+else+ exec /bin/cat "$@"+fidiff --git a/docs/demos/out/.demo-wt-core/bin/docker b/docs/demos/out/.demo-wt-core/bin/dockernew file mode 100755index 000000000..4676145a7--- /dev/null+++ b/docs/demos/out/.demo-wt-core/bin/docker@@ -0,0 +1,5 @@+#!/bin/bash+if [[ "$1" == "compose" && "$2" == "up" ]]; then+ echo "[+] Running 1/1"+ echo " ✔ Container postgres Started"+fidiff --git a/docs/demos/out/.demo-wt-core/bin/flyctl b/docs/demos/out/.demo-wt-core/bin/flyctlnew file mode 100755index 000000000..df228e312--- /dev/null+++ b/docs/demos/out/.demo-wt-core/bin/flyctl@@ -0,0 +1,4 @@+#!/bin/bash+if [[ "$1" == "scale" ]]; then+ echo "Scaling app to 0 machines"+fidiff --git a/docs/demos/out/.demo-wt-core/bin/gh b/docs/demos/out/.demo-wt-core/bin/ghnew file mode 100755index 000000000..5b7ecdfad--- /dev/null+++ b/docs/demos/out/.demo-wt-core/bin/gh@@ -0,0 +1,49 @@+#!/usr/bin/env bash+# Mock gh CLI for demos - returns varied CI status per branch++if [[ "$1" == "auth" && "$2" == "status" ]]; then+ exit 0+fi++if [[ "$1" == "pr" && "$2" == "list" ]]; then+ branch=""+ for arg in "$@"; do+ if [[ "$prev" == "--head" ]]; then+ branch="$arg"+ fi+ prev="$arg"+ done++ case "$branch" in+ main)+ echo '[{"state":"MERGED","headRefOid":"main123","mergeStateStatus":"CLEAN","statusCheckRollup":[{"status":"COMPLETED","conclusion":"SUCCESS"}],"url":"https://github.com/acme/demo/pull/100"}]'+ ;;+ alpha)+ echo '[{"state":"OPEN","headRefOid":"abc123","mergeStateStatus":"CLEAN","statusCheckRollup":[{"status":"COMPLETED","conclusion":"SUCCESS"}],"url":"https://github.com/acme/demo/pull/1"}]'+ ;;+ beta)+ echo '[{"state":"OPEN","headRefOid":"def456","mergeStateStatus":"CLEAN","statusCheckRollup":[{"status":"IN_PROGRESS","conclusion":null}],"url":"https://github.com/acme/demo/pull/2"}]'+ ;;+ hooks)+ # hooks has no remote, so no PR+ echo '[]'+ ;;+ billing|api)+ echo '[{"state":"OPEN","headRefOid":"jkl012","mergeStateStatus":"CLEAN","statusCheckRollup":[{"status":"COMPLETED","conclusion":"SUCCESS"}],"url":"https://github.com/acme/demo/pull/4"}]'+ ;;+ *)+ echo '[]'+ ;;+ esac+ exit 0+fi++# gh api for check-runs (branches without PRs, like main)+# wt calls: gh api repos/.../commits/.../check-runs --jq '.check_runs | map({status, conclusion})'+# We return the post-jq result directly+if [[ "$1" == "api" && "$2" == *"check-runs"* ]]; then+ echo '[{"status":"completed","conclusion":"success"}]'+ exit 0+fi++exit 1diff --git a/docs/demos/out/.demo-wt-core/bin/llm b/docs/demos/out/.demo-wt-core/bin/llmnew file mode 100755index 000000000..f2589c0a5--- /dev/null+++ b/docs/demos/out/.demo-wt-core/bin/llm@@ -0,0 +1,6 @@+#!/bin/bash+sleep 0.5+echo "feat(validation): add input validation utilities"+echo ""+echo "Add validation module with is_positive and is_non_empty helpers"+echo "for validating user input. Includes comprehensive test coverage."diff --git a/docs/demos/out/.demo-wt-core/bin/npm b/docs/demos/out/.demo-wt-core/bin/npmnew file mode 100755index 000000000..36a5badbb--- /dev/null+++ b/docs/demos/out/.demo-wt-core/bin/npm@@ -0,0 +1,22 @@+#!/bin/bash+if [[ "$1" == "install" ]]; then+ echo "added 847 packages in 3.2s"+elif [[ "$1" == "run" && "$2" == "build" ]]; then+ echo "vite v5.4.2 building for production..."+ echo "✓ 142 modules transformed"+ echo "dist/index.js 45.2 kB │ gzip: 14.8 kB"+elif [[ "$1" == "run" && "$2" == "dev" ]]; then+ # Extract port from args if provided (e.g., npm run dev -- --port 3001)+ port=3000+ for arg in "$@"; do+ if [[ "$prev" == "--port" ]]; then+ port="$arg"+ fi+ prev="$arg"+ done+ echo ""+ echo " VITE v5.4.2 ready in 342 ms"+ echo ""+ echo " ➜ Local: http://localhost:$port/"+ echo " ➜ Network: http://192.168.1.42:$port/"+fidiff --git a/docs/demos/out/.demo-wt-core/remote.git/HEAD b/docs/demos/out/.demo-wt-core/remote.git/HEADnew file mode 100644index 000000000..b870d8262--- /dev/null+++ b/docs/demos/out/.demo-wt-core/remote.git/HEAD@@ -0,0 +1 @@+ref: refs/heads/maindiff --git a/docs/demos/out/.demo-wt-core/remote.git/config b/docs/demos/out/.demo-wt-core/remote.git/confignew file mode 100644index 000000000..e6da23157--- /dev/null+++ b/docs/demos/out/.demo-wt-core/remote.git/config@@ -0,0 +1,6 @@+[core]+ repositoryformatversion = 0+ filemode = true+ bare = true+ ignorecase = true+ precomposeunicode = truediff --git a/docs/demos/out/.demo-wt-core/remote.git/description b/docs/demos/out/.demo-wt-core/remote.git/descriptionnew file mode 100644index 000000000..498b267a8--- /dev/null+++ b/docs/demos/out/.demo-wt-core/remote.git/description@@ -0,0 +1 @@+Unnamed repository; edit this file 'description' to name the repository.diff --git a/docs/demos/out/.demo-wt-core/remote.git/hooks/applypatch-msg.sample b/docs/demos/out/.demo-wt-core/remote.git/hooks/applypatch-msg.samplenew file mode 100755index 000000000..a5d7b84a6--- /dev/null+++ b/docs/demos/out/.demo-wt-core/remote.git/hooks/applypatch-msg.sample@@ -0,0 +1,15 @@+#!/bin/sh+#+# An example hook script to check the commit log message taken by+# applypatch from an e-mail message.+#+# The hook should exit with non-zero status after issuing an+# appropriate message if it wants to stop the commit. The hook is+# allowed to edit the commit message file.+#+# To enable this hook, rename this file to "applypatch-msg".++. git-sh-setup+commitmsg="$(git rev-parse --git-path hooks/commit-msg)"+test -x "$commitmsg" && exec "$commitmsg" ${1+"$@"}+:diff --git a/docs/demos/out/.demo-wt-core/remote.git/hooks/commit-msg.sample b/docs/demos/out/.demo-wt-core/remote.git/hooks/commit-msg.samplenew file mode 100755index 000000000..b58d1184a--- /dev/null+++ b/docs/demos/out/.demo-wt-core/remote.git/hooks/commit-msg.sample@@ -0,0 +1,24 @@+#!/bin/sh+#+# An example hook script to check the commit log message.+# Called by "git commit" with one argument, the name of the file+# that has the commit message. The hook should exit with non-zero+# status after issuing an appropriate message if it wants to stop the+# commit. The hook is allowed to edit the commit message file.+#+# To enable this hook, rename this file to "commit-msg".++# Uncomment the below to add a Signed-off-by line to the message.+# Doing this in a hook is a bad idea in general, but the prepare-commit-msg+# hook is more suited to it.+#+# SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p')+# grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1"++# This example catches duplicate Signed-off-by lines.++test "" = "$(grep '^Signed-off-by: ' "$1" |+ sort | uniq -c | sed -e '/^[ ]*1[ ]/d')" || {+ echo >&2 Duplicate Signed-off-by lines.+ exit 1+}diff --git a/docs/demos/out/.demo-wt-core/remote.git/hooks/fsmonitor-watchman.sample b/docs/demos/out/.demo-wt-core/remote.git/hooks/fsmonitor-watchman.samplenew file mode 100755index 000000000..23e856f5d--- /dev/null+++ b/docs/demos/out/.demo-wt-core/remote.git/hooks/fsmonitor-watchman.sample@@ -0,0 +1,174 @@+#!/usr/bin/perl++use strict;+use warnings;+use IPC::Open2;++# An example hook script to integrate Watchman+# (https://facebook.github.io/watchman/) with git to speed up detecting+# new and modified files.+#+# The hook is passed a version (currently 2) and last update token+# formatted as a string and outputs to stdout a new update token and+# all files that have been modified since the update token. Paths must+# be relative to the root of the working tree and separated by a single NUL.+#+# To enable this hook, rename this file to "query-watchman" and set+# 'git config core.fsmonitor .git/hooks/query-watchman'+#+my ($version, $last_update_token) = @ARGV;++# Uncomment for debugging+# print STDERR "$0 $version $last_update_token\n";++# Check the hook interface version+if ($version ne 2) {+ die "Unsupported query-fsmonitor hook version '$version'.\n" .+ "Falling back to scanning...\n";+}++my $git_work_tree = get_working_dir();++my $retry = 1;++my $json_pkg;+eval {+ require JSON::XS;+ $json_pkg = "JSON::XS";+ 1;+} or do {+ require JSON::PP;+ $json_pkg = "JSON::PP";+};++launch_watchman();++sub launch_watchman {+ my $o = watchman_query();+ if (is_work_tree_watched($o)) {+ output_result($o->{clock}, @{$o->{files}});+ }+}++sub output_result {+ my ($clockid, @files) = @_;++ # Uncomment for debugging watchman output+ # open (my $fh, ">", ".git/watchman-output.out");+ # binmode $fh, ":utf8";+ # print $fh "$clockid\n@files\n";+ # close $fh;++ binmode STDOUT, ":utf8";+ print $clockid;+ print "\0";+ local $, = "\0";+ print @files;+}++sub watchman_clock {+ my $response = qx/watchman clock "$git_work_tree"/;+ die "Failed to get clock id on '$git_work_tree'.\n" .+ "Falling back to scanning...\n" if $? != 0;++ return $json_pkg->new->utf8->decode($response);+}++sub watchman_query {+ my $pid = open2(\*CHLD_OUT, \*CHLD_IN, 'watchman -j --no-pretty')+ or die "open2() failed: $!\n" .+ "Falling back to scanning...\n";++ # In the query expression below we're asking for names of files that+ # changed since $last_update_token but not from the .git folder.+ #+ # To accomplish this, we're using the "since" generator to use the+ # recency index to select candidate nodes and "fields" to limit the+ # output to file names only. Then we're using the "expression" term to+ # further constrain the results.+ my $last_update_line = "";+ if (substr($last_update_token, 0, 1) eq "c") {+ $last_update_token = "\"$last_update_token\"";+ $last_update_line = qq[\n"since": $last_update_token,];+ }+ my $query = <<" END";+ ["query", "$git_work_tree", {$last_update_line+ "fields": ["name"],+ "expression": ["not", ["dirname", ".git"]]+ }]+ END++ # Uncomment for debugging the watchman query+ # open (my $fh, ">", ".git/watchman-query.json");+ # print $fh $query;+ # close $fh;++ print CHLD_IN $query;+ close CHLD_IN;+ my $response = do {local $/; <CHLD_OUT>};++ # Uncomment for debugging the watch response+ # open ($fh, ">", ".git/watchman-response.json");+ # print $fh $response;+ # close $fh;++ die "Watchman: command returned no output.\n" .+ "Falling back to scanning...\n" if $response eq "";+ die "Watchman: command returned invalid output: $response\n" .+ "Falling back to scanning...\n" unless $response =~ /^\{/;++ return $json_pkg->new->utf8->decode($response);+}++sub is_work_tree_watched {+ my ($output) = @_;+ my $error = $output->{error};+ if ($retry > 0 and $error and $error =~ m/unable to resolve root .* directory (.*) is not watched/) {+ $retry--;+ my $response = qx/watchman watch "$git_work_tree"/;+ die "Failed to make watchman watch '$git_work_tree'.\n" .+ "Falling back to scanning...\n" if $? != 0;+ $output = $json_pkg->new->utf8->decode($response);+ $error = $output->{error};+ die "Watchman: $error.\n" .+ "Falling back to scanning...\n" if $error;++ # Uncomment for debugging watchman output+ # open (my $fh, ">", ".git/watchman-output.out");+ # close $fh;++ # Watchman will always return all files on the first query so+ # return the fast "everything is dirty" flag to git and do the+ # Watchman query just to get it over with now so we won't pay+ # the cost in git to look up each individual file.+ my $o = watchman_clock();+ $error = $output->{error};++ die "Watchman: $error.\n" .+ "Falling back to scanning...\n" if $error;++ output_result($o->{clock}, ("/"));+ $last_update_token = $o->{clock};++ eval { launch_watchman() };+ return 0;+ }++ die "Watchman: $error.\n" .+ "Falling back to scanning...\n" if $error;++ return 1;+}++sub get_working_dir {+ my $working_dir;+ if ($^O =~ 'msys' || $^O =~ 'cygwin') {+ $working_dir = Win32::GetCwd();+ $working_dir =~ tr/\\/\//;+ } else {+ require Cwd;+ $working_dir = Cwd::cwd();+ }++ return $working_dir;+}diff --git a/docs/demos/out/.demo-wt-core/remote.git/hooks/post-update.sample b/docs/demos/out/.demo-wt-core/remote.git/hooks/post-update.samplenew file mode 100755index 000000000..ec17ec193--- /dev/null+++ b/docs/demos/out/.demo-wt-core/remote.git/hooks/post-update.sample@@ -0,0 +1,8 @@+#!/bin/sh+#+# An example hook script to prepare a packed repository for use over+# dumb transports.+#+# To enable this hook, rename this file to "post-update".++exec git update-server-infodiff --git a/docs/demos/out/.demo-wt-core/remote.git/hooks/pre-applypatch.sample b/docs/demos/out/.demo-wt-core/remote.git/hooks/pre-applypatch.samplenew file mode 100755index 000000000..4142082bc--- /dev/null+++ b/docs/demos/out/.demo-wt-core/remote.git/hooks/pre-applypatch.sample@@ -0,0 +1,14 @@+#!/bin/sh+#+# An example hook script to verify what is about to be committed+# by applypatch from an e-mail message.+#+# The hook should exit with non-zero status after issuing an+# appropriate message if it wants to stop the commit.+#+# To enable this hook, rename this file to "pre-applypatch".++. git-sh-setup+precommit="$(git rev-parse --git-path hooks/pre-commit)"+test -x "$precommit" && exec "$precommit" ${1+"$@"}+:diff --git a/docs/demos/out/.demo-wt-core/remote.git/hooks/pre-commit.sample b/docs/demos/out/.demo-wt-core/remote.git/hooks/pre-commit.samplenew file mode 100755index 000000000..29ed5ee48--- /dev/null+++ b/docs/demos/out/.demo-wt-core/remote.git/hooks/pre-commit.sample@@ -0,0 +1,49 @@+#!/bin/sh+#+# An example hook script to verify what is about to be committed.+# Called by "git commit" with no arguments. The hook should+# exit with non-zero status after issuing an appropriate message if+# it wants to stop the commit.+#+# To enable this hook, rename this file to "pre-commit".++if git rev-parse --verify HEAD >/dev/null 2>&1+then+ against=HEAD+else+ # Initial commit: diff against an empty tree object+ against=$(git hash-object -t tree /dev/null)+fi++# If you want to allow non-ASCII filenames set this variable to true.+allownonascii=$(git config --type=bool hooks.allownonascii)++# Redirect output to stderr.+exec 1>&2++# Cross platform projects tend to avoid non-ASCII filenames; prevent+# them from being added to the repository. We exploit the fact that the+# printable range starts at the space character and ends with tilde.+if [ "$allownonascii" != "true" ] &&+ # Note that the use of brackets around a tr range is ok here, (it's+ # even required, for portability to Solaris 10's /usr/bin/tr), since+ # the square bracket bytes happen to fall in the designated range.+ test $(git diff-index --cached --name-only --diff-filter=A -z $against |+ LC_ALL=C tr -d '[ -~]\0' | wc -c) != 0+then+ cat <<\EOF+Error: Attempt to add a non-ASCII file name.++This can cause problems if you want to work with people on other platforms.++To be portable it is advisable to rename the file.++If you know what you are doing you can disable this check using:++ git config hooks.allownonascii true+EOF+ exit 1+fi++# If there are whitespace errors, print the offending file names and fail.+exec git diff-index --check --cached $against --diff --git a/docs/demos/out/.demo-wt-core/remote.git/hooks/pre-merge-commit.sample b/docs/demos/out/.demo-wt-core/remote.git/hooks/pre-merge-commit.samplenew file mode 100755index 000000000..399eab192--- /dev/null+++ b/docs/demos/out/.demo-wt-core/remote.git/hooks/pre-merge-commit.sample@@ -0,0 +1,13 @@+#!/bin/sh+#+# An example hook script to verify what is about to be committed.+# Called by "git merge" with no arguments. The hook should+# exit with non-zero status after issuing an appropriate message to+# stderr if it wants to stop the merge commit.+#+# To enable this hook, rename this file to "pre-merge-commit".++. git-sh-setup+test -x "$GIT_DIR/hooks/pre-commit" &&+ exec "$GIT_DIR/hooks/pre-commit"+:diff --git a/docs/demos/out/.demo-wt-core/remote.git/hooks/pre-push.sample b/docs/demos/out/.demo-wt-core/remote.git/hooks/pre-push.samplenew file mode 100755index 000000000..4ce688d32--- /dev/null+++ b/docs/demos/out/.demo-wt-core/remote.git/hooks/pre-push.sample@@ -0,0 +1,53 @@+#!/bin/sh++# An example hook script to verify what is about to be pushed. Called by "git+# push" after it has checked the remote status, but before anything has been+# pushed. If this script exits with a non-zero status nothing will be pushed.+#+# This hook is called with the following parameters:+#+# $1 -- Name of the remote to which the push is being done+# $2 -- URL to which the push is being done+#+# If pushing without using a named remote those arguments will be equal.+#+# Information about the commits which are being pushed is supplied as lines to+# the standard input in the form:+#+# <local ref> <local oid> <remote ref> <remote oid>+#+# This sample shows how to prevent push of commits where the log message starts+# with "WIP" (work in progress).++remote="$1"+url="$2"++zero=$(git hash-object --stdin </dev/null | tr '[0-9a-f]' '0')++while read local_ref local_oid remote_ref remote_oid+do+ if test "$local_oid" = "$zero"+ then+ # Handle delete+ :+ else+ if test "$remote_oid" = "$zero"+ then+ # New branch, examine all commits+ range="$local_oid"+ else+ # Update to existing branch, examine new commits+ range="$remote_oid..$local_oid"+ fi++ # Check for WIP commit+ commit=$(git rev-list -n 1 --grep '^WIP' "$range")+ if test -n "$commit"+ then+ echo >&2 "Found WIP commit in $local_ref, not pushing"+ exit 1+ fi+ fi+done++exit 0diff --git a/docs/demos/out/.demo-wt-core/remote.git/hooks/pre-rebase.sample b/docs/demos/out/.demo-wt-core/remote.git/hooks/pre-rebase.samplenew file mode 100755index 000000000..6cbef5c37--- /dev/null+++ b/docs/demos/out/.demo-wt-core/remote.git/hooks/pre-rebase.sample@@ -0,0 +1,169 @@+#!/bin/sh+#+# Copyright (c) 2006, 2008 Junio C Hamano+#+# The "pre-rebase" hook is run just before "git rebase" starts doing+# its job, and can prevent the command from running by exiting with+# non-zero status.+#+# The hook is called with the following parameters:+#+# $1 -- the upstream the series was forked from.+# $2 -- the branch being rebased (or empty when rebasing the current branch).+#+# This sample shows how to prevent topic branches that are already+# merged to 'next' branch from getting rebased, because allowing it+# would result in rebasing already published history.++publish=next+basebranch="$1"+if test "$#" = 2+then+ topic="refs/heads/$2"+else+ topic=`git symbolic-ref HEAD` ||+ exit 0 ;# we do not interrupt rebasing detached HEAD+fi++case "$topic" in+refs/heads/??/*)+ ;;+*)+ exit 0 ;# we do not interrupt others.+ ;;+esac++# Now we are dealing with a topic branch being rebased+# on top of master. Is it OK to rebase it?++# Does the topic really exist?+git show-ref -q "$topic" || {+ echo >&2 "No such branch $topic"+ exit 1+}++# Is topic fully merged to master?+not_in_master=`git rev-list --pretty=oneline ^master "$topic"`+if test -z "$not_in_master"+then+ echo >&2 "$topic is fully merged to master; better remove it."+ exit 1 ;# we could allow it, but there is no point.+fi++# Is topic ever merged to next? If so you should not be rebasing it.+only_next_1=`git rev-list ^master "^$topic" ${publish} | sort`+only_next_2=`git rev-list ^master ${publish} | sort`+if test "$only_next_1" = "$only_next_2"+then+ not_in_topic=`git rev-list "^$topic" master`+ if test -z "$not_in_topic"+ then+ echo >&2 "$topic is already up to date with master"+ exit 1 ;# we could allow it, but there is no point.+ else+ exit 0+ fi+else+ not_in_next=`git rev-list --pretty=oneline ^${publish} "$topic"`+ /usr/bin/perl -e '+ my $topic = $ARGV[0];+ my $msg = "* $topic has commits already merged to public branch:\n";+ my (%not_in_next) = map {+ /^([0-9a-f]+) /;+ ($1 => 1);+ } split(/\n/, $ARGV[1]);+ for my $elem (map {+ /^([0-9a-f]+) (.*)$/;+ [$1 => $2];+ } split(/\n/, $ARGV[2])) {+ if (!exists $not_in_next{$elem->[0]}) {+ if ($msg) {+ print STDERR $msg;+ undef $msg;+ }+ print STDERR " $elem->[1]\n";+ }+ }+ ' "$topic" "$not_in_next" "$not_in_master"+ exit 1+fi++<<\DOC_END++This sample hook safeguards topic branches that have been+published from being rewound.++The workflow assumed here is:++ * Once a topic branch forks from "master", "master" is never+ merged into it again (either directly or indirectly).++ * Once a topic branch is fully cooked and merged into "master",+ it is deleted. If you need to build on top of it to correct+ earlier mistakes, a new topic branch is created by forking at+ the tip of the "master". This is not strictly necessary, but+ it makes it easier to keep your history simple.++ * Whenever you need to test or publish your changes to topic+ branches, merge them into "next" branch.++The script, being an example, hardcodes the publish branch name+to be "next", but it is trivial to make it configurable via+$GIT_DIR/config mechanism.++With this workflow, you would want to know:++(1) ... if a topic branch has ever been merged to "next". Young+ topic branches can have stupid mistakes you would rather+ clean up before publishing, and things that have not been+ merged into other branches can be easily rebased without+ affecting other people. But once it is published, you would+ not want to rewind it.++(2) ... if a topic branch has been fully merged to "master".+ Then you can delete it. More importantly, you should not+ build on top of it -- other people may already want to+ change things related to the topic as patches against your+ "master", so if you need further changes, it is better to+ fork the topic (perhaps with the same name) afresh from the+ tip of "master".++Let's look at this example:++ o---o---o---o---o---o---o---o---o---o "next"+ / / / /+ / a---a---b A / /+ / / / /+ / / c---c---c---c B /+ / / / \ /+ / / / b---b C \ /+ / / / / \ /+ ---o---o---o---o---o---o---o---o---o---o---o "master"+++A, B and C are topic branches.++ * A has one fix since it was merged up to "next".++ * B has finished. It has been fully merged up to "master" and "next",+ and is ready to be deleted.++ * C has not merged to "next" at all.++We would want to allow C to be rebased, refuse A, and encourage+B to be deleted.++To compute (1):++ git rev-list ^master ^topic next+ git rev-list ^master next++ if these match, topic has not merged in next at all.++To compute (2):++ git rev-list master..topic++ if this is empty, it is fully merged to "master".++DOC_ENDdiff --git a/docs/demos/out/.demo-wt-core/remote.git/hooks/pre-receive.sample b/docs/demos/out/.demo-wt-core/remote.git/hooks/pre-receive.samplenew file mode 100755index 000000000..a1fd29ec1--- /dev/null+++ b/docs/demos/out/.demo-wt-core/remote.git/hooks/pre-receive.sample@@ -0,0 +1,24 @@+#!/bin/sh+#+# An example hook script to make use of push options.+# The example simply echoes all push options that start with 'echoback='+# and rejects all pushes when the "reject" push option is used.+#+# To enable this hook, rename this file to "pre-receive".++if test -n "$GIT_PUSH_OPTION_COUNT"+then+ i=0+ while test "$i" -lt "$GIT_PUSH_OPTION_COUNT"+ do+ eval "value=\$GIT_PUSH_OPTION_$i"+ case "$value" in+ echoback=*)+ echo "echo from the pre-receive-hook: ${value#*=}" >&2+ ;;+ reject)+ exit 1+ esac+ i=$((i + 1))+ done+fidiff --git a/docs/demos/out/.demo-wt-core/remote.git/hooks/prepare-commit-msg.sample b/docs/demos/out/.demo-wt-core/remote.git/hooks/prepare-commit-msg.samplenew file mode 100755index 000000000..10fa14c5a--- /dev/null+++ b/docs/demos/out/.demo-wt-core/remote.git/hooks/prepare-commit-msg.sample@@ -0,0 +1,42 @@+#!/bin/sh+#+# An example hook script to prepare the commit log message.+# Called by "git commit" with the name of the file that has the+# commit message, followed by the description of the commit+# message's source. The hook's purpose is to edit the commit+# message file. If the hook fails with a non-zero status,+# the commit is aborted.+#+# To enable this hook, rename this file to "prepare-commit-msg".++# This hook includes three examples. The first one removes the+# "# Please enter the commit message..." help message.+#+# The second includes the output of "git diff --name-status -r"+# into the message, just before the "git status" output. It is+# commented because it doesn't cope with --amend or with squashed+# commits.+#+# The third example adds a Signed-off-by line to the message, that can+# still be edited. This is rarely a good idea.++COMMIT_MSG_FILE=$1+COMMIT_SOURCE=$2+SHA1=$3++/usr/bin/perl -i.bak -ne 'print unless(m/^. Please enter the commit message/..m/^#$/)' "$COMMIT_MSG_FILE"++# case "$COMMIT_SOURCE,$SHA1" in+# ,|template,)+# /usr/bin/perl -i.bak -pe '+# print "\n" . `git diff --cached --name-status -r`+# if /^#/ && $first++ == 0' "$COMMIT_MSG_FILE" ;;+# *) ;;+# esac++# SOB=$(git var GIT_COMMITTER_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p')+# git interpret-trailers --in-place --trailer "$SOB" "$COMMIT_MSG_FILE"+# if test -z "$COMMIT_SOURCE"+# then+# /usr/bin/perl -i.bak -pe 'print "\n" if !$first_line++' "$COMMIT_MSG_FILE"+# fidiff --git a/docs/demos/out/.demo-wt-core/remote.git/hooks/push-to-checkout.sample b/docs/demos/out/.demo-wt-core/remote.git/hooks/push-to-checkout.samplenew file mode 100755index 000000000..af5a0c001--- /dev/null+++ b/docs/demos/out/.demo-wt-core/remote.git/hooks/push-to-checkout.sample@@ -0,0 +1,78 @@+#!/bin/sh++# An example hook script to update a checked-out tree on a git push.+#+# This hook is invoked by git-receive-pack(1) when it reacts to git+# push and updates reference(s) in its repository, and when the push+# tries to update the branch that is currently checked out and the+# receive.denyCurrentBranch configuration variable is set to+# updateInstead.+#+# By default, such a push is refused if the working tree and the index+# of the remote repository has any difference from the currently+# checked out commit; when both the working tree and the index match+# the current commit, they are updated to match the newly pushed tip+# of the branch. This hook is to be used to override the default+# behaviour; however the code below reimplements the default behaviour+# as a starting point for convenient modification.+#+# The hook receives the commit with which the tip of the current+# branch is going to be updated:+commit=$1++# It can exit with a non-zero status to refuse the push (when it does+# so, it must not modify the index or the working tree).+die () {+ echo >&2 "$*"+ exit 1+}++# Or it can make any necessary changes to the working tree and to the+# index to bring them to the desired state when the tip of the current+# branch is updated to the new commit, and exit with a zero status.+#+# For example, the hook can simply run git read-tree -u -m HEAD "$1"+# in order to emulate git fetch that is run in the reverse direction+# with git push, as the two-tree form of git read-tree -u -m is+# essentially the same as git switch or git checkout that switches+# branches while keeping the local changes in the working tree that do+# not interfere with the difference between the branches.++# The below is a more-or-less exact translation to shell of the C code+# for the default behaviour for git's push-to-checkout hook defined in+# the push_to_deploy() function in builtin/receive-pack.c.+#+# Note that the hook will be executed from the repository directory,+# not from the working tree, so if you want to perform operations on+# the working tree, you will have to adapt your code accordingly, e.g.+# by adding "cd .." or using relative paths.++if ! git update-index -q --ignore-submodules --refresh+then+ die "Up-to-date check failed"+fi++if ! git diff-files --quiet --ignore-submodules --+then+ die "Working directory has unstaged changes"+fi++# This is a rough translation of:+#+# head_has_history() ? "HEAD" : EMPTY_TREE_SHA1_HEX+if git cat-file -e HEAD 2>/dev/null+then+ head=HEAD+else+ head=$(git hash-object -t tree --stdin </dev/null)+fi++if ! git diff-index --quiet --cached --ignore-submodules $head --+then+ die "Working directory has staged changes"+fi++if ! git read-tree -u -m "$commit"+then+ die "Could not update working tree to new HEAD"+fidiff --git a/docs/demos/out/.demo-wt-core/remote.git/hooks/sendemail-validate.sample b/docs/demos/out/.demo-wt-core/remote.git/hooks/sendemail-validate.samplenew file mode 100755index 000000000..640bcf874--- /dev/null+++ b/docs/demos/out/.demo-wt-core/remote.git/hooks/sendemail-validate.sample@@ -0,0 +1,77 @@+#!/bin/sh++# An example hook script to validate a patch (and/or patch series) before+# sending it via email.+#+# The hook should exit with non-zero status after issuing an appropriate+# message if it wants to prevent the email(s) from being sent.+#+# To enable this hook, rename this file to "sendemail-validate".+#+# By default, it will only check that the patch(es) can be applied on top of+# the default upstream branch without conflicts in a secondary worktree. After+# validation (successful or not) of the last patch of a series, the worktree+# will be deleted.+#+# The following config variables can be set to change the default remote and+# remote ref that are used to apply the patches against:+#+# sendemail.validateRemote (default: origin)+# sendemail.validateRemoteRef (default: HEAD)+#+# Replace the TODO placeholders with appropriate checks according to your+# needs.++validate_cover_letter () {+ file="$1"+ # TODO: Replace with appropriate checks (e.g. spell checking).+ true+}++validate_patch () {+ file="$1"+ # Ensure that the patch applies without conflicts.+ git am -3 "$file" || return+ # TODO: Replace with appropriate checks for this patch+ # (e.g. checkpatch.pl).+ true+}++validate_series () {+ # TODO: Replace with appropriate checks for the whole series+ # (e.g. quick build, coding style checks, etc.).+ true+}++# main -------------------------------------------------------------------------++if test "$GIT_SENDEMAIL_FILE_COUNTER" = 1+then+ remote=$(git config --default origin --get sendemail.validateRemote) &&+ ref=$(git config --default HEAD --get sendemail.validateRemoteRef) &&+ worktree=$(mktemp --tmpdir -d sendemail-validate.XXXXXXX) &&+ git worktree add -fd --checkout "$worktree" "refs/remotes/$remote/$ref" &&+ git config --replace-all sendemail.validateWorktree "$worktree"+else+ worktree=$(git config --get sendemail.validateWorktree)+fi || {+ echo "sendemail-validate: error: failed to prepare worktree" >&2+ exit 1+}++unset GIT_DIR GIT_WORK_TREE+cd "$worktree" &&++if grep -q "^diff --git " "$1"+then+ validate_patch "$1"+else+ validate_cover_letter "$1"+fi &&++if test "$GIT_SENDEMAIL_FILE_COUNTER" = "$GIT_SENDEMAIL_FILE_TOTAL"+then+ git config --unset-all sendemail.validateWorktree &&+ trap 'git worktree remove -ff "$worktree"' EXIT &&+ validate_series+fidiff --git a/docs/demos/out/.demo-wt-core/remote.git/hooks/update.sample b/docs/demos/out/.demo-wt-core/remote.git/hooks/update.samplenew file mode 100755index 000000000..c4d426bc6--- /dev/null+++ b/docs/demos/out/.demo-wt-core/remote.git/hooks/update.sample@@ -0,0 +1,128 @@+#!/bin/sh+#+# An example hook script to block unannotated tags from entering.+# Called by "git receive-pack" with arguments: refname sha1-old sha1-new+#+# To enable this hook, rename this file to "update".+#+# Config+# ------+# hooks.allowunannotated+# This boolean sets whether unannotated tags will be allowed into the+# repository. By default they won't be.+# hooks.allowdeletetag+# This boolean sets whether deleting tags will be allowed in the+# repository. By default they won't be.+# hooks.allowmodifytag+# This boolean sets whether a tag may be modified after creation. By default+# it won't be.+# hooks.allowdeletebranch+# This boolean sets whether deleting branches will be allowed in the+# repository. By default they won't be.+# hooks.denycreatebranch+# This boolean sets whether remotely creating branches will be denied+# in the repository. By default this is allowed.+#++# --- Command line+refname="$1"+oldrev="$2"+newrev="$3"++# --- Safety check+if [ -z "$GIT_DIR" ]; then+ echo "Don't run this script from the command line." >&2+ echo " (if you want, you could supply GIT_DIR then run" >&2+ echo " $0 <ref> <oldrev> <newrev>)" >&2+ exit 1+fi++if [ -z "$refname" -o -z "$oldrev" -o -z "$newrev" ]; then+ echo "usage: $0 <ref> <oldrev> <newrev>" >&2+ exit 1+fi++# --- Config+allowunannotated=$(git config --type=bool hooks.allowunannotated)+allowdeletebranch=$(git config --type=bool hooks.allowdeletebranch)+denycreatebranch=$(git config --type=bool hooks.denycreatebranch)+allowdeletetag=$(git config --type=bool hooks.allowdeletetag)+allowmodifytag=$(git config --type=bool hooks.allowmodifytag)++# check for no description+projectdesc=$(sed -e '1q' "$GIT_DIR/description")+case "$projectdesc" in+"Unnamed repository"* | "")+ echo "*** Project description file hasn't been set" >&2+ exit 1+ ;;+esac++# --- Check types+# if $newrev is 0000...0000, it's a commit to delete a ref.+zero=$(git hash-object --stdin </dev/null | tr '[0-9a-f]' '0')+if [ "$newrev" = "$zero" ]; then+ newrev_type=delete+else+ newrev_type=$(git cat-file -t $newrev)+fi++case "$refname","$newrev_type" in+ refs/tags/*,commit)+ # un-annotated tag+ short_refname=${refname##refs/tags/}+ if [ "$allowunannotated" != "true" ]; then+ echo "*** The un-annotated tag, $short_refname, is not allowed in this repository" >&2+ echo "*** Use 'git tag [ -a | -s ]' for tags you want to propagate." >&2+ exit 1+ fi+ ;;+ refs/tags/*,delete)+ # delete tag+ if [ "$allowdeletetag" != "true" ]; then+ echo "*** Deleting a tag is not allowed in this repository" >&2+ exit 1+ fi+ ;;+ refs/tags/*,tag)+ # annotated tag+ if [ "$allowmodifytag" != "true" ] && git rev-parse $refname > /dev/null 2>&1+ then+ echo "*** Tag '$refname' already exists." >&2+ echo "*** Modifying a tag is not allowed in this repository." >&2+ exit 1+ fi+ ;;+ refs/heads/*,commit)+ # branch+ if [ "$oldrev" = "$zero" -a "$denycreatebranch" = "true" ]; then+ echo "*** Creating a branch is not allowed in this repository" >&2+ exit 1+ fi+ ;;+ refs/heads/*,delete)+ # delete branch+ if [ "$allowdeletebranch" != "true" ]; then+ echo "*** Deleting a branch is not allowed in this repository" >&2+ exit 1+ fi+ ;;+ refs/remotes/*,commit)+ # tracking branch+ ;;+ refs/remotes/*,delete)+ # delete tracking branch+ if [ "$allowdeletebranch" != "true" ]; then+ echo "*** Deleting a tracking branch is not allowed in this repository" >&2+ exit 1+ fi+ ;;+ *)+ # Anything else (is there anything else?)+ echo "*** Update hook: unknown type of update to ref $refname of type $newrev_type" >&2+ exit 1+ ;;+esac++# --- Finished+exit 0diff --git a/docs/demos/out/.demo-wt-core/remote.git/info/exclude b/docs/demos/out/.demo-wt-core/remote.git/info/excludenew file mode 100644index 000000000..a5196d1be--- /dev/null+++ b/docs/demos/out/.demo-wt-core/remote.git/info/exclude@@ -0,0 +1,6 @@+# git ls-files --others --exclude-from=.git/info/exclude+# Lines that start with '#' are comments.+# For a project mostly in C, the following would be a good set of+# exclude patterns (uncomment them if you want to use them):+# *.[oa]+# *~diff --git a/docs/demos/out/.demo-wt-core/remote.git/objects/00/8ca9a1dd04f4f90cdeb765549123d07449aceb b/docs/demos/out/.demo-wt-core/remote.git/objects/00/8ca9a1dd04f4f90cdeb765549123d07449acebnew file mode 100644index 000000000..f774a71b2--- /dev/null+++ b/docs/demos/out/.demo-wt-core/remote.git/objects/00/8ca9a1dd04f4f90cdeb765549123d07449aceb@@ -0,0 +1,4 @@+x��K+�0EgoJ>�I*"+�Љ�����4%���[���8p���ҫ�T���0+�.�䬉��T�Z�>&�5CJ���*�U�s)�!�I�`�hK�{>(�~@3 gn��\���X�2��Q�p��^hui~�!�ta��ZK)a�-�l���J�,��9���"��kw���RJQ\ No newline at end of filediff --git a/docs/demos/out/.demo-wt-core/remote.git/objects/17/e0f0dedfdc83c924c6399a21434fc8240f488c b/docs/demos/out/.demo-wt-core/remote.git/objects/17/e0f0dedfdc83c924c6399a21434fc8240f488cnew file mode 100644index 000000000..5c1b79f6fBinary files /dev/null and b/docs/demos/out/.demo-wt-core/remote.git/objects/17/e0f0dedfdc83c924c6399a21434fc8240f488c differdiff --git a/docs/demos/out/.demo-wt-core/remote.git/objects/1c/f4178f6ffa1b701711e54d2ec5cbda1f1f4779 b/docs/demos/out/.demo-wt-core/remote.git/objects/1c/f4178f6ffa1b701711e54d2ec5cbda1f1f4779new file mode 100644index 000000000..2aa94cb18--- /dev/null+++ b/docs/demos/out/.demo-wt-core/remote.git/objects/1c/f4178f6ffa1b701711e54d2ec5cbda1f1f4779@@ -0,0 +1 @@+x=��j�@D{�W���B��BJ���������ݕ�d���qM�͛�>r�Ǐ��[��eh�A��-K�Y�����; y��2��yƁ��B��4x�/����n$B-��T��9g�Q���H�k�\��*t��*?1�Z宻�甂UDՍ�[��=}���p[3ދajw4F��.��%��O�&�_�4���X(�z�r��)+\�?��`ad\ No newline at end of filediff --git a/docs/demos/out/.demo-wt-core/remote.git/objects/1e/465e6897c6eb81d28bef6c0cdc0e9d53e58a47 b/docs/demos/out/.demo-wt-core/remote.git/objects/1e/465e6897c6eb81d28bef6c0cdc0e9d53e58a47new file mode 100644index 000000000..6e0207dddBinary files /dev/null and b/docs/demos/out/.demo-wt-core/remote.git/objects/1e/465e6897c6eb81d28bef6c0cdc0e9d53e58a47 differdiff --git a/docs/demos/out/.demo-wt-core/remote.git/objects/29/7c40f9a2d6add8d26ec5adb789bfd75f6c1ef1 b/docs/demos/out/.demo-wt-core/remote.git/objects/29/7c40f9a2d6add8d26ec5adb789bfd75f6c1ef1new file mode 100644index 000000000..a11ac2b83Binary files /dev/null and b/docs/demos/out/.demo-wt-core/remote.git/objects/29/7c40f9a2d6add8d26ec5adb789bfd75f6c1ef1 differdiff --git a/docs/demos/out/.demo-wt-core/remote.git/objects/2f/9c39e591473f217c949b0ff7cf0697c52746dd b/docs/demos/out/.demo-wt-core/remote.git/objects/2f/9c39e591473f217c949b0ff7cf0697c52746ddnew file mode 100644index 000000000..31b806d8eBinary files /dev/null and b/docs/demos/out/.demo-wt-core/remote.git/objects/2f/9c39e591473f217c949b0ff7cf0697c52746dd differdiff --git a/docs/demos/out/.demo-wt-core/remote.git/objects/32/d475b1eb9793d27408e729155bde1b62fe110d b/docs/demos/out/.demo-wt-core/remote.git/objects/32/d475b1eb9793d27408e729155bde1b62fe110dnew file mode 100644index 000000000..e4116a557Binary files /dev/null and b/docs/demos/out/.demo-wt-core/remote.git/objects/32/d475b1eb9793d27408e729155bde1b62fe110d differdiff --git a/docs/demos/out/.demo-wt-core/remote.git/objects/33/fb53dd7081ef7219e54989f0ce36dad42c2758 b/docs/demos/out/.demo-wt-core/remote.git/objects/33/fb53dd7081ef7219e54989f0ce36dad42c2758new file mode 100644index 000000000..b5e036f9aBinary files /dev/null and b/docs/demos/out/.demo-wt-core/remote.git/objects/33/fb53dd7081ef7219e54989f0ce36dad42c2758 differdiff --git a/docs/demos/out/.demo-wt-core/remote.git/objects/43/9c1b92dcc74bd12f593cbecd8a5a3f44ba1049 b/docs/demos/out/.demo-wt-core/remote.git/objects/43/9c1b92dcc74bd12f593cbecd8a5a3f44ba1049new file mode 100644index 000000000..dec3c5225--- /dev/null+++ b/docs/demos/out/.demo-wt-core/remote.git/objects/43/9c1b92dcc74bd12f593cbecd8a5a3f44ba1049@@ -0,0 +1 @@+x=��j�0D{ޯ��sz�=�BJ!���@demKZ�]�߯��wf��Q���?u�}b��J���I��5�,H�(:K�NC�P�,V��`dg[a}!�:��耣Sۃ���ύm�W6��3�!q�������D���"�6�t�����5D�M���O6��1W�?�˖q��Ԯ0��r���}�d+a��4����[?�/gN]*\ No newline at end of filediff --git a/docs/demos/out/.demo-wt-core/remote.git/objects/48/32b02145e06e6ac7e768e0bb0f313bb0f47f40 b/docs/demos/out/.demo-wt-core/remote.git/objects/48/32b02145e06e6ac7e768e0bb0f313bb0f47f40new file mode 100644index 000000000..bf57d2222--- /dev/null+++ b/docs/demos/out/.demo-wt-core/remote.git/objects/48/32b02145e06e6ac7e768e0bb0f313bb0f47f40@@ -0,0 +1,2 @@+x��An� E��s�T��UU�C�03(����z��W��-����R�4���T!3:Fϓ��$��)b�8���e�g�Ǧ[���e.qFT'�����D����搓7����wmko�m���+�r𪿱���Z�����0#�1 �c=��K6R�y�(�?��{��~*��n� [ O�\ No newline at end of filediff --git a/docs/demos/out/.demo-wt-core/remote.git/objects/4d/1a4ad9ea87d1b7b65bc353924bcf7ce87fd131 b/docs/demos/out/.demo-wt-core/remote.git/objects/4d/1a4ad9ea87d1b7b65bc353924bcf7ce87fd131new file mode 100644index 000000000..4d0d6debeBinary files /dev/null and b/docs/demos/out/.demo-wt-core/remote.git/objects/4d/1a4ad9ea87d1b7b65bc353924bcf7ce87fd131 differdiff --git a/docs/demos/out/.demo-wt-core/remote.git/objects/59/e27be8e8c04d50ccf2eee1a71d03d8135b64e8 b/docs/demos/out/.demo-wt-core/remote.git/objects/59/e27be8e8c04d50ccf2eee1a71d03d8135b64e8new file mode 100644index 000000000..db39687b0Binary files /dev/null and b/docs/demos/out/.demo-wt-core/remote.git/objects/59/e27be8e8c04d50ccf2eee1a71d03d8135b64e8 differdiff --git a/docs/demos/out/.demo-wt-core/remote.git/objects/62/5c59a7349e15fc2a88a8bdac6a61cc827bee7e b/docs/demos/out/.demo-wt-core/remote.git/objects/62/5c59a7349e15fc2a88a8bdac6a61cc827bee7enew file mode 100644index 000000000..89e20d70dBinary files /dev/null and b/docs/demos/out/.demo-wt-core/remote.git/objects/62/5c59a7349e15fc2a88a8bdac6a61cc827bee7e differdiff --git a/docs/demos/out/.demo-wt-core/remote.git/objects/66/f26fab2fb8b9196cb1d6859ac05e81af65ef74 b/docs/demos/out/.demo-wt-core/remote.git/objects/66/f26fab2fb8b9196cb1d6859ac05e81af65ef74new file mode 100644index 000000000..468632bce--- /dev/null+++ b/docs/demos/out/.demo-wt-core/remote.git/objects/66/f26fab2fb8b9196cb1d6859ac05e81af65ef74@@ -0,0 +1,2 @@+x��K+1]�}%�I���u�����H̀�w���-�*x�j}���FƤ1NfJ�ͬ�c�BQ� JtއHꝻ,�+�w���H��$�S�T4��y�d�G��qon�?G_�'\�68����~ɁZ=��!`�Z�k�Zmt�8�Xq��23�$�G�1J\ No newline at end of filediff --git a/docs/demos/out/.demo-wt-core/remote.git/objects/68/abcb796d79118096bbf14738d04f5988bc2aab b/docs/demos/out/.demo-wt-core/remote.git/objects/68/abcb796d79118096bbf14738d04f5988bc2aabnew file mode 100644index 000000000..0ded910e6Binary files /dev/null and b/docs/demos/out/.demo-wt-core/remote.git/objects/68/abcb796d79118096bbf14738d04f5988bc2aab differdiff --git a/docs/demos/out/.demo-wt-core/remote.git/objects/6f/eac4301b277e865b732cccbcd17b8344cbdc1f b/docs/demos/out/.demo-wt-core/remote.git/objects/6f/eac4301b277e865b732cccbcd17b8344cbdc1fnew file mode 100644index 000000000..ffbdb36c1Binary files /dev/null and b/docs/demos/out/.demo-wt-core/remote.git/objects/6f/eac4301b277e865b732cccbcd17b8344cbdc1f differdiff --git a/docs/demos/out/.demo-wt-core/remote.git/objects/72/3732577b5c0c89e05473ba7478c7a64e14809d b/docs/demos/out/.demo-wt-core/remote.git/objects/72/3732577b5c0c89e05473ba7478c7a64e14809dnew file mode 100644index 000000000..2ff314cb5Binary files /dev/null and b/docs/demos/out/.demo-wt-core/remote.git/objects/72/3732577b5c0c89e05473ba7478c7a64e14809d differdiff --git a/docs/demos/out/.demo-wt-core/remote.git/objects/73/f8324283109fcb724b96d824b1eb4ad3ce6ded b/docs/demos/out/.demo-wt-core/remote.git/objects/73/f8324283109fcb724b96d824b1eb4ad3ce6dednew file mode 100644index 000000000..3f1e31646Binary files /dev/null and b/docs/demos/out/.demo-wt-core/remote.git/objects/73/f8324283109fcb724b96d824b1eb4ad3ce6ded differdiff --git a/docs/demos/out/.demo-wt-core/remote.git/objects/73/fe464a6bc121b7b0c2afaa7a67f6c3e14736d3 b/docs/demos/out/.demo-wt-core/remote.git/objects/73/fe464a6bc121b7b0c2afaa7a67f6c3e14736d3new file mode 100644index 000000000..1130055e9Binary files /dev/null and b/docs/demos/out/.demo-wt-core/remote.git/objects/73/fe464a6bc121b7b0c2afaa7a67f6c3e14736d3 differdiff --git a/docs/demos/out/.demo-wt-core/remote.git/objects/7f/39510493e1a490f986fd048759ac2dd64f58b7 b/docs/demos/out/.demo-wt-core/remote.git/objects/7f/39510493e1a490f986fd048759ac2dd64f58b7new file mode 100644index 000000000..45bb89825--- /dev/null+++ b/docs/demos/out/.demo-wt-core/remote.git/objects/7f/39510493e1a490f986fd048759ac2dd64f58b7@@ -0,0 +1,2 @@+x��K+�0@]�s%�6����wp=�LTjL )x|{7o����Zʫ��qכx;� �Ō�-�@aJĞ�a'�P�Ov�2�$�����<��b�6pԁp��Q��gmp�m�m��p�R�6��Keyˁk9�A�Fm �u�Zmv[��W�.)��ڣޕg��J\ No newline at end of filediff --git a/docs/demos/out/.demo-wt-core/remote.git/objects/8b/11cc85bcf00e5d6c4efc5f5c0e852b051f8fb7 b/docs/demos/out/.demo-wt-core/remote.git/objects/8b/11cc85bcf00e5d6c4efc5f5c0e852b051f8fb7new file mode 100644index 000000000..4ac1c4a3dBinary files /dev/null and b/docs/demos/out/.demo-wt-core/remote.git/objects/8b/11cc85bcf00e5d6c4efc5f5c0e852b051f8fb7 differdiff --git a/docs/demos/out/.demo-wt-core/remote.git/objects/9f/94b5ec486e8a15372bd0470a48fc7b9c69b3fe b/docs/demos/out/.demo-wt-core/remote.git/objects/9f/94b5ec486e8a15372bd0470a48fc7b9c69b3fenew file mode 100644index 000000000..27f001f04Binary files /dev/null and b/docs/demos/out/.demo-wt-core/remote.git/objects/9f/94b5ec486e8a15372bd0470a48fc7b9c69b3fe differdiff --git a/docs/demos/out/.demo-wt-core/remote.git/objects/a6/4e6b09a83c23e8157f6fc9e7fd8a2d9b5d40d1 b/docs/demos/out/.demo-wt-core/remote.git/objects/a6/4e6b09a83c23e8157f6fc9e7fd8a2d9b5d40d1new file mode 100644index 000000000..8852e6f1dBinary files /dev/null and b/docs/demos/out/.demo-wt-core/remote.git/objects/a6/4e6b09a83c23e8157f6fc9e7fd8a2d9b5d40d1 differdiff --git a/docs/demos/out/.demo-wt-core/remote.git/objects/b3/bcea66fd208cac0a71f55679729d02e275c517 b/docs/demos/out/.demo-wt-core/remote.git/objects/b3/bcea66fd208cac0a71f55679729d02e275c517new file mode 100644index 000000000..919711bdbBinary files /dev/null and b/docs/demos/out/.demo-wt-core/remote.git/objects/b3/bcea66fd208cac0a71f55679729d02e275c517 differdiff --git a/docs/demos/out/.demo-wt-core/remote.git/objects/b9/338e413a3607c70a8e59edba7f0da11b48cbb8 b/docs/demos/out/.demo-wt-core/remote.git/objects/b9/338e413a3607c70a8e59edba7f0da11b48cbb8new file mode 100644index 000000000..dd032e266Binary files /dev/null and b/docs/demos/out/.demo-wt-core/remote.git/objects/b9/338e413a3607c70a8e59edba7f0da11b48cbb8 differdiff --git a/docs/demos/out/.demo-wt-core/remote.git/objects/be/c56406a5cf15bfff01905976a37bb4446ee565 b/docs/demos/out/.demo-wt-core/remote.git/objects/be/c56406a5cf15bfff01905976a37bb4446ee565new file mode 100644index 000000000..e1315878d--- /dev/null+++ b/docs/demos/out/.demo-wt-core/remote.git/objects/be/c56406a5cf15bfff01905976a37bb4446ee565@@ -0,0 +1,2 @@+x��+�0;�+� �б_B�U�ed9P��{��-wå" �t��M��nQmqO�p��m���SC��D ����R�9��������M9(����p����Wy�t��A2������).\ No newline at end of filediff --git a/docs/demos/out/.demo-wt-core/remote.git/objects/c3/edf73deafea7c4f9ca6a5327df28c908a74b31 b/docs/demos/out/.demo-wt-core/remote.git/objects/c3/edf73deafea7c4f9ca6a5327df28c908a74b31new file mode 100644index 000000000..bc436614f--- /dev/null+++ b/docs/demos/out/.demo-wt-core/remote.git/objects/c3/edf73deafea7c4f9ca6a5327df28c908a74b31@@ -0,0 +1,3 @@+x��K��0��)� ��l� � �ɺ%��gd������y��+^n���������D�<�ĖiĈ4Q�c6�a��#%�P�Y���K�hS��2�<$ͨO�W�ɭu������O�������/���r��`""ꨭ���V;�/+�s)p�V���g����@x�U��cM�\ No newline at end of filediff --git a/docs/demos/out/.demo-wt-core/remote.git/objects/d4/05922f78b3b575f5c4ed721b1464be763680dd b/docs/demos/out/.demo-wt-core/remote.git/objects/d4/05922f78b3b575f5c4ed721b1464be763680ddnew file mode 100644index 000000000..5312da08fBinary files /dev/null and b/docs/demos/out/.demo-wt-core/remote.git/objects/d4/05922f78b3b575f5c4ed721b1464be763680dd differdiff --git a/docs/demos/out/.demo-wt-core/remote.git/objects/d8/90d887fd9149a3bd0dd79cfc7e8d18e735567c b/docs/demos/out/.demo-wt-core/remote.git/objects/d8/90d887fd9149a3bd0dd79cfc7e8d18e735567cnew file mode 100644index 000000000..a42316713Binary files /dev/null and b/docs/demos/out/.demo-wt-core/remote.git/objects/d8/90d887fd9149a3bd0dd79cfc7e8d18e735567c differdiff --git a/docs/demos/out/.demo-wt-core/remote.git/objects/db/ac7677606a36a1f12d46031e99d1c3a1d5e85a b/docs/demos/out/.demo-wt-core/remote.git/objects/db/ac7677606a36a1f12d46031e99d1c3a1d5e85anew file mode 100644index 000000000..7eb00b9beBinary files /dev/null and b/docs/demos/out/.demo-wt-core/remote.git/objects/db/ac7677606a36a1f12d46031e99d1c3a1d5e85a differdiff --git a/docs/demos/out/.demo-wt-core/remote.git/objects/e5/656ab6762101d8d4aace3c8b47190be14ac6d4 b/docs/demos/out/.demo-wt-core/remote.git/objects/e5/656ab6762101d8d4aace3c8b47190be14ac6d4new file mode 100644index 000000000..404ce7b9fBinary files /dev/null and b/docs/demos/out/.demo-wt-core/remote.git/objects/e5/656ab6762101d8d4aace3c8b47190be14ac6d4 differdiff --git a/docs/demos/out/.demo-wt-core/remote.git/objects/ea/8c4bf7f35f6f77f75d92ad8ce8349f6e81ddba b/docs/demos/out/.demo-wt-core/remote.git/objects/ea/8c4bf7f35f6f77f75d92ad8ce8349f6e81ddbanew file mode 100644index 000000000..50421f062Binary files /dev/null and b/docs/demos/out/.demo-wt-core/remote.git/objects/ea/8c4bf7f35f6f77f75d92ad8ce8349f6e81ddba differdiff --git a/docs/demos/out/.demo-wt-core/remote.git/objects/ef/353d723461be2ea9676afa5c9c1336775489ab b/docs/demos/out/.demo-wt-core/remote.git/objects/ef/353d723461be2ea9676afa5c9c1336775489abnew file mode 100644index 000000000..07f41d907Binary files /dev/null and b/docs/demos/out/.demo-wt-core/remote.git/objects/ef/353d723461be2ea9676afa5c9c1336775489ab differdiff --git a/docs/demos/out/.demo-wt-core/remote.git/objects/fc/05c07c61d8a3bd20272a0f2a430e2fccd699ed b/docs/demos/out/.demo-wt-core/remote.git/objects/fc/05c07c61d8a3bd20272a0f2a430e2fccd699ednew file mode 100644index 000000000..b2ad80f72Binary files /dev/null and b/docs/demos/out/.demo-wt-core/remote.git/objects/fc/05c07c61d8a3bd20272a0f2a430e2fccd699ed differdiff --git a/docs/demos/out/.demo-wt-core/remote.git/refs/heads/alpha b/docs/demos/out/.demo-wt-core/remote.git/refs/heads/alphanew file mode 100644index 000000000..85c916ec6--- /dev/null+++ b/docs/demos/out/.demo-wt-core/remote.git/refs/heads/alpha@@ -0,0 +1 @@+73f8324283109fcb724b96d824b1eb4ad3ce6deddiff --git a/docs/demos/out/.demo-wt-core/remote.git/refs/heads/beta b/docs/demos/out/.demo-wt-core/remote.git/refs/heads/betanew file mode 100644index 000000000..06201483b--- /dev/null+++ b/docs/demos/out/.demo-wt-core/remote.git/refs/heads/beta@@ -0,0 +1 @@+8b11cc85bcf00e5d6c4efc5f5c0e852b051f8fb7diff --git a/docs/demos/out/.demo-wt-core/remote.git/refs/heads/billing b/docs/demos/out/.demo-wt-core/remote.git/refs/heads/billingnew file mode 100644index 000000000..101dbcb47--- /dev/null+++ b/docs/demos/out/.demo-wt-core/remote.git/refs/heads/billing@@ -0,0 +1 @@+4832b02145e06e6ac7e768e0bb0f313bb0f47f40diff --git a/docs/demos/out/.demo-wt-core/remote.git/refs/heads/main b/docs/demos/out/.demo-wt-core/remote.git/refs/heads/mainnew file mode 100644index 000000000..101dbcb47--- /dev/null+++ b/docs/demos/out/.demo-wt-core/remote.git/refs/heads/main@@ -0,0 +1 @@+4832b02145e06e6ac7e768e0bb0f313bb0f47f40diff --git a/docs/demos/out/.demo-wt-core/w/acme b/docs/demos/out/.demo-wt-core/w/acmenew file mode 160000index 000000000..4832b0214--- /dev/null+++ b/docs/demos/out/.demo-wt-core/w/acme@@ -0,0 +1 @@+Subproject commit 4832b02145e06e6ac7e768e0bb0f313bb0f47f40diff --git a/docs/demos/out/.demo-wt-core/w/acme.alpha b/docs/demos/out/.demo-wt-core/w/acme.alphanew file mode 160000index 000000000..d78925be6--- /dev/null+++ b/docs/demos/out/.demo-wt-core/w/acme.alpha@@ -0,0 +1 @@+Subproject commit d78925be6e01e090e1b0ceba1bba306ed1028758diff --git a/docs/demos/out/.demo-wt-core/w/acme.api b/docs/demos/out/.demo-wt-core/w/acme.apinew file mode 160000index 000000000..4832b0214--- /dev/null+++ b/docs/demos/out/.demo-wt-core/w/acme.api@@ -0,0 +1 @@+Subproject commit 4832b02145e06e6ac7e768e0bb0f313bb0f47f40diff --git a/docs/demos/out/.demo-wt-core/w/acme.beta b/docs/demos/out/.demo-wt-core/w/acme.betanew file mode 160000index 000000000..8b11cc85b--- /dev/null+++ b/docs/demos/out/.demo-wt-core/w/acme.beta@@ -0,0 +1 @@+Subproject commit 8b11cc85bcf00e5d6c4efc5f5c0e852b051f8fb7diff --git a/docs/demos/out/.demo-wt-core/w/acme.hooks b/docs/demos/out/.demo-wt-core/w/acme.hooksnew file mode 160000index 000000000..72677b350--- /dev/null+++ b/docs/demos/out/.demo-wt-core/w/acme.hooks@@ -0,0 +1 @@+Subproject commit 72677b3509034b01c56250c89658566b9cddad54diff --git a/docs/demos/out/starship.toml b/docs/demos/out/starship.tomlnew file mode 100644index 000000000..f6b1fe3e0--- /dev/null+++ b/docs/demos/out/starship.toml@@ -0,0 +1,47 @@+format = "$directory$character"+palette = "gh_light"++[palettes.gh_light]+fg = "#1f2328"+bg = "#ffffff"+blue = "#0969da"+yellow = "#d29922"+green = "#2ea043"+red = "#d73a49"+muted = "#57606a"+gold = "#d97706"++[directory]+style = "bold fg:gold"+truncation_length = 3+truncate_to_repo = true+home_symbol = "~"++[git_branch]+style = "fg:muted"+symbol = " "+format = " [$symbol$branch]($style)"++[git_status]+style = "fg:red"+format = " [$all_status$ahead_behind]($style)"+conflicted = "⇕"+ahead = "⇡"+behind = "⇣"+staged = "+"+modified = "!"+untracked = "?"++[cmd_duration]+min_time = 500+# Keep duration but drop the timer icon to reduce prompt noise.+format = " [$duration]($style)"+style = "fg:muted"++[character]+success_symbol = "[❯](fg:gold)"+error_symbol = "[❯](fg:red)"+vicmd_symbol = "[❮](fg:gold)"++[time]+disabled = truediff --git a/docs/demos/out/wt-core-dark.gif b/docs/demos/out/wt-core-dark.gifnew file mode 100644index 000000000..1f10bf403Binary files /dev/null and b/docs/demos/out/wt-core-dark.gif differdiff --git a/docs/demos/out/wt-core.gif b/docs/demos/out/wt-core.gifnew file mode 100644index 000000000..0de6a4e6cBinary files /dev/null and b/docs/demos/out/wt-core.gif differdiff --git a/docs/demos/shared/lib.py b/docs/demos/shared/lib.pyindex a260c68b5..ce5300caf 100644--- a/docs/demos/shared/lib.py+++ b/docs/demos/shared/lib.py@@ -790,8 +790,6 @@ def record_all_themes(tape_rendered = demo_env.out_dir / ".rendered.tape"starship_config = demo_env.out_dir / "starship.toml"- docs_assets = repo_root / "docs" / "static" / "assets"- docs_assets.mkdir(parents=True, exist_ok=True)for theme_name, output_gif in output_gifs.items():theme = THEMES[theme_name]@@ -816,7 +814,3 @@ def record_all_themes(record_vhs(tape_rendered, vhs_binary)tape_rendered.unlink(missing_ok=True)print(f"GIF saved to {output_gif}")-- # Copy to docs for local preview- shutil.copy(output_gif, docs_assets / output_gif.name)- print(f"Copied to {docs_assets / output_gif.name}")diff --git a/docs/demos/shared/themes.py b/docs/demos/shared/themes.pyindex d7b002534..0f341ea85 100644--- a/docs/demos/shared/themes.py+++ b/docs/demos/shared/themes.py@@ -26,7 +26,7 @@ LIGHT_THEME = {"brightMagenta": "#a475f9","brightCyan": "#39c5cf","brightWhite": "#8c959f",- "background": "#FFFDF8",+ "background": "#FFFBF0","foreground": "#1f2328","cursor": "#d97706","selection": "#FFF0C8",