git: Pass --no-rebase when pulling

To avoid git warning messages about pull.rebase.

I don't think it would make sense to want to rebase changes pulled from
origin when updating the checkout used to build a site. So it seems ok to
just use --no-rebase and not worry about honoring any pull.rebase setting.
master
Joey Hess 2023-07-19 12:53:01 -04:00
parent 106c9aad75
commit 2c2934138c
No known key found for this signature in database
GPG Key ID: DB12DB0FF05F8F38
2 changed files with 4 additions and 2 deletions

View File

@ -3,6 +3,8 @@ ikiwiki (3.20200202.4) UNRELEASED; urgency=medium
* aggregate: When a feed has an enclosure that is an image, audio, or
video, include the enclosure in the generated page.
* aggregate: Also support feeds with media:content tags.
* git: Pass --no-rebase when pulling, to avoid git warning messages
about pull.rebase.
-- Joey Hess <id@joeyh.name> Sat, 25 Dec 2021 12:41:34 -0400

View File

@ -351,7 +351,7 @@ sub merge_past ($$$) {
run_or_die_in($config{srcdir}, 'git', 'checkout', $config{gitmaster_branch});
# Attempt to merge without complaining.
if (!run_or_non_in($config{srcdir}, 'git', 'pull', '--no-commit', '.', $branch)) {
if (!run_or_non_in($config{srcdir}, 'git', 'pull', '--no-rebase', '--no-commit', '.', $branch)) {
$conflict = readfile($target);
run_or_die_in($config{srcdir}, 'git', 'reset', '--hard');
}
@ -601,7 +601,7 @@ sub rcs_update () {
ensure_committer($config{srcdir});
if (length $config{gitorigin_branch}) {
run_or_cry_in($config{srcdir}, 'git', 'pull', '--prune', $config{gitorigin_branch});
run_or_cry_in($config{srcdir}, 'git', 'pull', '--no-rebase', '--prune', $config{gitorigin_branch});
}
}