From 2c2934138c6acb8d1b327169484e513f5f1a1ce2 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 19 Jul 2023 12:53:01 -0400 Subject: [PATCH] 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. --- CHANGELOG | 2 ++ IkiWiki/Plugin/git.pm | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index a30a5de00..9907e800c 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -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 Sat, 25 Dec 2021 12:41:34 -0400 diff --git a/IkiWiki/Plugin/git.pm b/IkiWiki/Plugin/git.pm index 2bc250052..0113c09b3 100644 --- a/IkiWiki/Plugin/git.pm +++ b/IkiWiki/Plugin/git.pm @@ -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}); } }