diff options
author | Dave Reisner <dreisner@archlinux.org> | 2014-08-19 13:37:14 -0400 |
---|---|---|
committer | Dave Reisner <dreisner@archlinux.org> | 2014-08-19 13:37:14 -0400 |
commit | 5ef73d04af4caf815988a08bd55dfcee26806685 (patch) | |
tree | f7a7c4e6194754c3cc8daeb8b8ba3b5c0459dbc8 /package.inc.sh | |
parent | eab3a16099e364f62303d5bbeca002ac14f697be (diff) | |
download | asp32-5ef73d04af4caf815988a08bd55dfcee26806685.tar.xz |
package: drop "private" log methods, merge into package_log
Diffstat (limited to 'package.inc.sh')
-rw-r--r-- | package.inc.sh | 37 |
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" -} |