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.
4 . ${0%/*}/tg-datastore.inc
6 info() { printf "I: $@\n" >&2; }
10 # tg-datastore add var=val var2=val2 ...
13 info "returns non-zero if there is already a datastore on HEAD."
14 info "adding the following data to the datastore of HEAD:"
16 info " ${pair%%=*}: ${pair#*=}\n"
17 printf "${pair%%=*}: ${pair#*=}\n"
18 done | tg_ds_add_data || die "E: HEAD already has a datastore"
22 info "always returns zero, even if there was nothing to remove."
27 info "returns non-zero if no datastore found at given commit."
28 info "prints contents of datastore otherwise."
29 tg_ds_list_data "${2:-HEAD}"
32 # get parameter $2 from $3 (default HEAD)
33 info "prints the value of the parameter stored in the given commit."
34 info "prints nothing if the commit has a datastore but without the parameter."
35 info "returns non-zero if there is no datastore."
36 tg_ds_get_value "$2" ${3:-HEAD}
39 # search for parameter $2 by backtracking from $3 (default HEAD)
40 info "prints the value of the parameter, or empty if parameter is not found."
41 info "returns non-zero if no datastore was found."
42 tg_ds_find_value "$2" ${3:-HEAD}
45 echo "Usage: ${0##*/} [ add var=val... | remove | list | get var [commit] | find var [commit] ]"