jj/demos/demo_git_compat.sh
Martin von Zweigbergk b1d473eafb demos: make run_command wait for the prompt
Most commands are non-interactive, so this reduces duplication. We can
add another function for running a command and not waiting for a
prompt when we need it.
2021-10-22 18:04:43 -07:00

18 lines
455 B
Bash
Executable File

#!/bin/bash
set -euo pipefail
. "$(dirname "$0")"/demo_helpers.sh
parse_args "$@"
new_tmp_dir
run_demo '
run_command "# Clone a Git repo:"
run_command "jj git clone https://github.com/octocat/Hello-World"
run_command "cd Hello-World"
run_command "# Inspect it:"
run_command "jj log"
run_command "jj diff -r b1"
run_command "# The repo is backed by the actual Git repo:"
run_command "git --git-dir=.jj/store/git log --graph --all --decorate --oneline"
'