All patches and comments are welcome. Please squash your changes to logical
commits before using git-format-patch and git-send-email to
patches@git.madduck.net.
If you'd read over the Git project's submission guidelines and adhered to them,
I'd be especially grateful.
1 # To make mr use this file, add a line like this inside the [DEFAULT]
2 # section of your ~/.mrconfig
3 #include = cat /usr/share/mr/vcsh
5 # And an example repo using it would look something like:
6 #[$HOME/.config/vcsh/repo.d/zsh.git]
7 #checkout = vcsh clone git://github.com/RichiH/zshrc.git zsh
10 -d "$ENV{MR_REPO}/refs/heads" && -d "$ENV{MR_REPO}/refs/tags" &&
11 -d "$ENV{MR_REPO}/objects" && -f "$ENV{MR_REPO}/config" &&
12 `GIT_CONFIG="$ENV{MR_REPO}"/config git config --get vcsh.vcsh` =~ /true/
14 vcsh_update = vcsh run "$MR_REPO" git pull "$@"
16 vcsh_status = cd $(vcsh run "$MR_REPO" git config --get core.worktree); vcsh run "$MR_REPO" git status -s "$@" || true
18 vcsh_commit = vcsh run "$MR_REPO" git commit -a "$@" && vcsh run "$MR_REPO" git push --all
20 vcsh_record = vcsh run "$MR_REPO" git commit -a "$@"
22 vcsh_push = vcsh run "$MR_REPO" git push "$@"
24 vcsh_diff = vcsh run "$MR_REPO" git diff "$@"
26 vcsh_log = vcsh run "$MR_REPO" git log "$@"
28 vcsh_run = vcsh run "$MR_REPO" "$@"
30 vcsh_gc = vcsh run "$MR_REPO" git gc "$@"
33 url="`LC_ALL=C vcsh run "$MR_REPO" git config --get remote.origin.url`" || true
34 if [ -z "$url" ]; then
35 error "cannot determine git url"
37 echo "Registering git url: $url in $MR_CONFIG"
38 mr -c "$MR_CONFIG" config "`pwd`" checkout="vcsh clone '$url' '$MR_REPO'"
40 vcsh_trusted_checkout = vcsh run "$MR_REPO" git clone $url $repo