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:
authorDave Reisner <dreisner@archlinux.org>2014-08-19 13:37:14 -0400
committerDave Reisner <dreisner@archlinux.org>2014-08-19 13:37:14 -0400
commit5ef73d04af4caf815988a08bd55dfcee26806685 (patch)
treef7a7c4e6194754c3cc8daeb8b8ba3b5c0459dbc8 /package.inc.sh
parenteab3a16099e364f62303d5bbeca002ac14f697be (diff)
package: drop "private" log methods, merge into package_log
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"
-}