jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/380885 )
Change subject: make-wmf-branch: Stop amending commits for branches with
submodules
......................................................................
make-wmf-branch: Stop amending commits for branches with submodules
In Ia31a9f1d, we tried to fix submodule support in branching so they
get branched properly as well. To do this, we had to make a commit
with some submodules being committed. To avoid noise and roll it into
the prior commit we'd done for .gitreview, we'd push the resulting
single commit to Gerrit.
Then I come along in I3ba2bb8f to stop mangling .gitreview on all
the extension branches because it was superfluous. However, that
meant that the *second* commit from before was now amending the
*last* commit prior to branching.
Confused yet?
Bug: T175324
Change-Id: I8a9c1a7094cb5f7be36c101498ddd7107522c2d6
---
M make-wmf-branch/MakeWmfBranch.php
1 file changed, 5 insertions(+), 1 deletion(-)
Approvals:
Thcipriani: Looks good to me, approved
jenkins-bot: Verified
diff --git a/make-wmf-branch/MakeWmfBranch.php
b/make-wmf-branch/MakeWmfBranch.php
index fd7dc5a..3a233de 100644
--- a/make-wmf-branch/MakeWmfBranch.php
+++ b/make-wmf-branch/MakeWmfBranch.php
@@ -191,7 +191,11 @@
$this->chdir( $repo );
$this->runCmd( 'git', 'add', $submodule );
}
- $this->runCmd( 'git', 'commit', '-q', '--amend', '-m',
"Creating new {$newVersion} branch" );
+ $diffRet = 0;
+ passthru( '/usr/bin/git diff --cached --no-ext-diff
--quiet', $diffRet );
+ if ( $diffRet > 0 ) {
+ $this->runCmd( 'git', 'commit', '-q', '-m',
"Creating new {$newVersion} branch" );
+ }
$this->runWriteCmd( 'git', 'push', 'origin',
$newVersion );
} else {
$this->createBranch( $newVersion, true );
--
To view, visit https://gerrit.wikimedia.org/r/380885
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I8a9c1a7094cb5f7be36c101498ddd7107522c2d6
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/tools/release
Gerrit-Branch: master
Gerrit-Owner: Chad <[email protected]>
Gerrit-Reviewer: 20after4 <[email protected]>
Gerrit-Reviewer: Catrope <[email protected]>
Gerrit-Reviewer: Jforrester <[email protected]>
Gerrit-Reviewer: Thcipriani <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits