diff options
author | Matthieu Moy <Matthieu.Moy@imag.fr> | 2012-07-16 21:46:39 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2012-07-16 12:52:40 -0700 |
commit | 5c481745fbed5aa0eb63726c9e05538ededa63bb (patch) | |
tree | 015e41e64852eb708db68ebfd9a12ed96b28e0e3 /contrib | |
parent | 93e92d4d7c8883b346c8975c636286d6f6479142 (diff) | |
download | git-5c481745fbed5aa0eb63726c9e05538ededa63bb.tar.gz git-5c481745fbed5aa0eb63726c9e05538ededa63bb.tar.xz |
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>
Diffstat (limited to 'contrib')
-rwxr-xr-x | contrib/mw-to-git/git-remote-mediawiki | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/mw-to-git/git-remote-mediawiki b/contrib/mw-to-git/git-remote-mediawiki index fb1e9e09e..517a4db3f 100755 --- a/contrib/mw-to-git/git-remote-mediawiki +++ b/contrib/mw-to-git/git-remote-mediawiki @@ -1263,7 +1263,7 @@ sub mw_push_revision { } } unless ($dumb_push) { - run_git("notes --ref=$remotename/mediawiki add -m \"mediawiki_revision: $mw_revision\" $sha1_commit"); + run_git("notes --ref=$remotename/mediawiki add -f -m \"mediawiki_revision: $mw_revision\" $sha1_commit"); run_git("update-ref -m \"Git-MediaWiki push\" refs/mediawiki/$remotename/master $sha1_commit $sha1_child"); } } |