Skip to content

Commit 0818f3e

Browse files
authored
Merge branch 'master' into octogonz/ae-incompatible-tags
2 parents 694a0e2 + d21ed49 commit 0818f3e

2 files changed

Lines changed: 20 additions & 1 deletion

File tree

apps/rush-lib/src/utilities/VersionControl.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,15 @@ export class VersionControl {
8282
const remoteUrl: string = child_process.execSync(`git remote get-url ${remoteName}`)
8383
.toString()
8484
.trim();
85-
return remoteUrl === repositoryUrl;
85+
if (remoteUrl === repositoryUrl) {
86+
return true;
87+
}
88+
// When you copy a URL from the GitHub web site, they append the ".git" file extension to the URL.
89+
// So we allow that to be specified in rush.json, even though the file extension gets dropped
90+
// by "git clone".
91+
if (remoteUrl + '.git' === repositoryUrl) {
92+
return true;
93+
}
8694
}
8795
return false;
8896
});
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"changes": [
3+
{
4+
"comment": "Improve \"rush change\" to ignore the \".git\" file extension when appended to the \"repository.url\" setting in rush.json",
5+
"packageName": "@microsoft/rush",
6+
"type": "none"
7+
}
8+
],
9+
"packageName": "@microsoft/rush",
10+
"email": "4673363+octogonz@users.noreply.github.com"
11+
}

0 commit comments

Comments
 (0)