git-remote-mediawiki: use --force when adding notes
When notes are created to record a push, it normally doesn't exist yet. However, when a push is interrupted and then restarted, it may happen that a commit already has notes attached, and we want to reflect the newly created remote revision, hence use 'git notes add -f' to override the existing one Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Matthieu Moy committed
Jul 16, 2012 at 21:46 UTC
5c481745fbed5aa0eb63726c9e05538ededa63bb
1 file changed
+1
-1
contrib/mw-to-git/git-remote-mediawiki
+1
-1
@@ -1263,7 +1263,7 @@ sub mw_push_revision {
1263
}
1264
}
1265
unless ($dumb_push) {
1266
- run_git("notes --ref=$remotename/mediawiki add -m \"mediawiki_revision: $mw_revision\" $sha1_commit");
1266
+ run_git("notes --ref=$remotename/mediawiki add -f -m \"mediawiki_revision: $mw_revision\" $sha1_commit");
1267
run_git("update-ref -m \"Git-MediaWiki push\" refs/mediawiki/$remotename/master $sha1_commit $sha1_child");
1268
}
1269
}