Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/package.inc.sh
diff options
context:
space:
mode:
Diffstat (limited to 'package.inc.sh')
-rw-r--r--package.inc.sh37
1 files changed, 17 insertions, 20 deletions
diff --git a/package.inc.sh b/package.inc.sh
index 6d6407f..01876e7 100644
--- a/package.inc.sh
+++ b/package.inc.sh
@@ -48,11 +48,26 @@ package_find_remote() {
}
package_log() {
- local pkgname=$1 method=$2 remote
+ local pkgname=$1 method=$2 logargs remote
package_init "$pkgname" remote || return
- "_package_$method" "$pkgname" "$remote"
+ case $method in
+ shortlog)
+ logargs=(--pretty=oneline)
+ ;;
+ difflog)
+ logargs=(-p)
+ ;;
+ log)
+ logargs=()
+ ;;
+ *)
+ die 'internal error: unknown log method: %s' "$method"
+ ;;
+ esac
+
+ git log "${logargs[@]}" "$remote/packages/$pkgname"
}
package_export() {
@@ -148,21 +163,3 @@ package_untrack() {
git branch -D "$remote/packages/$pkgname"
fi
}
-
-_package_shortlog() {
- local pkgname=$1 remote=$2
-
- git log --pretty=oneline "$remote/packages/$pkgname"
-}
-
-_package_difflog() {
- local pkgname=$1 remote=$2
-
- git log -p "$remote/packages/$pkgname"
-}
-
-_package_log() {
- local pkgname=$1 remote=$2
-
- git log "$remote/packages/$pkgname"
-}