]> git.madduck.net Git - code/myrepos.git/blob - lib/vcsh

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

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.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

2e0677aaa669cffa0fa55fac2fd2480e6da6c316
[code/myrepos.git] / lib / vcsh
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
4
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
8
9 vcsh_test =
10         test -d "$MR_REPO"/refs/heads && test -d "$MR_REPO"/refs/tags &&
11         test -d "$MR_REPO"/objects && test -f "$MR_REPO"/config &&
12         test "`GIT_CONFIG="$MR_REPO"/config git config --get vcsh.vcsh`" = true
13
14 vcsh_update = vcsh run "$MR_REPO" git pull "$@"
15
16 vcsh_status = vcsh run "$MR_REPO" git status -s "$@" || true
17
18 vcsh_commit = vcsh run "$MR_REPO" git commit -a "$@" && vcsh run "$MR_REPO" git push --all
19
20 vcsh_record = vcsh run "$MR_REPO" git commit -a "$@"
21
22 vcsh_push = vcsh run "$MR_REPO" git push "$@"
23
24 vcsh_diff = vcsh run "$MR_REPO" git diff "$@"
25
26 vcsh_log = vcsh run "$MR_REPO" git log "$@"
27
28 vcsh_register =
29         url="`LC_ALL=C vcsh run "$MR_REPO" git config --get remote.origin.url`" || true
30         if [ -z "$url" ]; then
31                 error "cannot determine git url"
32         fi
33         echo "Registering git url: $url in $MR_CONFIG"
34         mr -c "$MR_CONFIG" config "`pwd`" checkout="vcsh clone '$url' '$MR_REPO'"
35
36 vcsh_trusted_checkout = vcsh run "$MR_REPO" git clone $url $repo