My dotfiles
fork

Configure Feed

Select the types of activity you want to include in your feed.

fish: add a function for cloning colocated repos

I've hit too many issues in pure JJ where I end up getting wedged,
*plus* so many tools I use have great functions for working with active
Git repos, but not with JJ. Simplest solution: make cloning a
colocated repo the easy path.

bitquabit.com adc34ff3 cb2609ca

verified
+12
+12
fish/functions/gjc.fish
··· 1 + function gjc --description 'git clone a repo and immediately jj initialize it' --argument-names source dest branch 2 + if test -z "$dest" 3 + set dest (string split / "$source")[-1] 4 + end 5 + git clone $source $dest 6 + cd $dest 7 + jj git init --colocate 8 + if test -z "$branch" 9 + set branch (git rev-parse --abbrev-ref HEAD) 10 + end 11 + jj bookmark track {$branch}@origin 12 + end