Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2018-10-05 14:29:20 +0200
committerErich Eckner <git@eckner.net>2018-10-05 14:29:20 +0200
commit80edbc4dfce3e489ec1d76d82b7d6fe37b675271 (patch)
tree34ea57e21ff36dce58c0bb0650e343ec6f1cac25 /bin
parentb79c8e8f0b070ba578dfd64a9f936f4c54a0824c (diff)
bin/harvest-commit-times: update repos on non-master before harvesting
Diffstat (limited to 'bin')
-rwxr-xr-xbin/harvest-commit-times12
1 files changed, 12 insertions, 0 deletions
diff --git a/bin/harvest-commit-times b/bin/harvest-commit-times
index 163870f..fc876b8 100755
--- a/bin/harvest-commit-times
+++ b/bin/harvest-commit-times
@@ -58,6 +58,18 @@ if ! verbose_flock ${block_flag} 9; then
exit
fi
+if ! ${i_am_the_master}; then
+ for repo_name in ${repo_names}; do
+ eval repo_path='"${repo_paths__'"${repo_name}"'}"'
+ if [ -d "${repo_path}/.git" ]; then
+ git -C "${repo_path}" remote update
+ else
+ git -C "${repo_path}" fetch origin master:master
+ fi || \
+ true
+ done
+fi
+
tmp_file=$(mktemp 'tmp.harvest-commit-times.XXXXXXXXXX' --tmpdir)
trap 'rm "${tmp_file}"' EXIT