Skip to content
This repository has been archived by the owner on Sep 9, 2020. It is now read-only.

Commit

Permalink
Merge pull request #1451 from carolynvs/revert-prune-docs
Browse files Browse the repository at this point in the history
Revert "Merge pull request #1405 from ibrasho-forks/prune-docs"
  • Loading branch information
sdboyer committed Dec 13, 2017
2 parents f31d439 + 6edfef6 commit c3d278d
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 37 deletions.
2 changes: 1 addition & 1 deletion docs/FAQ.md
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ It's up to you:
**Cons**

- Your repo will be bigger, potentially a lot bigger,
though [`prune`](Gopkg.toml.md#prune) can help minimize this problem.
though `dep prune` can help minimize this problem.
- PR diffs will include changes for files under `vendor/` when Gopkg.lock is modified,
however files in `vendor/` are [hidden by default](https://github.com/github/linguist/blob/v5.2.0/lib/linguist/generated.rb#L328) on Github.

Expand Down
36 changes: 0 additions & 36 deletions docs/Gopkg.toml.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,35 +58,6 @@ system1-data = "value that is used by a system"
system2-data = "value that is used by another system"
```

## `prune`
`prune` defines the global and per-project prune options for dependencies. The options control which files are not kept when writing the `vendor/` tree.

The following is the current available options:
* `unused-packages` prunes files in unused packages.
* `non-go` prunes files that are not used by Go.
* `go-tests` prunes Go test files.

Some files are preversed by default (check the [isPreservedFile](../gps/prune.go#L254) function for the details).

Prune options are off by default and can be turned on by setting them to `true` at the root level.
```toml
[prune]
non-go = true
```

The same prune options can be defined per-project. An addtional `name` field is required and should represent a project and not a package.


```toml
[prune]
non-go = true

[[prune.project]]
name = "github.com/project/name"
go-tests = true
non-go = false
```

## `constraint`
A `constraint` provides rules for how a [direct dependency](FAQ.md#what-is-a-direct-or-transitive-dependency) may be incorporated into the
dependency graph.
Expand Down Expand Up @@ -200,11 +171,4 @@ codename = "foo"

[metadata]
propertyX = "valueX"

[prune]
unused-packages = true

[[prune.project]]
name = "github.com/user/project2"
unused-packages = false
```

0 comments on commit c3d278d

Please sign in to comment.