Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file removed .gitmodules
Empty file.
12 changes: 2 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

```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:
You can just clone the repository:

```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.
Expand Down
1 change: 0 additions & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ nuget:
project_feed: true

install:
- git submodule update --init
- ps: Import-Module .\tools\Appveyor.psm1
- ps: Invoke-AppveyorInstall

Expand Down
10 changes: 0 additions & 10 deletions build.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
46 changes: 0 additions & 46 deletions docs/FAQ.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <branch>`.
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
18 changes: 2 additions & 16 deletions docs/git/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
---------

Expand All @@ -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
Expand Down
1 change: 0 additions & 1 deletion docs/git/basics.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand Down
24 changes: 0 additions & 24 deletions docs/git/submodules.md

This file was deleted.

1 change: 0 additions & 1 deletion test/common/markdown/markdown.tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
1 change: 0 additions & 1 deletion tools/releaseBuild/macOS/PowerShellPackageVsts.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 0 additions & 8 deletions tools/releaseBuild/vstsbuild.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down