branch ie: origin/master, but can actually be any refspec. Note that the
defconfigs specified in the config option must actually be available from
the refspec.
+* canonical_url
+ The url to use when displaying a url for user consumption. Intended to be a
+ patch-submitter visible mirror of the local path used internally. If not
+ supplied, aiaiai will display the path instead.
2.4 Aiaiai Hooks
~~~~~~~~~~~~~~~~
# server. No default value.
path = /home/aiaiai/work/git/android-x86
+ # Remote url used for display only. Aiaiai does not directly use this,
+ # and does not attempt to keep the path up to date itself. This is used
+ # only for display to the user.
+ canonical_url = git://aiaiai/git/android-x86
+
# Git refspec to validate the patches against. Usually this a the
# remote branch name. But may actually be any refspec.
#
# Similar to "parse_config", but parses a project configuration section. If the
# project is found, the following variables are defined:
#
-# pcfg_name, pcfg_description, pcfg_path and pcfg_branch.
+# pcfg_name, pcfg_description, pcfg_path, pcfg_branch and pcfg_canonical_url.
#
# The following variables are defined, but receive default values from the
# [defaults] section, if they are not specified in the project section:
ini_config_get_or_die pcfg_description "$cfgfile" "prj_$prj" "description"
ini_config_get_or_die pcfg_path "$cfgfile" "prj_$prj" "path"
ini_config_get_or_die pcfg_branch "$cfgfile" "prj_$prj" "branch"
+ pcfg_canonical_url="$(ini_config_get "$cfgfile" "prj_$prj" "canonical_url")"
# The following options all take default value from the "defaults"
# section, and hence "override" those settings. First we need to populate those.
# Get project description
local descr
ini_config_get_or_die descr "$cfgfile" "prj_$prj" "description"
-
local email="$cfg_ownmail_local+$prj@$cfg_ownmail_domain"
- printf "* %s\n" "$prj ($email): $descr"
+
+ # If given a url, display a sample clone line in the project
+ url="$(ini_config_get "$cfgfile" "prj_$prj" "canonical_url")"
+ branch="$(ini_config_get "$cfgfile" "prj_$prj" "branch")"
+
+ if [ -n "$url" ]; then
+ printf "* %s\n" "$prj ($email) [git clone -b $branch $url]: $descr"
+ else
+ printf "* %s\n" "$prj ($email): $descr"
+ fi
done
}