diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/README.md b/README.md index 08af340d86..f949eea9a6 100644 --- a/README.md +++ b/README.md @@ -186,18 +186,10 @@ If you have any problems building, please consult the developer [FAQ][]. ## Downloading the Source Code -The PowerShell repository has a number of other repositories embedded as submodules. - -To make things easy, you can just clone recursively: +You can just clone the repository: ```sh -git clone --recursive https://github.com/PowerShell/PowerShell.git -``` - -If you have already cloned but forgot to use `--recursive`, you can update submodules manually: - -```sh -git submodule update --init +git clone https://github.com/PowerShell/PowerShell.git ``` See [working with the PowerShell repository](https://github.com/PowerShell/PowerShell/tree/master/docs/git) for more information. diff --git a/appveyor.yml b/appveyor.yml index 45bda6488b..19f64daacf 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -17,7 +17,6 @@ nuget: project_feed: true install: - - git submodule update --init - ps: Import-Module .\tools\Appveyor.psm1 - ps: Invoke-AppveyorInstall diff --git a/build.psm1 b/build.psm1 index 1330f1bd6f..68b1ff9b94 100644 --- a/build.psm1 +++ b/build.psm1 @@ -1536,16 +1536,6 @@ function Start-PSBootstrap { # Note that when it is null, Invoke-Expression (but not &) must be used to interpolate properly $sudo = if (!$NoSudo) { "sudo" } - try { - # Update googletest submodule for linux native cmake - Push-Location $PSScriptRoot - $Submodule = "$PSScriptRoot/src/libpsl-native/test/googletest" - Remove-Item -Path $Submodule -Recurse -Force -ErrorAction SilentlyContinue - git submodule --quiet update --init -- $submodule - } finally { - Pop-Location - } - if ($BuildLinuxArm -and -not $Environment.IsUbuntu) { Write-Error "Cross compiling for linux-arm is only supported on Ubuntu environment" return diff --git a/docs/FAQ.md b/docs/FAQ.md index 71bbddeb67..6ce8b7ec30 100644 --- a/docs/FAQ.md +++ b/docs/FAQ.md @@ -102,49 +102,3 @@ Additionally, if you've just unzipped their binary drops (or used their obtain scripts, which do essentially the same thing), you must manually delete the folder, as the .NET CLI team re-engineered how their binaries are setup, such that new packages' binaries get stomped on by old packages' binaries. - -## Why is my submodule empty? - -If a submodule (such as `src/libpsl-native/test/googletest`) is empty, that means it is -uninitialized. -If you've already cloned, you can do this with: - -```sh -git submodule init -git submodule update -``` - -You can verify that the submodules were initialized properly with: - -```sh -git submodule status -``` - -If they're initialized, it will look like this: - -```output -c99458533a9b4c743ed51537e25989ea55944908 src/libpsl-native/test/googletest (release-1.7.0) -``` - -If they're not, there will be minuses in front (and the folders will be empty): - -```output --c99458533a9b4c743ed51537e25989ea55944908 src/libpsl-native/test/googletest (release-1.7.0) -``` - -Please note that the commit hashes for the submodules have likely changed since -this FAQ was written. - -## Why does my submodule say "HEAD detached at" some commit? - -When a submodule is first initialized and updated, it is not checked out to a -branch, but the very exact commit that the super-project (this PowerShell -repository) has recorded for the submodule. -This behavior is intended. - -If you want to check out an actual branch, just do so with `git checkout `. -A submodule is just a Git repository; it just happens to be nested inside another repository. - -Please read the Git Book chapter on [submodules][]. - -[submodules]: https://git-scm.com/book/en/v2/Git-Tools-Submodules diff --git a/docs/git/README.md b/docs/git/README.md index b896490aae..edac48f288 100644 --- a/docs/git/README.md +++ b/docs/git/README.md @@ -4,23 +4,9 @@ Working with PowerShell repository #### Get the code for the first time ```sh -git clone --recursive https://github.com/PowerShell/PowerShell +git clone https://github.com/PowerShell/PowerShell ``` -The PowerShell repository has **submodules**. -They are required to build and test PowerShell. -That's why you need `--recursive`, when you `git clone`. - -If you already cloned the repo without `--recursive`, update submodules manually - -```sh -git submodule init -git submodule update -``` - -See [FAQ](../FAQ.md#why-is-my-submodule-empty) for details. - - Branches --------- @@ -44,7 +30,7 @@ Branches Use **git rebase** instead of **git merge** and **git pull**, when you're updating your feature-branch. ```sh -# fetch updates all remote branch references in the repo and all submodules +# fetch updates all remote branch references in the repo # --all : tells it to do it for all remotes (handy, when you use your fork) # -p : tells it to remove obsolete remote branch references (when they are removed from remote) git fetch --all -p diff --git a/docs/git/basics.md b/docs/git/basics.md index f1fcb6939c..049f3b3b77 100644 --- a/docs/git/basics.md +++ b/docs/git/basics.md @@ -78,7 +78,6 @@ git config --global credential.helper store Alternatively, you can use [SSH key][]. In this case, you may want to use git-ssh even for HTTPS Git URLs. -It will help you to use submodules transparently. ``` git config --global url.git@github.com:.insteadOf https://github.com/ diff --git a/docs/git/submodules.md b/docs/git/submodules.md deleted file mode 100644 index 52acc6ad5f..0000000000 --- a/docs/git/submodules.md +++ /dev/null @@ -1,24 +0,0 @@ -# Submodules - -While most developers will not have to deal with submodules on a regular basis, those who do should read this information. -The submodules currently in this project are: - -- `src/libpsl-native/test/googletest`: The GoogleTest framework for - Linux native code - -[submodules]: https://www.git-scm.com/book/en/v2/Git-Tools-Submodules - -## Rebase and Fast-Forward Merge Pull Requests in Submodules - -Note: *This is not necessary in the superproject, only submodules!* - -**DO NOT** commit updates unless absolutely necessary. -When submodules must be updated, a separate Pull Request must be submitted, reviewed, and merged before updating the superproject. - -Because GitHub's "Merge Pull Request" button merges with `--no-ff`, an extra merge commit will always be created. -This is especially annoying when trying to commit updates to submodules. -Therefore our policy is to merge using the Git CLI after approval, with a rebase onto master to enable a fast-forward merge. - -When committing submodule updates, ensure no other changes are in the same commit. -Submodule bumps may be included in feature branches for ease of work, -but the update must be independently approved before merging into master. diff --git a/test/common/markdown/markdown.tests.ps1 b/test/common/markdown/markdown.tests.ps1 index 01eb7fc57c..ae2a811f50 100644 --- a/test/common/markdown/markdown.tests.ps1 +++ b/test/common/markdown/markdown.tests.ps1 @@ -86,7 +86,6 @@ Describe 'Common Tests - Validate Markdown Files' -Tag 'CI' { './docs/*.md' './docs/building/*.md' './docs/cmdlet-example/*.md' - './docs/git/submodules.md' './docs/maintainers/*.md' './docs/testing-guidelines/testing-guidelines.md' './test/powershell/README.md' diff --git a/tools/releaseBuild/macOS/PowerShellPackageVsts.ps1 b/tools/releaseBuild/macOS/PowerShellPackageVsts.ps1 index bd1fdc6e45..8023657491 100644 --- a/tools/releaseBuild/macOS/PowerShellPackageVsts.ps1 +++ b/tools/releaseBuild/macOS/PowerShellPackageVsts.ps1 @@ -54,7 +54,6 @@ Push-Location try { Write-Verbose -Message "Init..." -Verbose Set-Location $repoRoot - git submodule update --init --recursive --quiet Import-Module "$repoRoot/build.psm1" Import-Module "$repoRoot/tools/packaging" Sync-PSTags -AddRemoteIfMissing diff --git a/tools/releaseBuild/vstsbuild.ps1 b/tools/releaseBuild/vstsbuild.ps1 index ddbe1475e5..7bb73183e2 100644 --- a/tools/releaseBuild/vstsbuild.ps1 +++ b/tools/releaseBuild/vstsbuild.ps1 @@ -90,14 +90,6 @@ End { & $gitBinFullPath clone -b $psReleaseBranch --quiet https://github.com/$psReleaseFork/PSRelease.git $location Push-Location -Path $PWD.Path - try{ - Set-Location $location - & $gitBinFullPath submodule update --init --recursive --quiet - } - finally - { - Pop-Location - } $unresolvedRepoRoot = Join-Path -Path $PSScriptRoot '../..' $resolvedRepoRoot = (Resolve-Path -Path $unresolvedRepoRoot).ProviderPath