diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json index 7113d7100..7ee80e0c9 100644 --- a/Godeps/Godeps.json +++ b/Godeps/Godeps.json @@ -273,11 +273,11 @@ }, { "ImportPath": "github.com/hashicorp/go-getter", - "Rev": "848242c76c346ef0aeb34787753b068f5f6f92fe" + "Rev": "cd92db7af9118d920be4f1b95680ba75ad91d1c6" }, { "ImportPath": "github.com/hashicorp/go-getter/helper/url", - "Rev": "848242c76c346ef0aeb34787753b068f5f6f92fe" + "Rev": "cd92db7af9118d920be4f1b95680ba75ad91d1c6" }, { "ImportPath": "github.com/hashicorp/go-immutable-radix", @@ -443,11 +443,11 @@ "Comment": "v0.0.8-59-g53e4dd6", "Rev": "53e4dd65f5de928ae6deaf2de2c0596e741cbaaa" }, - { - "ImportPath": "github.com/opencontainers/runc/libcontainer/utils", - "Comment": "v0.0.8-59-g53e4dd6", - "Rev": "53e4dd65f5de928ae6deaf2de2c0596e741cbaaa" - }, + { + "ImportPath": "github.com/opencontainers/runc/libcontainer/utils", + "Comment": "v0.0.8-59-g53e4dd6", + "Rev": "53e4dd65f5de928ae6deaf2de2c0596e741cbaaa" + }, { "ImportPath": "github.com/ryanuber/columnize", "Comment": "v2.0.1-8-g983d3a5", diff --git a/vendor/github.com/hashicorp/go-getter/README.md b/vendor/github.com/hashicorp/go-getter/README.md index c3cf4c226..8ce50622a 100644 --- a/vendor/github.com/hashicorp/go-getter/README.md +++ b/vendor/github.com/hashicorp/go-getter/README.md @@ -34,6 +34,18 @@ Installation can be done with a normal `go get`: $ go get github.com/hashicorp/go-getter ``` +go-getter also has a command you can use to test URL strings: + +``` +$ go install github.com/hashicorp/go-getter/cmd/go-getter +... + +$ go-getter github.com/foo/bar ./foo +... +``` + +The command is useful for verifying URL structures. + ## URL Format go-getter uses a single string URL as input to downlaod from a variety of diff --git a/vendor/github.com/hashicorp/go-getter/client.go b/vendor/github.com/hashicorp/go-getter/client.go index 0622b324c..5a039dbac 100644 --- a/vendor/github.com/hashicorp/go-getter/client.go +++ b/vendor/github.com/hashicorp/go-getter/client.go @@ -38,11 +38,9 @@ type Client struct { Dst string Pwd string - // Dir, if true, tells the Client it is downloading a directory (versus - // a single file). This distinction is necessary since filenames and - // directory names follow the same format so disambiguating is impossible - // without knowing ahead of time. - Dir bool + // Mode is the method of download the client will use. See ClientMode + // for documentation. + Mode ClientMode // Detectors is the list of detectors that are tried on the source. // If this is nil, then the default Detectors will be used. @@ -55,12 +53,27 @@ type Client struct { // Getters is the map of protocols supported by this client. If this // is nil, then the default Getters variable will be used. Getters map[string]Getter + + // Dir, if true, tells the Client it is downloading a directory (versus + // a single file). This distinction is necessary since filenames and + // directory names follow the same format so disambiguating is impossible + // without knowing ahead of time. + // + // WARNING: deprecated. If Mode is set, that will take precedence. + Dir bool } // Get downloads the configured source to the destination. func (c *Client) Get() error { // Store this locally since there are cases we swap this - dir := c.Dir + mode := c.Mode + if mode == ClientModeInvalid { + if c.Dir { + mode = ClientModeDir + } else { + mode = ClientModeFile + } + } // Default decompressor value decompressors := c.Decompressors @@ -166,9 +179,9 @@ func (c *Client) Get() error { // Swap the download directory to be our temporary path and // store the old values. decompressDst = dst - decompressDir = dir + decompressDir = mode != ClientModeFile dst = filepath.Join(td, "archive") - dir = false + mode = ClientModeFile } // Determine if we have a checksum @@ -179,13 +192,6 @@ func (c *Client) Get() error { q.Del("checksum") u.RawQuery = q.Encode() - // If we're getting a directory, then this is an error. You cannot - // checksum a directory. TODO: test - if dir { - return fmt.Errorf( - "checksum cannot be specified for directory download") - } - // Determine the checksum hash type checksumType := "" idx := strings.Index(v, ":") @@ -216,9 +222,18 @@ func (c *Client) Get() error { checksumValue = b } + // For now, any means file. In the future, we'll ask the getter + // what it thinks it is. + if mode == ClientModeAny { + mode = ClientModeFile + + // Destination is the base name of the URL path + dst = filepath.Join(dst, filepath.Base(u.Path)) + } + // If we're not downloading a directory, then just download the file // and return. - if !dir { + if mode == ClientModeFile { err := g.GetFile(dst, u) if err != nil { return err @@ -240,13 +255,17 @@ func (c *Client) Get() error { // Swap the information back dst = decompressDst - dir = decompressDir + if decompressDir { + mode = ClientModeAny + } else { + mode = ClientModeFile + } } // We check the dir value again because it can be switched back // if we were unarchiving. If we're still only Get-ing a file, then // we're done. - if !dir { + if mode == ClientModeFile { return nil } } @@ -256,6 +275,13 @@ func (c *Client) Get() error { // In the case we have a decompressor we don't Get because it was Get // above. if decompressor == nil { + // If we're getting a directory, then this is an error. You cannot + // checksum a directory. TODO: test + if checksumHash != nil { + return fmt.Errorf( + "checksum cannot be specified for directory download") + } + // We're downloading a directory, which might require a bit more work // if we're specifying a subdir. err := g.Get(dst, u) diff --git a/vendor/github.com/hashicorp/go-getter/client_mode.go b/vendor/github.com/hashicorp/go-getter/client_mode.go new file mode 100644 index 000000000..7f02509a7 --- /dev/null +++ b/vendor/github.com/hashicorp/go-getter/client_mode.go @@ -0,0 +1,24 @@ +package getter + +// ClientMode is the mode that the client operates in. +type ClientMode uint + +const ( + ClientModeInvalid ClientMode = iota + + // ClientModeAny downloads anything it can. In this mode, dst must + // be a directory. If src is a file, it is saved into the directory + // with the basename of the URL. If src is a directory or archive, + // it is unpacked directly into dst. + ClientModeAny + + // ClientModeFile downloads a single file. In this mode, dst must + // be a file path (doesn't have to exist). src must point to a single + // file. It is saved as dst. + ClientModeFile + + // ClientModeDir downloads a directory. In this mode, dst must be + // a directory path (doesn't have to exist). src must point to an + // archive or directory (such as in s3). + ClientModeDir +) diff --git a/vendor/github.com/hashicorp/go-getter/decompress_testing.go b/vendor/github.com/hashicorp/go-getter/decompress_testing.go index 5821ed66e..2834e399d 100644 --- a/vendor/github.com/hashicorp/go-getter/decompress_testing.go +++ b/vendor/github.com/hashicorp/go-getter/decompress_testing.go @@ -92,6 +92,11 @@ func testListDir(t *testing.T, path string) []string { } sub = sub[1:] // Trim the leading path sep. + // If it is a dir, add trailing sep + if info.IsDir() { + sub += "/" + } + result = append(result, sub) return nil }) diff --git a/vendor/github.com/hashicorp/go-getter/decompress_tgz.go b/vendor/github.com/hashicorp/go-getter/decompress_tgz.go index 391bbc0ad..e8b1c31ca 100644 --- a/vendor/github.com/hashicorp/go-getter/decompress_tgz.go +++ b/vendor/github.com/hashicorp/go-getter/decompress_tgz.go @@ -60,7 +60,7 @@ func (d *TarGzipDecompressor) Decompress(dst, src string, dir bool) error { } if hdr.FileInfo().IsDir() { - if dir { + if !dir { return fmt.Errorf("expected a single file: %s", src) } diff --git a/vendor/github.com/hashicorp/go-getter/get.go b/vendor/github.com/hashicorp/go-getter/get.go index cfdabaed6..75d813cdb 100644 --- a/vendor/github.com/hashicorp/go-getter/get.go +++ b/vendor/github.com/hashicorp/go-getter/get.go @@ -72,6 +72,21 @@ func Get(dst, src string) error { }).Get() } +// GetAny downloads a URL into the given destination. Unlike Get or +// GetFile, both directories and files are supported. +// +// dst must be a directory. If src is a file, it will be downloaded +// into dst with the basename of the URL. If src is a directory or +// archive, it will be unpacked directly into dst. +func GetAny(dst, src string) error { + return (&Client{ + Src: src, + Dst: dst, + Mode: ClientModeAny, + Getters: Getters, + }).Get() +} + // GetFile downloads the file specified by src into the path specified by // dst. func GetFile(dst, src string) error { diff --git a/vendor/github.com/hashicorp/go-getter/test-fixtures/archive.tar.gz b/vendor/github.com/hashicorp/go-getter/test-fixtures/archive.tar.gz deleted file mode 100644 index eb2f7624b..000000000 --- a/vendor/github.com/hashicorp/go-getter/test-fixtures/archive.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:6f1520bbbdec4aec1b711bca8fa6ada1a2f1f4904d130d31c89318167e96bbc5 -size 141 diff --git a/vendor/github.com/hashicorp/go-getter/test-fixtures/basic-dot/main.tf b/vendor/github.com/hashicorp/go-getter/test-fixtures/basic-dot/main.tf deleted file mode 100644 index 383063715..000000000 --- a/vendor/github.com/hashicorp/go-getter/test-fixtures/basic-dot/main.tf +++ /dev/null @@ -1,5 +0,0 @@ -# Hello - -module "foo" { - source = "./foo" -} diff --git a/vendor/github.com/hashicorp/go-getter/test-fixtures/basic-file-archive/archive.tar.gz b/vendor/github.com/hashicorp/go-getter/test-fixtures/basic-file-archive/archive.tar.gz deleted file mode 100644 index 3213868fb..000000000 --- a/vendor/github.com/hashicorp/go-getter/test-fixtures/basic-file-archive/archive.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:00f9922e0129afd630870014701f6cc72d0b03ab6d120e827b77cc4e9e58785b -size 141 diff --git a/vendor/github.com/hashicorp/go-getter/test-fixtures/basic-file/foo.txt b/vendor/github.com/hashicorp/go-getter/test-fixtures/basic-file/foo.txt deleted file mode 100644 index e965047ad..000000000 --- a/vendor/github.com/hashicorp/go-getter/test-fixtures/basic-file/foo.txt +++ /dev/null @@ -1 +0,0 @@ -Hello diff --git a/vendor/github.com/hashicorp/go-getter/test-fixtures/basic-git/DOTgit/COMMIT_EDITMSG b/vendor/github.com/hashicorp/go-getter/test-fixtures/basic-git/DOTgit/COMMIT_EDITMSG deleted file mode 100644 index 3ed911a9a..000000000 --- a/vendor/github.com/hashicorp/go-getter/test-fixtures/basic-git/DOTgit/COMMIT_EDITMSG +++ /dev/null @@ -1,7 +0,0 @@ -add a file -# Please enter the commit message for your changes. Lines starting -# with '#' will be ignored, and an empty message aborts the commit. -# On branch master -# Changes to be committed: -# new file: foo.txt -# diff --git a/vendor/github.com/hashicorp/go-getter/test-fixtures/basic-git/DOTgit/HEAD b/vendor/github.com/hashicorp/go-getter/test-fixtures/basic-git/DOTgit/HEAD deleted file mode 100644 index cb089cd89..000000000 --- a/vendor/github.com/hashicorp/go-getter/test-fixtures/basic-git/DOTgit/HEAD +++ /dev/null @@ -1 +0,0 @@ -ref: refs/heads/master diff --git a/vendor/github.com/hashicorp/go-getter/test-fixtures/basic-git/DOTgit/config b/vendor/github.com/hashicorp/go-getter/test-fixtures/basic-git/DOTgit/config deleted file mode 100644 index 6c9406b7d..000000000 --- a/vendor/github.com/hashicorp/go-getter/test-fixtures/basic-git/DOTgit/config +++ /dev/null @@ -1,7 +0,0 @@ -[core] - repositoryformatversion = 0 - filemode = true - bare = false - logallrefupdates = true - ignorecase = true - precomposeunicode = true diff --git a/vendor/github.com/hashicorp/go-getter/test-fixtures/basic-git/DOTgit/description b/vendor/github.com/hashicorp/go-getter/test-fixtures/basic-git/DOTgit/description deleted file mode 100644 index 498b267a8..000000000 --- a/vendor/github.com/hashicorp/go-getter/test-fixtures/basic-git/DOTgit/description +++ /dev/null @@ -1 +0,0 @@ -Unnamed repository; edit this file 'description' to name the repository. diff --git a/vendor/github.com/hashicorp/go-getter/test-fixtures/basic-git/DOTgit/hooks/applypatch-msg.sample b/vendor/github.com/hashicorp/go-getter/test-fixtures/basic-git/DOTgit/hooks/applypatch-msg.sample deleted file mode 100644 index 8b2a2fe84..000000000 --- a/vendor/github.com/hashicorp/go-getter/test-fixtures/basic-git/DOTgit/hooks/applypatch-msg.sample +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh -# -# An example hook script to check the commit log message taken by -# applypatch from an e-mail message. -# -# The hook should exit with non-zero status after issuing an -# appropriate message if it wants to stop the commit. The hook is -# allowed to edit the commit message file. -# -# To enable this hook, rename this file to "applypatch-msg". - -. git-sh-setup -test -x "$GIT_DIR/hooks/commit-msg" && - exec "$GIT_DIR/hooks/commit-msg" ${1+"$@"} -: diff --git a/vendor/github.com/hashicorp/go-getter/test-fixtures/basic-git/DOTgit/hooks/commit-msg.sample b/vendor/github.com/hashicorp/go-getter/test-fixtures/basic-git/DOTgit/hooks/commit-msg.sample deleted file mode 100644 index b58d1184a..000000000 --- a/vendor/github.com/hashicorp/go-getter/test-fixtures/basic-git/DOTgit/hooks/commit-msg.sample +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/sh -# -# An example hook script to check the commit log message. -# Called by "git commit" with one argument, the name of the file -# that has the commit message. The hook should exit with non-zero -# status after issuing an appropriate message if it wants to stop the -# commit. The hook is allowed to edit the commit message file. -# -# To enable this hook, rename this file to "commit-msg". - -# Uncomment the below to add a Signed-off-by line to the message. -# Doing this in a hook is a bad idea in general, but the prepare-commit-msg -# hook is more suited to it. -# -# SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') -# grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1" - -# This example catches duplicate Signed-off-by lines. - -test "" = "$(grep '^Signed-off-by: ' "$1" | - sort | uniq -c | sed -e '/^[ ]*1[ ]/d')" || { - echo >&2 Duplicate Signed-off-by lines. - exit 1 -} diff --git a/vendor/github.com/hashicorp/go-getter/test-fixtures/basic-git/DOTgit/hooks/post-update.sample b/vendor/github.com/hashicorp/go-getter/test-fixtures/basic-git/DOTgit/hooks/post-update.sample deleted file mode 100644 index ec17ec193..000000000 --- a/vendor/github.com/hashicorp/go-getter/test-fixtures/basic-git/DOTgit/hooks/post-update.sample +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh -# -# An example hook script to prepare a packed repository for use over -# dumb transports. -# -# To enable this hook, rename this file to "post-update". - -exec git update-server-info diff --git a/vendor/github.com/hashicorp/go-getter/test-fixtures/basic-git/DOTgit/hooks/pre-applypatch.sample b/vendor/github.com/hashicorp/go-getter/test-fixtures/basic-git/DOTgit/hooks/pre-applypatch.sample deleted file mode 100644 index b1f187c2e..000000000 --- a/vendor/github.com/hashicorp/go-getter/test-fixtures/basic-git/DOTgit/hooks/pre-applypatch.sample +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh -# -# An example hook script to verify what is about to be committed -# by applypatch from an e-mail message. -# -# The hook should exit with non-zero status after issuing an -# appropriate message if it wants to stop the commit. -# -# To enable this hook, rename this file to "pre-applypatch". - -. git-sh-setup -test -x "$GIT_DIR/hooks/pre-commit" && - exec "$GIT_DIR/hooks/pre-commit" ${1+"$@"} -: diff --git a/vendor/github.com/hashicorp/go-getter/test-fixtures/basic-git/DOTgit/hooks/pre-commit.sample b/vendor/github.com/hashicorp/go-getter/test-fixtures/basic-git/DOTgit/hooks/pre-commit.sample deleted file mode 100644 index 68d62d544..000000000 --- a/vendor/github.com/hashicorp/go-getter/test-fixtures/basic-git/DOTgit/hooks/pre-commit.sample +++ /dev/null @@ -1,49 +0,0 @@ -#!/bin/sh -# -# An example hook script to verify what is about to be committed. -# Called by "git commit" with no arguments. The hook should -# exit with non-zero status after issuing an appropriate message if -# it wants to stop the commit. -# -# To enable this hook, rename this file to "pre-commit". - -if git rev-parse --verify HEAD >/dev/null 2>&1 -then - against=HEAD -else - # Initial commit: diff against an empty tree object - against=4b825dc642cb6eb9a060e54bf8d69288fbee4904 -fi - -# If you want to allow non-ASCII filenames set this variable to true. -allownonascii=$(git config --bool hooks.allownonascii) - -# Redirect output to stderr. -exec 1>&2 - -# Cross platform projects tend to avoid non-ASCII filenames; prevent -# them from being added to the repository. We exploit the fact that the -# printable range starts at the space character and ends with tilde. -if [ "$allownonascii" != "true" ] && - # Note that the use of brackets around a tr range is ok here, (it's - # even required, for portability to Solaris 10's /usr/bin/tr), since - # the square bracket bytes happen to fall in the designated range. - test $(git diff --cached --name-only --diff-filter=A -z $against | - LC_ALL=C tr -d '[ -~]\0' | wc -c) != 0 -then - cat <<\EOF -Error: Attempt to add a non-ASCII file name. - -This can cause problems if you want to work with people on other platforms. - -To be portable it is advisable to rename the file. - -If you know what you are doing you can disable this check using: - - git config hooks.allownonascii true -EOF - exit 1 -fi - -# If there are whitespace errors, print the offending file names and fail. -exec git diff-index --check --cached $against -- diff --git a/vendor/github.com/hashicorp/go-getter/test-fixtures/basic-git/DOTgit/hooks/pre-push.sample b/vendor/github.com/hashicorp/go-getter/test-fixtures/basic-git/DOTgit/hooks/pre-push.sample deleted file mode 100644 index 1f3bcebfd..000000000 --- a/vendor/github.com/hashicorp/go-getter/test-fixtures/basic-git/DOTgit/hooks/pre-push.sample +++ /dev/null @@ -1,54 +0,0 @@ -#!/bin/sh - -# An example hook script to verify what is about to be pushed. Called by "git -# push" after it has checked the remote status, but before anything has been -# pushed. If this script exits with a non-zero status nothing will be pushed. -# -# This hook is called with the following parameters: -# -# $1 -- Name of the remote to which the push is being done -# $2 -- URL to which the push is being done -# -# If pushing without using a named remote those arguments will be equal. -# -# Information about the commits which are being pushed is supplied as lines to -# the standard input in the form: -# -# -# -# This sample shows how to prevent push of commits where the log message starts -# with "WIP" (work in progress). - -remote="$1" -url="$2" - -z40=0000000000000000000000000000000000000000 - -IFS=' ' -while read local_ref local_sha remote_ref remote_sha -do - if [ "$local_sha" = $z40 ] - then - # Handle delete - : - else - if [ "$remote_sha" = $z40 ] - then - # New branch, examine all commits - range="$local_sha" - else - # Update to existing branch, examine new commits - range="$remote_sha..$local_sha" - fi - - # Check for WIP commit - commit=`git rev-list -n 1 --grep '^WIP' "$range"` - if [ -n "$commit" ] - then - echo "Found WIP commit in $local_ref, not pushing" - exit 1 - fi - fi -done - -exit 0 diff --git a/vendor/github.com/hashicorp/go-getter/test-fixtures/basic-git/DOTgit/hooks/pre-rebase.sample b/vendor/github.com/hashicorp/go-getter/test-fixtures/basic-git/DOTgit/hooks/pre-rebase.sample deleted file mode 100644 index 9773ed4cb..000000000 --- a/vendor/github.com/hashicorp/go-getter/test-fixtures/basic-git/DOTgit/hooks/pre-rebase.sample +++ /dev/null @@ -1,169 +0,0 @@ -#!/bin/sh -# -# Copyright (c) 2006, 2008 Junio C Hamano -# -# The "pre-rebase" hook is run just before "git rebase" starts doing -# its job, and can prevent the command from running by exiting with -# non-zero status. -# -# The hook is called with the following parameters: -# -# $1 -- the upstream the series was forked from. -# $2 -- the branch being rebased (or empty when rebasing the current branch). -# -# This sample shows how to prevent topic branches that are already -# merged to 'next' branch from getting rebased, because allowing it -# would result in rebasing already published history. - -publish=next -basebranch="$1" -if test "$#" = 2 -then - topic="refs/heads/$2" -else - topic=`git symbolic-ref HEAD` || - exit 0 ;# we do not interrupt rebasing detached HEAD -fi - -case "$topic" in -refs/heads/??/*) - ;; -*) - exit 0 ;# we do not interrupt others. - ;; -esac - -# Now we are dealing with a topic branch being rebased -# on top of master. Is it OK to rebase it? - -# Does the topic really exist? -git show-ref -q "$topic" || { - echo >&2 "No such branch $topic" - exit 1 -} - -# Is topic fully merged to master? -not_in_master=`git rev-list --pretty=oneline ^master "$topic"` -if test -z "$not_in_master" -then - echo >&2 "$topic is fully merged to master; better remove it." - exit 1 ;# we could allow it, but there is no point. -fi - -# Is topic ever merged to next? If so you should not be rebasing it. -only_next_1=`git rev-list ^master "^$topic" ${publish} | sort` -only_next_2=`git rev-list ^master ${publish} | sort` -if test "$only_next_1" = "$only_next_2" -then - not_in_topic=`git rev-list "^$topic" master` - if test -z "$not_in_topic" - then - echo >&2 "$topic is already up-to-date with master" - exit 1 ;# we could allow it, but there is no point. - else - exit 0 - fi -else - not_in_next=`git rev-list --pretty=oneline ^${publish} "$topic"` - /usr/bin/perl -e ' - my $topic = $ARGV[0]; - my $msg = "* $topic has commits already merged to public branch:\n"; - my (%not_in_next) = map { - /^([0-9a-f]+) /; - ($1 => 1); - } split(/\n/, $ARGV[1]); - for my $elem (map { - /^([0-9a-f]+) (.*)$/; - [$1 => $2]; - } split(/\n/, $ARGV[2])) { - if (!exists $not_in_next{$elem->[0]}) { - if ($msg) { - print STDERR $msg; - undef $msg; - } - print STDERR " $elem->[1]\n"; - } - } - ' "$topic" "$not_in_next" "$not_in_master" - exit 1 -fi - -exit 0 - -################################################################ - -This sample hook safeguards topic branches that have been -published from being rewound. - -The workflow assumed here is: - - * Once a topic branch forks from "master", "master" is never - merged into it again (either directly or indirectly). - - * Once a topic branch is fully cooked and merged into "master", - it is deleted. If you need to build on top of it to correct - earlier mistakes, a new topic branch is created by forking at - the tip of the "master". This is not strictly necessary, but - it makes it easier to keep your history simple. - - * Whenever you need to test or publish your changes to topic - branches, merge them into "next" branch. - -The script, being an example, hardcodes the publish branch name -to be "next", but it is trivial to make it configurable via -$GIT_DIR/config mechanism. - -With this workflow, you would want to know: - -(1) ... if a topic branch has ever been merged to "next". Young - topic branches can have stupid mistakes you would rather - clean up before publishing, and things that have not been - merged into other branches can be easily rebased without - affecting other people. But once it is published, you would - not want to rewind it. - -(2) ... if a topic branch has been fully merged to "master". - Then you can delete it. More importantly, you should not - build on top of it -- other people may already want to - change things related to the topic as patches against your - "master", so if you need further changes, it is better to - fork the topic (perhaps with the same name) afresh from the - tip of "master". - -Let's look at this example: - - o---o---o---o---o---o---o---o---o---o "next" - / / / / - / a---a---b A / / - / / / / - / / c---c---c---c B / - / / / \ / - / / / b---b C \ / - / / / / \ / - ---o---o---o---o---o---o---o---o---o---o---o "master" - - -A, B and C are topic branches. - - * A has one fix since it was merged up to "next". - - * B has finished. It has been fully merged up to "master" and "next", - and is ready to be deleted. - - * C has not merged to "next" at all. - -We would want to allow C to be rebased, refuse A, and encourage -B to be deleted. - -To compute (1): - - git rev-list ^master ^topic next - git rev-list ^master next - - if these match, topic has not merged in next at all. - -To compute (2): - - git rev-list master..topic - - if this is empty, it is fully merged to "master". diff --git a/vendor/github.com/hashicorp/go-getter/test-fixtures/basic-git/DOTgit/hooks/prepare-commit-msg.sample b/vendor/github.com/hashicorp/go-getter/test-fixtures/basic-git/DOTgit/hooks/prepare-commit-msg.sample deleted file mode 100644 index f093a02ec..000000000 --- a/vendor/github.com/hashicorp/go-getter/test-fixtures/basic-git/DOTgit/hooks/prepare-commit-msg.sample +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/sh -# -# An example hook script to prepare the commit log message. -# Called by "git commit" with the name of the file that has the -# commit message, followed by the description of the commit -# message's source. The hook's purpose is to edit the commit -# message file. If the hook fails with a non-zero status, -# the commit is aborted. -# -# To enable this hook, rename this file to "prepare-commit-msg". - -# This hook includes three examples. The first comments out the -# "Conflicts:" part of a merge commit. -# -# The second includes the output of "git diff --name-status -r" -# into the message, just before the "git status" output. It is -# commented because it doesn't cope with --amend or with squashed -# commits. -# -# The third example adds a Signed-off-by line to the message, that can -# still be edited. This is rarely a good idea. - -case "$2,$3" in - merge,) - /usr/bin/perl -i.bak -ne 's/^/# /, s/^# #/#/ if /^Conflicts/ .. /#/; print' "$1" ;; - -# ,|template,) -# /usr/bin/perl -i.bak -pe ' -# print "\n" . `git diff --cached --name-status -r` -# if /^#/ && $first++ == 0' "$1" ;; - - *) ;; -esac - -# SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') -# grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1" diff --git a/vendor/github.com/hashicorp/go-getter/test-fixtures/basic-git/DOTgit/hooks/update.sample b/vendor/github.com/hashicorp/go-getter/test-fixtures/basic-git/DOTgit/hooks/update.sample deleted file mode 100644 index d84758373..000000000 --- a/vendor/github.com/hashicorp/go-getter/test-fixtures/basic-git/DOTgit/hooks/update.sample +++ /dev/null @@ -1,128 +0,0 @@ -#!/bin/sh -# -# An example hook script to blocks unannotated tags from entering. -# Called by "git receive-pack" with arguments: refname sha1-old sha1-new -# -# To enable this hook, rename this file to "update". -# -# Config -# ------ -# hooks.allowunannotated -# This boolean sets whether unannotated tags will be allowed into the -# repository. By default they won't be. -# hooks.allowdeletetag -# This boolean sets whether deleting tags will be allowed in the -# repository. By default they won't be. -# hooks.allowmodifytag -# This boolean sets whether a tag may be modified after creation. By default -# it won't be. -# hooks.allowdeletebranch -# This boolean sets whether deleting branches will be allowed in the -# repository. By default they won't be. -# hooks.denycreatebranch -# This boolean sets whether remotely creating branches will be denied -# in the repository. By default this is allowed. -# - -# --- Command line -refname="$1" -oldrev="$2" -newrev="$3" - -# --- Safety check -if [ -z "$GIT_DIR" ]; then - echo "Don't run this script from the command line." >&2 - echo " (if you want, you could supply GIT_DIR then run" >&2 - echo " $0 )" >&2 - exit 1 -fi - -if [ -z "$refname" -o -z "$oldrev" -o -z "$newrev" ]; then - echo "usage: $0 " >&2 - exit 1 -fi - -# --- Config -allowunannotated=$(git config --bool hooks.allowunannotated) -allowdeletebranch=$(git config --bool hooks.allowdeletebranch) -denycreatebranch=$(git config --bool hooks.denycreatebranch) -allowdeletetag=$(git config --bool hooks.allowdeletetag) -allowmodifytag=$(git config --bool hooks.allowmodifytag) - -# check for no description -projectdesc=$(sed -e '1q' "$GIT_DIR/description") -case "$projectdesc" in -"Unnamed repository"* | "") - echo "*** Project description file hasn't been set" >&2 - exit 1 - ;; -esac - -# --- Check types -# if $newrev is 0000...0000, it's a commit to delete a ref. -zero="0000000000000000000000000000000000000000" -if [ "$newrev" = "$zero" ]; then - newrev_type=delete -else - newrev_type=$(git cat-file -t $newrev) -fi - -case "$refname","$newrev_type" in - refs/tags/*,commit) - # un-annotated tag - short_refname=${refname##refs/tags/} - if [ "$allowunannotated" != "true" ]; then - echo "*** The un-annotated tag, $short_refname, is not allowed in this repository" >&2 - echo "*** Use 'git tag [ -a | -s ]' for tags you want to propagate." >&2 - exit 1 - fi - ;; - refs/tags/*,delete) - # delete tag - if [ "$allowdeletetag" != "true" ]; then - echo "*** Deleting a tag is not allowed in this repository" >&2 - exit 1 - fi - ;; - refs/tags/*,tag) - # annotated tag - if [ "$allowmodifytag" != "true" ] && git rev-parse $refname > /dev/null 2>&1 - then - echo "*** Tag '$refname' already exists." >&2 - echo "*** Modifying a tag is not allowed in this repository." >&2 - exit 1 - fi - ;; - refs/heads/*,commit) - # branch - if [ "$oldrev" = "$zero" -a "$denycreatebranch" = "true" ]; then - echo "*** Creating a branch is not allowed in this repository" >&2 - exit 1 - fi - ;; - refs/heads/*,delete) - # delete branch - if [ "$allowdeletebranch" != "true" ]; then - echo "*** Deleting a branch is not allowed in this repository" >&2 - exit 1 - fi - ;; - refs/remotes/*,commit) - # tracking branch - ;; - refs/remotes/*,delete) - # delete tracking branch - if [ "$allowdeletebranch" != "true" ]; then - echo "*** Deleting a tracking branch is not allowed in this repository" >&2 - exit 1 - fi - ;; - *) - # Anything else (is there anything else?) - echo "*** Update hook: unknown type of update to ref $refname of type $newrev_type" >&2 - exit 1 - ;; -esac - -# --- Finished -exit 0 diff --git a/vendor/github.com/hashicorp/go-getter/test-fixtures/basic-git/DOTgit/index b/vendor/github.com/hashicorp/go-getter/test-fixtures/basic-git/DOTgit/index deleted file mode 100644 index 9586d960f..000000000 Binary files a/vendor/github.com/hashicorp/go-getter/test-fixtures/basic-git/DOTgit/index and /dev/null differ diff --git a/vendor/github.com/hashicorp/go-getter/test-fixtures/basic-git/DOTgit/info/exclude b/vendor/github.com/hashicorp/go-getter/test-fixtures/basic-git/DOTgit/info/exclude deleted file mode 100644 index a5196d1be..000000000 --- a/vendor/github.com/hashicorp/go-getter/test-fixtures/basic-git/DOTgit/info/exclude +++ /dev/null @@ -1,6 +0,0 @@ -# git ls-files --others --exclude-from=.git/info/exclude -# Lines that start with '#' are comments. -# For a project mostly in C, the following would be a good set of -# exclude patterns (uncomment them if you want to use them): -# *.[oa] -# *~ diff --git a/vendor/github.com/hashicorp/go-getter/test-fixtures/basic-git/DOTgit/logs/HEAD b/vendor/github.com/hashicorp/go-getter/test-fixtures/basic-git/DOTgit/logs/HEAD deleted file mode 100644 index 9ab6aac9c..000000000 --- a/vendor/github.com/hashicorp/go-getter/test-fixtures/basic-git/DOTgit/logs/HEAD +++ /dev/null @@ -1,8 +0,0 @@ -0000000000000000000000000000000000000000 497bc37401eb3c9b11865b1768725b64066eccee Mitchell Hashimoto 1410850637 -0700 commit (initial): A commit -497bc37401eb3c9b11865b1768725b64066eccee 243f0fc5c4e586d1a3daa54c981b6f34e9ab1085 Mitchell Hashimoto 1410886526 -0700 commit: tag1 -243f0fc5c4e586d1a3daa54c981b6f34e9ab1085 1f31e97f053caeb5d6b7bffa3faf82941c99efa2 Mitchell Hashimoto 1410886536 -0700 commit: remove tag1 -1f31e97f053caeb5d6b7bffa3faf82941c99efa2 1f31e97f053caeb5d6b7bffa3faf82941c99efa2 Mitchell Hashimoto 1410886909 -0700 checkout: moving from master to test-branch -1f31e97f053caeb5d6b7bffa3faf82941c99efa2 7b7614f8759ac8b5e4b02be65ad8e2667be6dd87 Mitchell Hashimoto 1410886913 -0700 commit: Branch -7b7614f8759ac8b5e4b02be65ad8e2667be6dd87 1f31e97f053caeb5d6b7bffa3faf82941c99efa2 Mitchell Hashimoto 1410886916 -0700 checkout: moving from test-branch to master -1f31e97f053caeb5d6b7bffa3faf82941c99efa2 146492b04efe0aae2b8288c5c0aef6a951030fde Mitchell Hashimoto 1411767116 -0700 commit: add subdir -146492b04efe0aae2b8288c5c0aef6a951030fde 25851303ab930fdacfdb7df91adbf626a483df48 Mitchell Hashimoto 1444775178 -0700 commit: add a file diff --git a/vendor/github.com/hashicorp/go-getter/test-fixtures/basic-git/DOTgit/logs/refs/heads/master b/vendor/github.com/hashicorp/go-getter/test-fixtures/basic-git/DOTgit/logs/refs/heads/master deleted file mode 100644 index ca4c77dd8..000000000 --- a/vendor/github.com/hashicorp/go-getter/test-fixtures/basic-git/DOTgit/logs/refs/heads/master +++ /dev/null @@ -1,5 +0,0 @@ -0000000000000000000000000000000000000000 497bc37401eb3c9b11865b1768725b64066eccee Mitchell Hashimoto 1410850637 -0700 commit (initial): A commit -497bc37401eb3c9b11865b1768725b64066eccee 243f0fc5c4e586d1a3daa54c981b6f34e9ab1085 Mitchell Hashimoto 1410886526 -0700 commit: tag1 -243f0fc5c4e586d1a3daa54c981b6f34e9ab1085 1f31e97f053caeb5d6b7bffa3faf82941c99efa2 Mitchell Hashimoto 1410886536 -0700 commit: remove tag1 -1f31e97f053caeb5d6b7bffa3faf82941c99efa2 146492b04efe0aae2b8288c5c0aef6a951030fde Mitchell Hashimoto 1411767116 -0700 commit: add subdir -146492b04efe0aae2b8288c5c0aef6a951030fde 25851303ab930fdacfdb7df91adbf626a483df48 Mitchell Hashimoto 1444775178 -0700 commit: add a file diff --git a/vendor/github.com/hashicorp/go-getter/test-fixtures/basic-git/DOTgit/logs/refs/heads/test-branch b/vendor/github.com/hashicorp/go-getter/test-fixtures/basic-git/DOTgit/logs/refs/heads/test-branch deleted file mode 100644 index 937067a2a..000000000 --- a/vendor/github.com/hashicorp/go-getter/test-fixtures/basic-git/DOTgit/logs/refs/heads/test-branch +++ /dev/null @@ -1,2 +0,0 @@ -0000000000000000000000000000000000000000 1f31e97f053caeb5d6b7bffa3faf82941c99efa2 Mitchell Hashimoto 1410886909 -0700 branch: Created from HEAD -1f31e97f053caeb5d6b7bffa3faf82941c99efa2 7b7614f8759ac8b5e4b02be65ad8e2667be6dd87 Mitchell Hashimoto 1410886913 -0700 commit: Branch diff --git a/vendor/github.com/hashicorp/go-getter/test-fixtures/basic-git/DOTgit/objects/14/6492b04efe0aae2b8288c5c0aef6a951030fde b/vendor/github.com/hashicorp/go-getter/test-fixtures/basic-git/DOTgit/objects/14/6492b04efe0aae2b8288c5c0aef6a951030fde deleted file mode 100644 index 2a713ec7c..000000000 Binary files a/vendor/github.com/hashicorp/go-getter/test-fixtures/basic-git/DOTgit/objects/14/6492b04efe0aae2b8288c5c0aef6a951030fde and /dev/null differ diff --git a/vendor/github.com/hashicorp/go-getter/test-fixtures/basic-git/DOTgit/objects/1d/3d6744266642cb7623e2c678c33c77b075c49f b/vendor/github.com/hashicorp/go-getter/test-fixtures/basic-git/DOTgit/objects/1d/3d6744266642cb7623e2c678c33c77b075c49f deleted file mode 100644 index 2518fd6ac..000000000 Binary files a/vendor/github.com/hashicorp/go-getter/test-fixtures/basic-git/DOTgit/objects/1d/3d6744266642cb7623e2c678c33c77b075c49f and /dev/null differ diff --git a/vendor/github.com/hashicorp/go-getter/test-fixtures/basic-git/DOTgit/objects/1f/31e97f053caeb5d6b7bffa3faf82941c99efa2 b/vendor/github.com/hashicorp/go-getter/test-fixtures/basic-git/DOTgit/objects/1f/31e97f053caeb5d6b7bffa3faf82941c99efa2 deleted file mode 100644 index 5793a840b..000000000 Binary files a/vendor/github.com/hashicorp/go-getter/test-fixtures/basic-git/DOTgit/objects/1f/31e97f053caeb5d6b7bffa3faf82941c99efa2 and /dev/null differ diff --git a/vendor/github.com/hashicorp/go-getter/test-fixtures/basic-git/DOTgit/objects/24/3f0fc5c4e586d1a3daa54c981b6f34e9ab1085 b/vendor/github.com/hashicorp/go-getter/test-fixtures/basic-git/DOTgit/objects/24/3f0fc5c4e586d1a3daa54c981b6f34e9ab1085 deleted file mode 100644 index 19819238b..000000000 Binary files a/vendor/github.com/hashicorp/go-getter/test-fixtures/basic-git/DOTgit/objects/24/3f0fc5c4e586d1a3daa54c981b6f34e9ab1085 and /dev/null differ diff --git a/vendor/github.com/hashicorp/go-getter/test-fixtures/basic-git/DOTgit/objects/25/851303ab930fdacfdb7df91adbf626a483df48 b/vendor/github.com/hashicorp/go-getter/test-fixtures/basic-git/DOTgit/objects/25/851303ab930fdacfdb7df91adbf626a483df48 deleted file mode 100644 index 80de4b622..000000000 --- a/vendor/github.com/hashicorp/go-getter/test-fixtures/basic-git/DOTgit/objects/25/851303ab930fdacfdb7df91adbf626a483df48 +++ /dev/null @@ -1 +0,0 @@ -xK `לb.`3P(ҍ`$ELKL/Z:(c}gőEX9%E5A}I^W5gF"V)碉HF9w_Wz4|mZvW*[=5:8ECG_l,>T2 \ No newline at end of file diff --git a/vendor/github.com/hashicorp/go-getter/test-fixtures/basic-git/DOTgit/objects/38/30637158f774a20edcc0bf1c4d07b0bf87c43d b/vendor/github.com/hashicorp/go-getter/test-fixtures/basic-git/DOTgit/objects/38/30637158f774a20edcc0bf1c4d07b0bf87c43d deleted file mode 100644 index ef8ebf728..000000000 Binary files a/vendor/github.com/hashicorp/go-getter/test-fixtures/basic-git/DOTgit/objects/38/30637158f774a20edcc0bf1c4d07b0bf87c43d and /dev/null differ diff --git a/vendor/github.com/hashicorp/go-getter/test-fixtures/basic-git/DOTgit/objects/40/4618c9d96dfa0a5d365b518e0dfbb5a387c649 b/vendor/github.com/hashicorp/go-getter/test-fixtures/basic-git/DOTgit/objects/40/4618c9d96dfa0a5d365b518e0dfbb5a387c649 deleted file mode 100644 index 434fcab20..000000000 Binary files a/vendor/github.com/hashicorp/go-getter/test-fixtures/basic-git/DOTgit/objects/40/4618c9d96dfa0a5d365b518e0dfbb5a387c649 and /dev/null differ diff --git a/vendor/github.com/hashicorp/go-getter/test-fixtures/basic-git/DOTgit/objects/49/7bc37401eb3c9b11865b1768725b64066eccee b/vendor/github.com/hashicorp/go-getter/test-fixtures/basic-git/DOTgit/objects/49/7bc37401eb3c9b11865b1768725b64066eccee deleted file mode 100644 index ebf34c65d..000000000 --- a/vendor/github.com/hashicorp/go-getter/test-fixtures/basic-git/DOTgit/objects/49/7bc37401eb3c9b11865b1768725b64066eccee +++ /dev/null @@ -1,2 +0,0 @@ -xM -1 @a=E.MZѝkx >x_U-g&xG EByA >/)}kT….ѸSl HjqH %D \ No newline at end of file diff --git a/vendor/github.com/hashicorp/go-getter/test-fixtures/basic-git/DOTgit/objects/7b/7614f8759ac8b5e4b02be65ad8e2667be6dd87 b/vendor/github.com/hashicorp/go-getter/test-fixtures/basic-git/DOTgit/objects/7b/7614f8759ac8b5e4b02be65ad8e2667be6dd87 deleted file mode 100644 index abe281a74..000000000 --- a/vendor/github.com/hashicorp/go-getter/test-fixtures/basic-git/DOTgit/objects/7b/7614f8759ac8b5e4b02be65ad8e2667be6dd87 +++ /dev/null @@ -1,2 +0,0 @@ -xK -0aYE6`I7#'.&FbܿEpN?'Zg#r->l&`&Qdр.Y:nKR#aT&"(s23(2Ru7xi?򨰬Sj̥{G`k-S \ No newline at end of file diff --git a/vendor/github.com/hashicorp/go-getter/test-fixtures/basic-git/DOTgit/objects/8c/1a79ca1f98b6d00f5bf5c6cc9e8d3c092dd3ba b/vendor/github.com/hashicorp/go-getter/test-fixtures/basic-git/DOTgit/objects/8c/1a79ca1f98b6d00f5bf5c6cc9e8d3c092dd3ba deleted file mode 100644 index 656ae8e33..000000000 Binary files a/vendor/github.com/hashicorp/go-getter/test-fixtures/basic-git/DOTgit/objects/8c/1a79ca1f98b6d00f5bf5c6cc9e8d3c092dd3ba and /dev/null differ diff --git a/vendor/github.com/hashicorp/go-getter/test-fixtures/basic-git/DOTgit/objects/96/43088174e25a9bd91c27970a580af0085c9f32 b/vendor/github.com/hashicorp/go-getter/test-fixtures/basic-git/DOTgit/objects/96/43088174e25a9bd91c27970a580af0085c9f32 deleted file mode 100644 index 387943288..000000000 Binary files a/vendor/github.com/hashicorp/go-getter/test-fixtures/basic-git/DOTgit/objects/96/43088174e25a9bd91c27970a580af0085c9f32 and /dev/null differ diff --git a/vendor/github.com/hashicorp/go-getter/test-fixtures/basic-git/DOTgit/objects/b7/757b6a3696ad036e9aa2f5b4856d09e7f17993 b/vendor/github.com/hashicorp/go-getter/test-fixtures/basic-git/DOTgit/objects/b7/757b6a3696ad036e9aa2f5b4856d09e7f17993 deleted file mode 100644 index 101925665..000000000 Binary files a/vendor/github.com/hashicorp/go-getter/test-fixtures/basic-git/DOTgit/objects/b7/757b6a3696ad036e9aa2f5b4856d09e7f17993 and /dev/null differ diff --git a/vendor/github.com/hashicorp/go-getter/test-fixtures/basic-git/DOTgit/objects/d2/368a7048e1e919eebaad2a9a275b18cc9c4181 b/vendor/github.com/hashicorp/go-getter/test-fixtures/basic-git/DOTgit/objects/d2/368a7048e1e919eebaad2a9a275b18cc9c4181 deleted file mode 100644 index 10e19bed9..000000000 Binary files a/vendor/github.com/hashicorp/go-getter/test-fixtures/basic-git/DOTgit/objects/d2/368a7048e1e919eebaad2a9a275b18cc9c4181 and /dev/null differ diff --git a/vendor/github.com/hashicorp/go-getter/test-fixtures/basic-git/DOTgit/objects/e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391 b/vendor/github.com/hashicorp/go-getter/test-fixtures/basic-git/DOTgit/objects/e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391 deleted file mode 100644 index 711223894..000000000 Binary files a/vendor/github.com/hashicorp/go-getter/test-fixtures/basic-git/DOTgit/objects/e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391 and /dev/null differ diff --git a/vendor/github.com/hashicorp/go-getter/test-fixtures/basic-git/DOTgit/objects/e9/65047ad7c57865823c7d992b1d046ea66edf78 b/vendor/github.com/hashicorp/go-getter/test-fixtures/basic-git/DOTgit/objects/e9/65047ad7c57865823c7d992b1d046ea66edf78 deleted file mode 100644 index 341688abf..000000000 Binary files a/vendor/github.com/hashicorp/go-getter/test-fixtures/basic-git/DOTgit/objects/e9/65047ad7c57865823c7d992b1d046ea66edf78 and /dev/null differ diff --git a/vendor/github.com/hashicorp/go-getter/test-fixtures/basic-git/DOTgit/refs/heads/master b/vendor/github.com/hashicorp/go-getter/test-fixtures/basic-git/DOTgit/refs/heads/master deleted file mode 100644 index e0087df7c..000000000 --- a/vendor/github.com/hashicorp/go-getter/test-fixtures/basic-git/DOTgit/refs/heads/master +++ /dev/null @@ -1 +0,0 @@ -25851303ab930fdacfdb7df91adbf626a483df48 diff --git a/vendor/github.com/hashicorp/go-getter/test-fixtures/basic-git/DOTgit/refs/heads/test-branch b/vendor/github.com/hashicorp/go-getter/test-fixtures/basic-git/DOTgit/refs/heads/test-branch deleted file mode 100644 index a5f298b83..000000000 --- a/vendor/github.com/hashicorp/go-getter/test-fixtures/basic-git/DOTgit/refs/heads/test-branch +++ /dev/null @@ -1 +0,0 @@ -7b7614f8759ac8b5e4b02be65ad8e2667be6dd87 diff --git a/vendor/github.com/hashicorp/go-getter/test-fixtures/basic-git/DOTgit/refs/tags/v1.0 b/vendor/github.com/hashicorp/go-getter/test-fixtures/basic-git/DOTgit/refs/tags/v1.0 deleted file mode 100644 index ada519059..000000000 --- a/vendor/github.com/hashicorp/go-getter/test-fixtures/basic-git/DOTgit/refs/tags/v1.0 +++ /dev/null @@ -1 +0,0 @@ -243f0fc5c4e586d1a3daa54c981b6f34e9ab1085 diff --git a/vendor/github.com/hashicorp/go-getter/test-fixtures/basic-git/foo.txt b/vendor/github.com/hashicorp/go-getter/test-fixtures/basic-git/foo.txt deleted file mode 100644 index e965047ad..000000000 --- a/vendor/github.com/hashicorp/go-getter/test-fixtures/basic-git/foo.txt +++ /dev/null @@ -1 +0,0 @@ -Hello diff --git a/vendor/github.com/hashicorp/go-getter/test-fixtures/basic-git/main.tf b/vendor/github.com/hashicorp/go-getter/test-fixtures/basic-git/main.tf deleted file mode 100644 index 383063715..000000000 --- a/vendor/github.com/hashicorp/go-getter/test-fixtures/basic-git/main.tf +++ /dev/null @@ -1,5 +0,0 @@ -# Hello - -module "foo" { - source = "./foo" -} diff --git a/vendor/github.com/hashicorp/go-getter/test-fixtures/basic-git/subdir/sub.tf b/vendor/github.com/hashicorp/go-getter/test-fixtures/basic-git/subdir/sub.tf deleted file mode 100644 index e69de29bb..000000000 diff --git a/vendor/github.com/hashicorp/go-getter/test-fixtures/basic-hg/foo.txt b/vendor/github.com/hashicorp/go-getter/test-fixtures/basic-hg/foo.txt deleted file mode 100644 index e965047ad..000000000 --- a/vendor/github.com/hashicorp/go-getter/test-fixtures/basic-hg/foo.txt +++ /dev/null @@ -1 +0,0 @@ -Hello diff --git a/vendor/github.com/hashicorp/go-getter/test-fixtures/basic-hg/main.tf b/vendor/github.com/hashicorp/go-getter/test-fixtures/basic-hg/main.tf deleted file mode 100644 index 383063715..000000000 --- a/vendor/github.com/hashicorp/go-getter/test-fixtures/basic-hg/main.tf +++ /dev/null @@ -1,5 +0,0 @@ -# Hello - -module "foo" { - source = "./foo" -} diff --git a/vendor/github.com/hashicorp/go-getter/test-fixtures/basic-parent/a/a.tf b/vendor/github.com/hashicorp/go-getter/test-fixtures/basic-parent/a/a.tf deleted file mode 100644 index b9b44f464..000000000 --- a/vendor/github.com/hashicorp/go-getter/test-fixtures/basic-parent/a/a.tf +++ /dev/null @@ -1,3 +0,0 @@ -module "b" { - source = "../c" -} diff --git a/vendor/github.com/hashicorp/go-getter/test-fixtures/basic-parent/c/c.tf b/vendor/github.com/hashicorp/go-getter/test-fixtures/basic-parent/c/c.tf deleted file mode 100644 index fec56017d..000000000 --- a/vendor/github.com/hashicorp/go-getter/test-fixtures/basic-parent/c/c.tf +++ /dev/null @@ -1 +0,0 @@ -# Hello diff --git a/vendor/github.com/hashicorp/go-getter/test-fixtures/basic-parent/main.tf b/vendor/github.com/hashicorp/go-getter/test-fixtures/basic-parent/main.tf deleted file mode 100644 index 2326ee22a..000000000 --- a/vendor/github.com/hashicorp/go-getter/test-fixtures/basic-parent/main.tf +++ /dev/null @@ -1,3 +0,0 @@ -module "a" { - source = "./a" -} diff --git a/vendor/github.com/hashicorp/go-getter/test-fixtures/basic-subdir/foo/sub/baz/main.tf b/vendor/github.com/hashicorp/go-getter/test-fixtures/basic-subdir/foo/sub/baz/main.tf deleted file mode 100644 index e69de29bb..000000000 diff --git a/vendor/github.com/hashicorp/go-getter/test-fixtures/basic-subdir/foo/sub/main.tf b/vendor/github.com/hashicorp/go-getter/test-fixtures/basic-subdir/foo/sub/main.tf deleted file mode 100644 index 22905dd53..000000000 --- a/vendor/github.com/hashicorp/go-getter/test-fixtures/basic-subdir/foo/sub/main.tf +++ /dev/null @@ -1,3 +0,0 @@ -module "bar" { - source = "./baz" -} diff --git a/vendor/github.com/hashicorp/go-getter/test-fixtures/basic-subdir/main.tf b/vendor/github.com/hashicorp/go-getter/test-fixtures/basic-subdir/main.tf deleted file mode 100644 index 19fb5dde7..000000000 --- a/vendor/github.com/hashicorp/go-getter/test-fixtures/basic-subdir/main.tf +++ /dev/null @@ -1,3 +0,0 @@ -module "foo" { - source = "./foo//sub" -} diff --git a/vendor/github.com/hashicorp/go-getter/test-fixtures/basic/foo/main.tf b/vendor/github.com/hashicorp/go-getter/test-fixtures/basic/foo/main.tf deleted file mode 100644 index fec56017d..000000000 --- a/vendor/github.com/hashicorp/go-getter/test-fixtures/basic/foo/main.tf +++ /dev/null @@ -1 +0,0 @@ -# Hello diff --git a/vendor/github.com/hashicorp/go-getter/test-fixtures/basic/main.tf b/vendor/github.com/hashicorp/go-getter/test-fixtures/basic/main.tf deleted file mode 100644 index 383063715..000000000 --- a/vendor/github.com/hashicorp/go-getter/test-fixtures/basic/main.tf +++ /dev/null @@ -1,5 +0,0 @@ -# Hello - -module "foo" { - source = "./foo" -} diff --git a/vendor/github.com/hashicorp/go-getter/test-fixtures/basic/subdir/sub.tf b/vendor/github.com/hashicorp/go-getter/test-fixtures/basic/subdir/sub.tf deleted file mode 100644 index e69de29bb..000000000 diff --git a/vendor/github.com/hashicorp/go-getter/test-fixtures/child/foo/bar/main.tf b/vendor/github.com/hashicorp/go-getter/test-fixtures/child/foo/bar/main.tf deleted file mode 100644 index df5927501..000000000 --- a/vendor/github.com/hashicorp/go-getter/test-fixtures/child/foo/bar/main.tf +++ /dev/null @@ -1,2 +0,0 @@ -# Hello - diff --git a/vendor/github.com/hashicorp/go-getter/test-fixtures/child/foo/main.tf b/vendor/github.com/hashicorp/go-getter/test-fixtures/child/foo/main.tf deleted file mode 100644 index 548d21b99..000000000 --- a/vendor/github.com/hashicorp/go-getter/test-fixtures/child/foo/main.tf +++ /dev/null @@ -1,5 +0,0 @@ -# Hello - -module "bar" { - source = "./bar" -} diff --git a/vendor/github.com/hashicorp/go-getter/test-fixtures/child/main.tf b/vendor/github.com/hashicorp/go-getter/test-fixtures/child/main.tf deleted file mode 100644 index 383063715..000000000 --- a/vendor/github.com/hashicorp/go-getter/test-fixtures/child/main.tf +++ /dev/null @@ -1,5 +0,0 @@ -# Hello - -module "foo" { - source = "./foo" -} diff --git a/vendor/github.com/hashicorp/go-getter/test-fixtures/decompress-bz2/single.bz2 b/vendor/github.com/hashicorp/go-getter/test-fixtures/decompress-bz2/single.bz2 deleted file mode 100644 index 96f131dba..000000000 --- a/vendor/github.com/hashicorp/go-getter/test-fixtures/decompress-bz2/single.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:39af1cefacbcae7a1f0c4a563e1091b454b5b0ab18203dcb4fd7be42bf766dc2 -size 40 diff --git a/vendor/github.com/hashicorp/go-getter/test-fixtures/decompress-gz/single.gz b/vendor/github.com/hashicorp/go-getter/test-fixtures/decompress-gz/single.gz deleted file mode 100644 index 768fd68ff..000000000 --- a/vendor/github.com/hashicorp/go-getter/test-fixtures/decompress-gz/single.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:37f793280df6977e3e4b7fadbcfb71f85de3f9133f69a22c794dff43ecc16b41 -size 29 diff --git a/vendor/github.com/hashicorp/go-getter/test-fixtures/decompress-tbz2/empty.tar.bz2 b/vendor/github.com/hashicorp/go-getter/test-fixtures/decompress-tbz2/empty.tar.bz2 deleted file mode 100644 index 5b010ed23..000000000 --- a/vendor/github.com/hashicorp/go-getter/test-fixtures/decompress-tbz2/empty.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f4fad25a0e7a451ed906b76846efd6d2699a65b40795b29553addc35bf9a75c8 -size 46 diff --git a/vendor/github.com/hashicorp/go-getter/test-fixtures/decompress-tbz2/multiple.tar.bz2 b/vendor/github.com/hashicorp/go-getter/test-fixtures/decompress-tbz2/multiple.tar.bz2 deleted file mode 100644 index 43a365d54..000000000 --- a/vendor/github.com/hashicorp/go-getter/test-fixtures/decompress-tbz2/multiple.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:74d1ab69e89ef822233a9dd2361e2189cb1cc8cad4fbc955df91c6e45e523930 -size 166 diff --git a/vendor/github.com/hashicorp/go-getter/test-fixtures/decompress-tbz2/single.tar.bz2 b/vendor/github.com/hashicorp/go-getter/test-fixtures/decompress-tbz2/single.tar.bz2 deleted file mode 100644 index fbfd404e2..000000000 --- a/vendor/github.com/hashicorp/go-getter/test-fixtures/decompress-tbz2/single.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:5f81c94a54126fc3a2615313d43dce12855fd492ca5b73fa29c5cd7ecd19d58d -size 135 diff --git a/vendor/github.com/hashicorp/go-getter/test-fixtures/decompress-tgz/empty.tar.gz b/vendor/github.com/hashicorp/go-getter/test-fixtures/decompress-tgz/empty.tar.gz deleted file mode 100644 index b7f6d6e39..000000000 --- a/vendor/github.com/hashicorp/go-getter/test-fixtures/decompress-tgz/empty.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b09f1e14f469a7a45361acc8b697aa60d365395a5354375b03cdca8e92ee70ea -size 45 diff --git a/vendor/github.com/hashicorp/go-getter/test-fixtures/decompress-tgz/multiple.tar.gz b/vendor/github.com/hashicorp/go-getter/test-fixtures/decompress-tgz/multiple.tar.gz deleted file mode 100644 index bc3686836..000000000 --- a/vendor/github.com/hashicorp/go-getter/test-fixtures/decompress-tgz/multiple.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:449bc05c214832049c3c749ebe912b1ed0d0beed52e4737ec06675b63069d1c5 -size 157 diff --git a/vendor/github.com/hashicorp/go-getter/test-fixtures/decompress-tgz/single.tar.gz b/vendor/github.com/hashicorp/go-getter/test-fixtures/decompress-tgz/single.tar.gz deleted file mode 100644 index 16b5d8e76..000000000 --- a/vendor/github.com/hashicorp/go-getter/test-fixtures/decompress-tgz/single.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9f8726711bba090fc08a597da2345a4bbb6f420d09f9abde7e79208b2703f660 -size 137 diff --git a/vendor/github.com/hashicorp/go-getter/test-fixtures/decompress-zip/empty.zip b/vendor/github.com/hashicorp/go-getter/test-fixtures/decompress-zip/empty.zip deleted file mode 100644 index fe3604a05..000000000 --- a/vendor/github.com/hashicorp/go-getter/test-fixtures/decompress-zip/empty.zip +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:8739c76e681f900923b900c9df0ef75cf421d39cabb54650c4b9ad19b6a76d85 -size 22 diff --git a/vendor/github.com/hashicorp/go-getter/test-fixtures/decompress-zip/multiple.zip b/vendor/github.com/hashicorp/go-getter/test-fixtures/decompress-zip/multiple.zip deleted file mode 100644 index 5677c40d1..000000000 --- a/vendor/github.com/hashicorp/go-getter/test-fixtures/decompress-zip/multiple.zip +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:98156b1584da7b9894f694e38bdfef833b6fff2f1e1e293b0e35bb41396d48b7 -size 306 diff --git a/vendor/github.com/hashicorp/go-getter/test-fixtures/decompress-zip/single.zip b/vendor/github.com/hashicorp/go-getter/test-fixtures/decompress-zip/single.zip deleted file mode 100644 index 4dc1846e6..000000000 --- a/vendor/github.com/hashicorp/go-getter/test-fixtures/decompress-zip/single.zip +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:cf4f905a2f08d6d2ab36c93f02ef35a588bd16c693eb4ac1b13e444bfbb679a6 -size 162 diff --git a/vendor/github.com/hashicorp/go-getter/test-fixtures/dup/foo/main.tf b/vendor/github.com/hashicorp/go-getter/test-fixtures/dup/foo/main.tf deleted file mode 100644 index e69de29bb..000000000 diff --git a/vendor/github.com/hashicorp/go-getter/test-fixtures/dup/main.tf b/vendor/github.com/hashicorp/go-getter/test-fixtures/dup/main.tf deleted file mode 100644 index 98efd6e4f..000000000 --- a/vendor/github.com/hashicorp/go-getter/test-fixtures/dup/main.tf +++ /dev/null @@ -1,7 +0,0 @@ -module "foo" { - source = "./foo" -} - -module "foo" { - source = "./foo" -} diff --git a/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-1/COMMIT_EDITMSG b/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-1/COMMIT_EDITMSG deleted file mode 100644 index d5297f6c9..000000000 --- a/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-1/COMMIT_EDITMSG +++ /dev/null @@ -1,7 +0,0 @@ -Initial branch -# Please enter the commit message for your changes. Lines starting -# with '#' will be ignored, and an empty message aborts the commit. -# On branch test-branch -# Changes to be committed: -# new file: main_branch.tf -# diff --git a/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-1/HEAD b/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-1/HEAD deleted file mode 100644 index b04b97d48..000000000 --- a/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-1/HEAD +++ /dev/null @@ -1 +0,0 @@ -ref: refs/heads/test-branch diff --git a/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-1/config b/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-1/config deleted file mode 100644 index 6c9406b7d..000000000 --- a/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-1/config +++ /dev/null @@ -1,7 +0,0 @@ -[core] - repositoryformatversion = 0 - filemode = true - bare = false - logallrefupdates = true - ignorecase = true - precomposeunicode = true diff --git a/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-1/description b/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-1/description deleted file mode 100644 index 498b267a8..000000000 --- a/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-1/description +++ /dev/null @@ -1 +0,0 @@ -Unnamed repository; edit this file 'description' to name the repository. diff --git a/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-1/hooks/applypatch-msg.sample b/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-1/hooks/applypatch-msg.sample deleted file mode 100644 index 8b2a2fe84..000000000 --- a/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-1/hooks/applypatch-msg.sample +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh -# -# An example hook script to check the commit log message taken by -# applypatch from an e-mail message. -# -# The hook should exit with non-zero status after issuing an -# appropriate message if it wants to stop the commit. The hook is -# allowed to edit the commit message file. -# -# To enable this hook, rename this file to "applypatch-msg". - -. git-sh-setup -test -x "$GIT_DIR/hooks/commit-msg" && - exec "$GIT_DIR/hooks/commit-msg" ${1+"$@"} -: diff --git a/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-1/hooks/commit-msg.sample b/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-1/hooks/commit-msg.sample deleted file mode 100644 index b58d1184a..000000000 --- a/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-1/hooks/commit-msg.sample +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/sh -# -# An example hook script to check the commit log message. -# Called by "git commit" with one argument, the name of the file -# that has the commit message. The hook should exit with non-zero -# status after issuing an appropriate message if it wants to stop the -# commit. The hook is allowed to edit the commit message file. -# -# To enable this hook, rename this file to "commit-msg". - -# Uncomment the below to add a Signed-off-by line to the message. -# Doing this in a hook is a bad idea in general, but the prepare-commit-msg -# hook is more suited to it. -# -# SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') -# grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1" - -# This example catches duplicate Signed-off-by lines. - -test "" = "$(grep '^Signed-off-by: ' "$1" | - sort | uniq -c | sed -e '/^[ ]*1[ ]/d')" || { - echo >&2 Duplicate Signed-off-by lines. - exit 1 -} diff --git a/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-1/hooks/post-update.sample b/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-1/hooks/post-update.sample deleted file mode 100644 index ec17ec193..000000000 --- a/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-1/hooks/post-update.sample +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh -# -# An example hook script to prepare a packed repository for use over -# dumb transports. -# -# To enable this hook, rename this file to "post-update". - -exec git update-server-info diff --git a/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-1/hooks/pre-applypatch.sample b/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-1/hooks/pre-applypatch.sample deleted file mode 100644 index b1f187c2e..000000000 --- a/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-1/hooks/pre-applypatch.sample +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh -# -# An example hook script to verify what is about to be committed -# by applypatch from an e-mail message. -# -# The hook should exit with non-zero status after issuing an -# appropriate message if it wants to stop the commit. -# -# To enable this hook, rename this file to "pre-applypatch". - -. git-sh-setup -test -x "$GIT_DIR/hooks/pre-commit" && - exec "$GIT_DIR/hooks/pre-commit" ${1+"$@"} -: diff --git a/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-1/hooks/pre-commit.sample b/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-1/hooks/pre-commit.sample deleted file mode 100644 index 68d62d544..000000000 --- a/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-1/hooks/pre-commit.sample +++ /dev/null @@ -1,49 +0,0 @@ -#!/bin/sh -# -# An example hook script to verify what is about to be committed. -# Called by "git commit" with no arguments. The hook should -# exit with non-zero status after issuing an appropriate message if -# it wants to stop the commit. -# -# To enable this hook, rename this file to "pre-commit". - -if git rev-parse --verify HEAD >/dev/null 2>&1 -then - against=HEAD -else - # Initial commit: diff against an empty tree object - against=4b825dc642cb6eb9a060e54bf8d69288fbee4904 -fi - -# If you want to allow non-ASCII filenames set this variable to true. -allownonascii=$(git config --bool hooks.allownonascii) - -# Redirect output to stderr. -exec 1>&2 - -# Cross platform projects tend to avoid non-ASCII filenames; prevent -# them from being added to the repository. We exploit the fact that the -# printable range starts at the space character and ends with tilde. -if [ "$allownonascii" != "true" ] && - # Note that the use of brackets around a tr range is ok here, (it's - # even required, for portability to Solaris 10's /usr/bin/tr), since - # the square bracket bytes happen to fall in the designated range. - test $(git diff --cached --name-only --diff-filter=A -z $against | - LC_ALL=C tr -d '[ -~]\0' | wc -c) != 0 -then - cat <<\EOF -Error: Attempt to add a non-ASCII file name. - -This can cause problems if you want to work with people on other platforms. - -To be portable it is advisable to rename the file. - -If you know what you are doing you can disable this check using: - - git config hooks.allownonascii true -EOF - exit 1 -fi - -# If there are whitespace errors, print the offending file names and fail. -exec git diff-index --check --cached $against -- diff --git a/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-1/hooks/pre-push.sample b/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-1/hooks/pre-push.sample deleted file mode 100644 index 6187dbf43..000000000 --- a/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-1/hooks/pre-push.sample +++ /dev/null @@ -1,53 +0,0 @@ -#!/bin/sh - -# An example hook script to verify what is about to be pushed. Called by "git -# push" after it has checked the remote status, but before anything has been -# pushed. If this script exits with a non-zero status nothing will be pushed. -# -# This hook is called with the following parameters: -# -# $1 -- Name of the remote to which the push is being done -# $2 -- URL to which the push is being done -# -# If pushing without using a named remote those arguments will be equal. -# -# Information about the commits which are being pushed is supplied as lines to -# the standard input in the form: -# -# -# -# This sample shows how to prevent push of commits where the log message starts -# with "WIP" (work in progress). - -remote="$1" -url="$2" - -z40=0000000000000000000000000000000000000000 - -while read local_ref local_sha remote_ref remote_sha -do - if [ "$local_sha" = $z40 ] - then - # Handle delete - : - else - if [ "$remote_sha" = $z40 ] - then - # New branch, examine all commits - range="$local_sha" - else - # Update to existing branch, examine new commits - range="$remote_sha..$local_sha" - fi - - # Check for WIP commit - commit=`git rev-list -n 1 --grep '^WIP' "$range"` - if [ -n "$commit" ] - then - echo >&2 "Found WIP commit in $local_ref, not pushing" - exit 1 - fi - fi -done - -exit 0 diff --git a/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-1/hooks/pre-rebase.sample b/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-1/hooks/pre-rebase.sample deleted file mode 100644 index 9773ed4cb..000000000 --- a/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-1/hooks/pre-rebase.sample +++ /dev/null @@ -1,169 +0,0 @@ -#!/bin/sh -# -# Copyright (c) 2006, 2008 Junio C Hamano -# -# The "pre-rebase" hook is run just before "git rebase" starts doing -# its job, and can prevent the command from running by exiting with -# non-zero status. -# -# The hook is called with the following parameters: -# -# $1 -- the upstream the series was forked from. -# $2 -- the branch being rebased (or empty when rebasing the current branch). -# -# This sample shows how to prevent topic branches that are already -# merged to 'next' branch from getting rebased, because allowing it -# would result in rebasing already published history. - -publish=next -basebranch="$1" -if test "$#" = 2 -then - topic="refs/heads/$2" -else - topic=`git symbolic-ref HEAD` || - exit 0 ;# we do not interrupt rebasing detached HEAD -fi - -case "$topic" in -refs/heads/??/*) - ;; -*) - exit 0 ;# we do not interrupt others. - ;; -esac - -# Now we are dealing with a topic branch being rebased -# on top of master. Is it OK to rebase it? - -# Does the topic really exist? -git show-ref -q "$topic" || { - echo >&2 "No such branch $topic" - exit 1 -} - -# Is topic fully merged to master? -not_in_master=`git rev-list --pretty=oneline ^master "$topic"` -if test -z "$not_in_master" -then - echo >&2 "$topic is fully merged to master; better remove it." - exit 1 ;# we could allow it, but there is no point. -fi - -# Is topic ever merged to next? If so you should not be rebasing it. -only_next_1=`git rev-list ^master "^$topic" ${publish} | sort` -only_next_2=`git rev-list ^master ${publish} | sort` -if test "$only_next_1" = "$only_next_2" -then - not_in_topic=`git rev-list "^$topic" master` - if test -z "$not_in_topic" - then - echo >&2 "$topic is already up-to-date with master" - exit 1 ;# we could allow it, but there is no point. - else - exit 0 - fi -else - not_in_next=`git rev-list --pretty=oneline ^${publish} "$topic"` - /usr/bin/perl -e ' - my $topic = $ARGV[0]; - my $msg = "* $topic has commits already merged to public branch:\n"; - my (%not_in_next) = map { - /^([0-9a-f]+) /; - ($1 => 1); - } split(/\n/, $ARGV[1]); - for my $elem (map { - /^([0-9a-f]+) (.*)$/; - [$1 => $2]; - } split(/\n/, $ARGV[2])) { - if (!exists $not_in_next{$elem->[0]}) { - if ($msg) { - print STDERR $msg; - undef $msg; - } - print STDERR " $elem->[1]\n"; - } - } - ' "$topic" "$not_in_next" "$not_in_master" - exit 1 -fi - -exit 0 - -################################################################ - -This sample hook safeguards topic branches that have been -published from being rewound. - -The workflow assumed here is: - - * Once a topic branch forks from "master", "master" is never - merged into it again (either directly or indirectly). - - * Once a topic branch is fully cooked and merged into "master", - it is deleted. If you need to build on top of it to correct - earlier mistakes, a new topic branch is created by forking at - the tip of the "master". This is not strictly necessary, but - it makes it easier to keep your history simple. - - * Whenever you need to test or publish your changes to topic - branches, merge them into "next" branch. - -The script, being an example, hardcodes the publish branch name -to be "next", but it is trivial to make it configurable via -$GIT_DIR/config mechanism. - -With this workflow, you would want to know: - -(1) ... if a topic branch has ever been merged to "next". Young - topic branches can have stupid mistakes you would rather - clean up before publishing, and things that have not been - merged into other branches can be easily rebased without - affecting other people. But once it is published, you would - not want to rewind it. - -(2) ... if a topic branch has been fully merged to "master". - Then you can delete it. More importantly, you should not - build on top of it -- other people may already want to - change things related to the topic as patches against your - "master", so if you need further changes, it is better to - fork the topic (perhaps with the same name) afresh from the - tip of "master". - -Let's look at this example: - - o---o---o---o---o---o---o---o---o---o "next" - / / / / - / a---a---b A / / - / / / / - / / c---c---c---c B / - / / / \ / - / / / b---b C \ / - / / / / \ / - ---o---o---o---o---o---o---o---o---o---o---o "master" - - -A, B and C are topic branches. - - * A has one fix since it was merged up to "next". - - * B has finished. It has been fully merged up to "master" and "next", - and is ready to be deleted. - - * C has not merged to "next" at all. - -We would want to allow C to be rebased, refuse A, and encourage -B to be deleted. - -To compute (1): - - git rev-list ^master ^topic next - git rev-list ^master next - - if these match, topic has not merged in next at all. - -To compute (2): - - git rev-list master..topic - - if this is empty, it is fully merged to "master". diff --git a/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-1/hooks/prepare-commit-msg.sample b/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-1/hooks/prepare-commit-msg.sample deleted file mode 100644 index f093a02ec..000000000 --- a/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-1/hooks/prepare-commit-msg.sample +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/sh -# -# An example hook script to prepare the commit log message. -# Called by "git commit" with the name of the file that has the -# commit message, followed by the description of the commit -# message's source. The hook's purpose is to edit the commit -# message file. If the hook fails with a non-zero status, -# the commit is aborted. -# -# To enable this hook, rename this file to "prepare-commit-msg". - -# This hook includes three examples. The first comments out the -# "Conflicts:" part of a merge commit. -# -# The second includes the output of "git diff --name-status -r" -# into the message, just before the "git status" output. It is -# commented because it doesn't cope with --amend or with squashed -# commits. -# -# The third example adds a Signed-off-by line to the message, that can -# still be edited. This is rarely a good idea. - -case "$2,$3" in - merge,) - /usr/bin/perl -i.bak -ne 's/^/# /, s/^# #/#/ if /^Conflicts/ .. /#/; print' "$1" ;; - -# ,|template,) -# /usr/bin/perl -i.bak -pe ' -# print "\n" . `git diff --cached --name-status -r` -# if /^#/ && $first++ == 0' "$1" ;; - - *) ;; -esac - -# SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') -# grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1" diff --git a/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-1/hooks/update.sample b/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-1/hooks/update.sample deleted file mode 100644 index d84758373..000000000 --- a/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-1/hooks/update.sample +++ /dev/null @@ -1,128 +0,0 @@ -#!/bin/sh -# -# An example hook script to blocks unannotated tags from entering. -# Called by "git receive-pack" with arguments: refname sha1-old sha1-new -# -# To enable this hook, rename this file to "update". -# -# Config -# ------ -# hooks.allowunannotated -# This boolean sets whether unannotated tags will be allowed into the -# repository. By default they won't be. -# hooks.allowdeletetag -# This boolean sets whether deleting tags will be allowed in the -# repository. By default they won't be. -# hooks.allowmodifytag -# This boolean sets whether a tag may be modified after creation. By default -# it won't be. -# hooks.allowdeletebranch -# This boolean sets whether deleting branches will be allowed in the -# repository. By default they won't be. -# hooks.denycreatebranch -# This boolean sets whether remotely creating branches will be denied -# in the repository. By default this is allowed. -# - -# --- Command line -refname="$1" -oldrev="$2" -newrev="$3" - -# --- Safety check -if [ -z "$GIT_DIR" ]; then - echo "Don't run this script from the command line." >&2 - echo " (if you want, you could supply GIT_DIR then run" >&2 - echo " $0 )" >&2 - exit 1 -fi - -if [ -z "$refname" -o -z "$oldrev" -o -z "$newrev" ]; then - echo "usage: $0 " >&2 - exit 1 -fi - -# --- Config -allowunannotated=$(git config --bool hooks.allowunannotated) -allowdeletebranch=$(git config --bool hooks.allowdeletebranch) -denycreatebranch=$(git config --bool hooks.denycreatebranch) -allowdeletetag=$(git config --bool hooks.allowdeletetag) -allowmodifytag=$(git config --bool hooks.allowmodifytag) - -# check for no description -projectdesc=$(sed -e '1q' "$GIT_DIR/description") -case "$projectdesc" in -"Unnamed repository"* | "") - echo "*** Project description file hasn't been set" >&2 - exit 1 - ;; -esac - -# --- Check types -# if $newrev is 0000...0000, it's a commit to delete a ref. -zero="0000000000000000000000000000000000000000" -if [ "$newrev" = "$zero" ]; then - newrev_type=delete -else - newrev_type=$(git cat-file -t $newrev) -fi - -case "$refname","$newrev_type" in - refs/tags/*,commit) - # un-annotated tag - short_refname=${refname##refs/tags/} - if [ "$allowunannotated" != "true" ]; then - echo "*** The un-annotated tag, $short_refname, is not allowed in this repository" >&2 - echo "*** Use 'git tag [ -a | -s ]' for tags you want to propagate." >&2 - exit 1 - fi - ;; - refs/tags/*,delete) - # delete tag - if [ "$allowdeletetag" != "true" ]; then - echo "*** Deleting a tag is not allowed in this repository" >&2 - exit 1 - fi - ;; - refs/tags/*,tag) - # annotated tag - if [ "$allowmodifytag" != "true" ] && git rev-parse $refname > /dev/null 2>&1 - then - echo "*** Tag '$refname' already exists." >&2 - echo "*** Modifying a tag is not allowed in this repository." >&2 - exit 1 - fi - ;; - refs/heads/*,commit) - # branch - if [ "$oldrev" = "$zero" -a "$denycreatebranch" = "true" ]; then - echo "*** Creating a branch is not allowed in this repository" >&2 - exit 1 - fi - ;; - refs/heads/*,delete) - # delete branch - if [ "$allowdeletebranch" != "true" ]; then - echo "*** Deleting a branch is not allowed in this repository" >&2 - exit 1 - fi - ;; - refs/remotes/*,commit) - # tracking branch - ;; - refs/remotes/*,delete) - # delete tracking branch - if [ "$allowdeletebranch" != "true" ]; then - echo "*** Deleting a tracking branch is not allowed in this repository" >&2 - exit 1 - fi - ;; - *) - # Anything else (is there anything else?) - echo "*** Update hook: unknown type of update to ref $refname of type $newrev_type" >&2 - exit 1 - ;; -esac - -# --- Finished -exit 0 diff --git a/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-1/index b/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-1/index deleted file mode 100644 index a295ccf1b..000000000 Binary files a/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-1/index and /dev/null differ diff --git a/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-1/info/exclude b/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-1/info/exclude deleted file mode 100644 index a5196d1be..000000000 --- a/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-1/info/exclude +++ /dev/null @@ -1,6 +0,0 @@ -# git ls-files --others --exclude-from=.git/info/exclude -# Lines that start with '#' are comments. -# For a project mostly in C, the following would be a good set of -# exclude patterns (uncomment them if you want to use them): -# *.[oa] -# *~ diff --git a/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-1/logs/HEAD b/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-1/logs/HEAD deleted file mode 100644 index 701918b7c..000000000 --- a/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-1/logs/HEAD +++ /dev/null @@ -1,3 +0,0 @@ -0000000000000000000000000000000000000000 9a311b181c4ec0fe4d8856b9fc935a191855742a Mitchell Hashimoto 1445730077 -0700 commit (initial): Initial -9a311b181c4ec0fe4d8856b9fc935a191855742a 9a311b181c4ec0fe4d8856b9fc935a191855742a Mitchell Hashimoto 1445730083 -0700 checkout: moving from master to test-branch -9a311b181c4ec0fe4d8856b9fc935a191855742a ae4fc53ed172182cf8ab07d2f087994950a2ccdf Mitchell Hashimoto 1445730106 -0700 commit: Initial branch diff --git a/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-1/logs/refs/heads/master b/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-1/logs/refs/heads/master deleted file mode 100644 index c6181dfa6..000000000 --- a/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-1/logs/refs/heads/master +++ /dev/null @@ -1 +0,0 @@ -0000000000000000000000000000000000000000 9a311b181c4ec0fe4d8856b9fc935a191855742a Mitchell Hashimoto 1445730077 -0700 commit (initial): Initial diff --git a/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-1/logs/refs/heads/test-branch b/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-1/logs/refs/heads/test-branch deleted file mode 100644 index 8c2a94efa..000000000 --- a/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-1/logs/refs/heads/test-branch +++ /dev/null @@ -1,2 +0,0 @@ -0000000000000000000000000000000000000000 9a311b181c4ec0fe4d8856b9fc935a191855742a Mitchell Hashimoto 1445730083 -0700 branch: Created from HEAD -9a311b181c4ec0fe4d8856b9fc935a191855742a ae4fc53ed172182cf8ab07d2f087994950a2ccdf Mitchell Hashimoto 1445730106 -0700 commit: Initial branch diff --git a/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-1/objects/29/5c5449283c0fe38c75ae73144513240e5626a6 b/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-1/objects/29/5c5449283c0fe38c75ae73144513240e5626a6 deleted file mode 100644 index e6653c083..000000000 Binary files a/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-1/objects/29/5c5449283c0fe38c75ae73144513240e5626a6 and /dev/null differ diff --git a/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-1/objects/3e/655aa57060b300052ca598ba18b5752f8c0958 b/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-1/objects/3e/655aa57060b300052ca598ba18b5752f8c0958 deleted file mode 100644 index 518e6ab78..000000000 Binary files a/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-1/objects/3e/655aa57060b300052ca598ba18b5752f8c0958 and /dev/null differ diff --git a/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-1/objects/9a/311b181c4ec0fe4d8856b9fc935a191855742a b/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-1/objects/9a/311b181c4ec0fe4d8856b9fc935a191855742a deleted file mode 100644 index e116abba7..000000000 --- a/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-1/objects/9a/311b181c4ec0fe4d8856b9fc935a191855742a +++ /dev/null @@ -1,2 +0,0 @@ -xA -0@Q9\2t:D\Ccj:"xVk6 wa'pT"Bʤ.-n4R^)f k]QC.z~X<Qݦ[a/3w}fˡXE \ No newline at end of file diff --git a/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-1/objects/a9/193e348262522550ebacc037f772c52cbfa5d5 b/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-1/objects/a9/193e348262522550ebacc037f772c52cbfa5d5 deleted file mode 100644 index a6230cdf3..000000000 Binary files a/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-1/objects/a9/193e348262522550ebacc037f772c52cbfa5d5 and /dev/null differ diff --git a/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-1/objects/ae/4fc53ed172182cf8ab07d2f087994950a2ccdf b/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-1/objects/ae/4fc53ed172182cf8ab07d2f087994950a2ccdf deleted file mode 100644 index 57fd1016c..000000000 Binary files a/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-1/objects/ae/4fc53ed172182cf8ab07d2f087994950a2ccdf and /dev/null differ diff --git a/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-1/objects/be/fe5fe7626f1850e202fb35ac375c61e1f27f95 b/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-1/objects/be/fe5fe7626f1850e202fb35ac375c61e1f27f95 deleted file mode 100644 index 61c8d6ad7..000000000 Binary files a/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-1/objects/be/fe5fe7626f1850e202fb35ac375c61e1f27f95 and /dev/null differ diff --git a/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-1/refs/heads/master b/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-1/refs/heads/master deleted file mode 100644 index 204b49b4b..000000000 --- a/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-1/refs/heads/master +++ /dev/null @@ -1 +0,0 @@ -9a311b181c4ec0fe4d8856b9fc935a191855742a diff --git a/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-1/refs/heads/test-branch b/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-1/refs/heads/test-branch deleted file mode 100644 index cebc59c41..000000000 --- a/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-1/refs/heads/test-branch +++ /dev/null @@ -1 +0,0 @@ -ae4fc53ed172182cf8ab07d2f087994950a2ccdf diff --git a/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-2/COMMIT_EDITMSG b/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-2/COMMIT_EDITMSG deleted file mode 100644 index 78e35a0b5..000000000 --- a/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-2/COMMIT_EDITMSG +++ /dev/null @@ -1,10 +0,0 @@ -Branch update -# Please enter the commit message for your changes. Lines starting -# with '#' will be ignored, and an empty message aborts the commit. -# On branch test-branch -# Changes to be committed: -# new file: main_branch_update.tf -# -# Untracked files: -# DOTgit-1/ -# diff --git a/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-2/HEAD b/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-2/HEAD deleted file mode 100644 index b04b97d48..000000000 --- a/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-2/HEAD +++ /dev/null @@ -1 +0,0 @@ -ref: refs/heads/test-branch diff --git a/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-2/config b/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-2/config deleted file mode 100644 index 6c9406b7d..000000000 --- a/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-2/config +++ /dev/null @@ -1,7 +0,0 @@ -[core] - repositoryformatversion = 0 - filemode = true - bare = false - logallrefupdates = true - ignorecase = true - precomposeunicode = true diff --git a/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-2/description b/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-2/description deleted file mode 100644 index 498b267a8..000000000 --- a/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-2/description +++ /dev/null @@ -1 +0,0 @@ -Unnamed repository; edit this file 'description' to name the repository. diff --git a/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-2/hooks/applypatch-msg.sample b/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-2/hooks/applypatch-msg.sample deleted file mode 100644 index 8b2a2fe84..000000000 --- a/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-2/hooks/applypatch-msg.sample +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh -# -# An example hook script to check the commit log message taken by -# applypatch from an e-mail message. -# -# The hook should exit with non-zero status after issuing an -# appropriate message if it wants to stop the commit. The hook is -# allowed to edit the commit message file. -# -# To enable this hook, rename this file to "applypatch-msg". - -. git-sh-setup -test -x "$GIT_DIR/hooks/commit-msg" && - exec "$GIT_DIR/hooks/commit-msg" ${1+"$@"} -: diff --git a/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-2/hooks/commit-msg.sample b/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-2/hooks/commit-msg.sample deleted file mode 100644 index b58d1184a..000000000 --- a/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-2/hooks/commit-msg.sample +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/sh -# -# An example hook script to check the commit log message. -# Called by "git commit" with one argument, the name of the file -# that has the commit message. The hook should exit with non-zero -# status after issuing an appropriate message if it wants to stop the -# commit. The hook is allowed to edit the commit message file. -# -# To enable this hook, rename this file to "commit-msg". - -# Uncomment the below to add a Signed-off-by line to the message. -# Doing this in a hook is a bad idea in general, but the prepare-commit-msg -# hook is more suited to it. -# -# SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') -# grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1" - -# This example catches duplicate Signed-off-by lines. - -test "" = "$(grep '^Signed-off-by: ' "$1" | - sort | uniq -c | sed -e '/^[ ]*1[ ]/d')" || { - echo >&2 Duplicate Signed-off-by lines. - exit 1 -} diff --git a/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-2/hooks/post-update.sample b/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-2/hooks/post-update.sample deleted file mode 100644 index ec17ec193..000000000 --- a/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-2/hooks/post-update.sample +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh -# -# An example hook script to prepare a packed repository for use over -# dumb transports. -# -# To enable this hook, rename this file to "post-update". - -exec git update-server-info diff --git a/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-2/hooks/pre-applypatch.sample b/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-2/hooks/pre-applypatch.sample deleted file mode 100644 index b1f187c2e..000000000 --- a/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-2/hooks/pre-applypatch.sample +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh -# -# An example hook script to verify what is about to be committed -# by applypatch from an e-mail message. -# -# The hook should exit with non-zero status after issuing an -# appropriate message if it wants to stop the commit. -# -# To enable this hook, rename this file to "pre-applypatch". - -. git-sh-setup -test -x "$GIT_DIR/hooks/pre-commit" && - exec "$GIT_DIR/hooks/pre-commit" ${1+"$@"} -: diff --git a/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-2/hooks/pre-commit.sample b/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-2/hooks/pre-commit.sample deleted file mode 100644 index 68d62d544..000000000 --- a/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-2/hooks/pre-commit.sample +++ /dev/null @@ -1,49 +0,0 @@ -#!/bin/sh -# -# An example hook script to verify what is about to be committed. -# Called by "git commit" with no arguments. The hook should -# exit with non-zero status after issuing an appropriate message if -# it wants to stop the commit. -# -# To enable this hook, rename this file to "pre-commit". - -if git rev-parse --verify HEAD >/dev/null 2>&1 -then - against=HEAD -else - # Initial commit: diff against an empty tree object - against=4b825dc642cb6eb9a060e54bf8d69288fbee4904 -fi - -# If you want to allow non-ASCII filenames set this variable to true. -allownonascii=$(git config --bool hooks.allownonascii) - -# Redirect output to stderr. -exec 1>&2 - -# Cross platform projects tend to avoid non-ASCII filenames; prevent -# them from being added to the repository. We exploit the fact that the -# printable range starts at the space character and ends with tilde. -if [ "$allownonascii" != "true" ] && - # Note that the use of brackets around a tr range is ok here, (it's - # even required, for portability to Solaris 10's /usr/bin/tr), since - # the square bracket bytes happen to fall in the designated range. - test $(git diff --cached --name-only --diff-filter=A -z $against | - LC_ALL=C tr -d '[ -~]\0' | wc -c) != 0 -then - cat <<\EOF -Error: Attempt to add a non-ASCII file name. - -This can cause problems if you want to work with people on other platforms. - -To be portable it is advisable to rename the file. - -If you know what you are doing you can disable this check using: - - git config hooks.allownonascii true -EOF - exit 1 -fi - -# If there are whitespace errors, print the offending file names and fail. -exec git diff-index --check --cached $against -- diff --git a/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-2/hooks/pre-push.sample b/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-2/hooks/pre-push.sample deleted file mode 100644 index 6187dbf43..000000000 --- a/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-2/hooks/pre-push.sample +++ /dev/null @@ -1,53 +0,0 @@ -#!/bin/sh - -# An example hook script to verify what is about to be pushed. Called by "git -# push" after it has checked the remote status, but before anything has been -# pushed. If this script exits with a non-zero status nothing will be pushed. -# -# This hook is called with the following parameters: -# -# $1 -- Name of the remote to which the push is being done -# $2 -- URL to which the push is being done -# -# If pushing without using a named remote those arguments will be equal. -# -# Information about the commits which are being pushed is supplied as lines to -# the standard input in the form: -# -# -# -# This sample shows how to prevent push of commits where the log message starts -# with "WIP" (work in progress). - -remote="$1" -url="$2" - -z40=0000000000000000000000000000000000000000 - -while read local_ref local_sha remote_ref remote_sha -do - if [ "$local_sha" = $z40 ] - then - # Handle delete - : - else - if [ "$remote_sha" = $z40 ] - then - # New branch, examine all commits - range="$local_sha" - else - # Update to existing branch, examine new commits - range="$remote_sha..$local_sha" - fi - - # Check for WIP commit - commit=`git rev-list -n 1 --grep '^WIP' "$range"` - if [ -n "$commit" ] - then - echo >&2 "Found WIP commit in $local_ref, not pushing" - exit 1 - fi - fi -done - -exit 0 diff --git a/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-2/hooks/pre-rebase.sample b/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-2/hooks/pre-rebase.sample deleted file mode 100644 index 9773ed4cb..000000000 --- a/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-2/hooks/pre-rebase.sample +++ /dev/null @@ -1,169 +0,0 @@ -#!/bin/sh -# -# Copyright (c) 2006, 2008 Junio C Hamano -# -# The "pre-rebase" hook is run just before "git rebase" starts doing -# its job, and can prevent the command from running by exiting with -# non-zero status. -# -# The hook is called with the following parameters: -# -# $1 -- the upstream the series was forked from. -# $2 -- the branch being rebased (or empty when rebasing the current branch). -# -# This sample shows how to prevent topic branches that are already -# merged to 'next' branch from getting rebased, because allowing it -# would result in rebasing already published history. - -publish=next -basebranch="$1" -if test "$#" = 2 -then - topic="refs/heads/$2" -else - topic=`git symbolic-ref HEAD` || - exit 0 ;# we do not interrupt rebasing detached HEAD -fi - -case "$topic" in -refs/heads/??/*) - ;; -*) - exit 0 ;# we do not interrupt others. - ;; -esac - -# Now we are dealing with a topic branch being rebased -# on top of master. Is it OK to rebase it? - -# Does the topic really exist? -git show-ref -q "$topic" || { - echo >&2 "No such branch $topic" - exit 1 -} - -# Is topic fully merged to master? -not_in_master=`git rev-list --pretty=oneline ^master "$topic"` -if test -z "$not_in_master" -then - echo >&2 "$topic is fully merged to master; better remove it." - exit 1 ;# we could allow it, but there is no point. -fi - -# Is topic ever merged to next? If so you should not be rebasing it. -only_next_1=`git rev-list ^master "^$topic" ${publish} | sort` -only_next_2=`git rev-list ^master ${publish} | sort` -if test "$only_next_1" = "$only_next_2" -then - not_in_topic=`git rev-list "^$topic" master` - if test -z "$not_in_topic" - then - echo >&2 "$topic is already up-to-date with master" - exit 1 ;# we could allow it, but there is no point. - else - exit 0 - fi -else - not_in_next=`git rev-list --pretty=oneline ^${publish} "$topic"` - /usr/bin/perl -e ' - my $topic = $ARGV[0]; - my $msg = "* $topic has commits already merged to public branch:\n"; - my (%not_in_next) = map { - /^([0-9a-f]+) /; - ($1 => 1); - } split(/\n/, $ARGV[1]); - for my $elem (map { - /^([0-9a-f]+) (.*)$/; - [$1 => $2]; - } split(/\n/, $ARGV[2])) { - if (!exists $not_in_next{$elem->[0]}) { - if ($msg) { - print STDERR $msg; - undef $msg; - } - print STDERR " $elem->[1]\n"; - } - } - ' "$topic" "$not_in_next" "$not_in_master" - exit 1 -fi - -exit 0 - -################################################################ - -This sample hook safeguards topic branches that have been -published from being rewound. - -The workflow assumed here is: - - * Once a topic branch forks from "master", "master" is never - merged into it again (either directly or indirectly). - - * Once a topic branch is fully cooked and merged into "master", - it is deleted. If you need to build on top of it to correct - earlier mistakes, a new topic branch is created by forking at - the tip of the "master". This is not strictly necessary, but - it makes it easier to keep your history simple. - - * Whenever you need to test or publish your changes to topic - branches, merge them into "next" branch. - -The script, being an example, hardcodes the publish branch name -to be "next", but it is trivial to make it configurable via -$GIT_DIR/config mechanism. - -With this workflow, you would want to know: - -(1) ... if a topic branch has ever been merged to "next". Young - topic branches can have stupid mistakes you would rather - clean up before publishing, and things that have not been - merged into other branches can be easily rebased without - affecting other people. But once it is published, you would - not want to rewind it. - -(2) ... if a topic branch has been fully merged to "master". - Then you can delete it. More importantly, you should not - build on top of it -- other people may already want to - change things related to the topic as patches against your - "master", so if you need further changes, it is better to - fork the topic (perhaps with the same name) afresh from the - tip of "master". - -Let's look at this example: - - o---o---o---o---o---o---o---o---o---o "next" - / / / / - / a---a---b A / / - / / / / - / / c---c---c---c B / - / / / \ / - / / / b---b C \ / - / / / / \ / - ---o---o---o---o---o---o---o---o---o---o---o "master" - - -A, B and C are topic branches. - - * A has one fix since it was merged up to "next". - - * B has finished. It has been fully merged up to "master" and "next", - and is ready to be deleted. - - * C has not merged to "next" at all. - -We would want to allow C to be rebased, refuse A, and encourage -B to be deleted. - -To compute (1): - - git rev-list ^master ^topic next - git rev-list ^master next - - if these match, topic has not merged in next at all. - -To compute (2): - - git rev-list master..topic - - if this is empty, it is fully merged to "master". diff --git a/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-2/hooks/prepare-commit-msg.sample b/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-2/hooks/prepare-commit-msg.sample deleted file mode 100644 index f093a02ec..000000000 --- a/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-2/hooks/prepare-commit-msg.sample +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/sh -# -# An example hook script to prepare the commit log message. -# Called by "git commit" with the name of the file that has the -# commit message, followed by the description of the commit -# message's source. The hook's purpose is to edit the commit -# message file. If the hook fails with a non-zero status, -# the commit is aborted. -# -# To enable this hook, rename this file to "prepare-commit-msg". - -# This hook includes three examples. The first comments out the -# "Conflicts:" part of a merge commit. -# -# The second includes the output of "git diff --name-status -r" -# into the message, just before the "git status" output. It is -# commented because it doesn't cope with --amend or with squashed -# commits. -# -# The third example adds a Signed-off-by line to the message, that can -# still be edited. This is rarely a good idea. - -case "$2,$3" in - merge,) - /usr/bin/perl -i.bak -ne 's/^/# /, s/^# #/#/ if /^Conflicts/ .. /#/; print' "$1" ;; - -# ,|template,) -# /usr/bin/perl -i.bak -pe ' -# print "\n" . `git diff --cached --name-status -r` -# if /^#/ && $first++ == 0' "$1" ;; - - *) ;; -esac - -# SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') -# grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1" diff --git a/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-2/hooks/update.sample b/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-2/hooks/update.sample deleted file mode 100644 index d84758373..000000000 --- a/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-2/hooks/update.sample +++ /dev/null @@ -1,128 +0,0 @@ -#!/bin/sh -# -# An example hook script to blocks unannotated tags from entering. -# Called by "git receive-pack" with arguments: refname sha1-old sha1-new -# -# To enable this hook, rename this file to "update". -# -# Config -# ------ -# hooks.allowunannotated -# This boolean sets whether unannotated tags will be allowed into the -# repository. By default they won't be. -# hooks.allowdeletetag -# This boolean sets whether deleting tags will be allowed in the -# repository. By default they won't be. -# hooks.allowmodifytag -# This boolean sets whether a tag may be modified after creation. By default -# it won't be. -# hooks.allowdeletebranch -# This boolean sets whether deleting branches will be allowed in the -# repository. By default they won't be. -# hooks.denycreatebranch -# This boolean sets whether remotely creating branches will be denied -# in the repository. By default this is allowed. -# - -# --- Command line -refname="$1" -oldrev="$2" -newrev="$3" - -# --- Safety check -if [ -z "$GIT_DIR" ]; then - echo "Don't run this script from the command line." >&2 - echo " (if you want, you could supply GIT_DIR then run" >&2 - echo " $0 )" >&2 - exit 1 -fi - -if [ -z "$refname" -o -z "$oldrev" -o -z "$newrev" ]; then - echo "usage: $0 " >&2 - exit 1 -fi - -# --- Config -allowunannotated=$(git config --bool hooks.allowunannotated) -allowdeletebranch=$(git config --bool hooks.allowdeletebranch) -denycreatebranch=$(git config --bool hooks.denycreatebranch) -allowdeletetag=$(git config --bool hooks.allowdeletetag) -allowmodifytag=$(git config --bool hooks.allowmodifytag) - -# check for no description -projectdesc=$(sed -e '1q' "$GIT_DIR/description") -case "$projectdesc" in -"Unnamed repository"* | "") - echo "*** Project description file hasn't been set" >&2 - exit 1 - ;; -esac - -# --- Check types -# if $newrev is 0000...0000, it's a commit to delete a ref. -zero="0000000000000000000000000000000000000000" -if [ "$newrev" = "$zero" ]; then - newrev_type=delete -else - newrev_type=$(git cat-file -t $newrev) -fi - -case "$refname","$newrev_type" in - refs/tags/*,commit) - # un-annotated tag - short_refname=${refname##refs/tags/} - if [ "$allowunannotated" != "true" ]; then - echo "*** The un-annotated tag, $short_refname, is not allowed in this repository" >&2 - echo "*** Use 'git tag [ -a | -s ]' for tags you want to propagate." >&2 - exit 1 - fi - ;; - refs/tags/*,delete) - # delete tag - if [ "$allowdeletetag" != "true" ]; then - echo "*** Deleting a tag is not allowed in this repository" >&2 - exit 1 - fi - ;; - refs/tags/*,tag) - # annotated tag - if [ "$allowmodifytag" != "true" ] && git rev-parse $refname > /dev/null 2>&1 - then - echo "*** Tag '$refname' already exists." >&2 - echo "*** Modifying a tag is not allowed in this repository." >&2 - exit 1 - fi - ;; - refs/heads/*,commit) - # branch - if [ "$oldrev" = "$zero" -a "$denycreatebranch" = "true" ]; then - echo "*** Creating a branch is not allowed in this repository" >&2 - exit 1 - fi - ;; - refs/heads/*,delete) - # delete branch - if [ "$allowdeletebranch" != "true" ]; then - echo "*** Deleting a branch is not allowed in this repository" >&2 - exit 1 - fi - ;; - refs/remotes/*,commit) - # tracking branch - ;; - refs/remotes/*,delete) - # delete tracking branch - if [ "$allowdeletebranch" != "true" ]; then - echo "*** Deleting a tracking branch is not allowed in this repository" >&2 - exit 1 - fi - ;; - *) - # Anything else (is there anything else?) - echo "*** Update hook: unknown type of update to ref $refname of type $newrev_type" >&2 - exit 1 - ;; -esac - -# --- Finished -exit 0 diff --git a/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-2/index b/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-2/index deleted file mode 100644 index 44211b1a6..000000000 Binary files a/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-2/index and /dev/null differ diff --git a/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-2/info/exclude b/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-2/info/exclude deleted file mode 100644 index a5196d1be..000000000 --- a/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-2/info/exclude +++ /dev/null @@ -1,6 +0,0 @@ -# git ls-files --others --exclude-from=.git/info/exclude -# Lines that start with '#' are comments. -# For a project mostly in C, the following would be a good set of -# exclude patterns (uncomment them if you want to use them): -# *.[oa] -# *~ diff --git a/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-2/logs/HEAD b/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-2/logs/HEAD deleted file mode 100644 index 5c7cd637d..000000000 --- a/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-2/logs/HEAD +++ /dev/null @@ -1,4 +0,0 @@ -0000000000000000000000000000000000000000 9a311b181c4ec0fe4d8856b9fc935a191855742a Mitchell Hashimoto 1445730077 -0700 commit (initial): Initial -9a311b181c4ec0fe4d8856b9fc935a191855742a 9a311b181c4ec0fe4d8856b9fc935a191855742a Mitchell Hashimoto 1445730083 -0700 checkout: moving from master to test-branch -9a311b181c4ec0fe4d8856b9fc935a191855742a ae4fc53ed172182cf8ab07d2f087994950a2ccdf Mitchell Hashimoto 1445730106 -0700 commit: Initial branch -ae4fc53ed172182cf8ab07d2f087994950a2ccdf 34fa5e1fb706dc77cc0b0cf622c82e67ba84e297 Mitchell Hashimoto 1445730148 -0700 commit: Branch update diff --git a/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-2/logs/refs/heads/master b/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-2/logs/refs/heads/master deleted file mode 100644 index c6181dfa6..000000000 --- a/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-2/logs/refs/heads/master +++ /dev/null @@ -1 +0,0 @@ -0000000000000000000000000000000000000000 9a311b181c4ec0fe4d8856b9fc935a191855742a Mitchell Hashimoto 1445730077 -0700 commit (initial): Initial diff --git a/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-2/logs/refs/heads/test-branch b/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-2/logs/refs/heads/test-branch deleted file mode 100644 index 349f98deb..000000000 --- a/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-2/logs/refs/heads/test-branch +++ /dev/null @@ -1,3 +0,0 @@ -0000000000000000000000000000000000000000 9a311b181c4ec0fe4d8856b9fc935a191855742a Mitchell Hashimoto 1445730083 -0700 branch: Created from HEAD -9a311b181c4ec0fe4d8856b9fc935a191855742a ae4fc53ed172182cf8ab07d2f087994950a2ccdf Mitchell Hashimoto 1445730106 -0700 commit: Initial branch -ae4fc53ed172182cf8ab07d2f087994950a2ccdf 34fa5e1fb706dc77cc0b0cf622c82e67ba84e297 Mitchell Hashimoto 1445730148 -0700 commit: Branch update diff --git a/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-2/objects/20/9cbd800810a2a1559ba33c48bc75860e967e07 b/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-2/objects/20/9cbd800810a2a1559ba33c48bc75860e967e07 deleted file mode 100644 index 23b6ef272..000000000 Binary files a/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-2/objects/20/9cbd800810a2a1559ba33c48bc75860e967e07 and /dev/null differ diff --git a/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-2/objects/29/5c5449283c0fe38c75ae73144513240e5626a6 b/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-2/objects/29/5c5449283c0fe38c75ae73144513240e5626a6 deleted file mode 100644 index e6653c083..000000000 Binary files a/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-2/objects/29/5c5449283c0fe38c75ae73144513240e5626a6 and /dev/null differ diff --git a/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-2/objects/34/fa5e1fb706dc77cc0b0cf622c82e67ba84e297 b/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-2/objects/34/fa5e1fb706dc77cc0b0cf622c82e67ba84e297 deleted file mode 100644 index 535edfde2..000000000 Binary files a/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-2/objects/34/fa5e1fb706dc77cc0b0cf622c82e67ba84e297 and /dev/null differ diff --git a/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-2/objects/3e/655aa57060b300052ca598ba18b5752f8c0958 b/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-2/objects/3e/655aa57060b300052ca598ba18b5752f8c0958 deleted file mode 100644 index 518e6ab78..000000000 Binary files a/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-2/objects/3e/655aa57060b300052ca598ba18b5752f8c0958 and /dev/null differ diff --git a/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-2/objects/8a/2dfe46d4eb9b54f5aa0e4e536346bdafee3467 b/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-2/objects/8a/2dfe46d4eb9b54f5aa0e4e536346bdafee3467 deleted file mode 100644 index 5123c4b74..000000000 Binary files a/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-2/objects/8a/2dfe46d4eb9b54f5aa0e4e536346bdafee3467 and /dev/null differ diff --git a/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-2/objects/9a/311b181c4ec0fe4d8856b9fc935a191855742a b/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-2/objects/9a/311b181c4ec0fe4d8856b9fc935a191855742a deleted file mode 100644 index e116abba7..000000000 --- a/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-2/objects/9a/311b181c4ec0fe4d8856b9fc935a191855742a +++ /dev/null @@ -1,2 +0,0 @@ -xA -0@Q9\2t:D\Ccj:"xVk6 wa'pT"Bʤ.-n4R^)f k]QC.z~X<Qݦ[a/3w}fˡXE \ No newline at end of file diff --git a/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-2/objects/a9/193e348262522550ebacc037f772c52cbfa5d5 b/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-2/objects/a9/193e348262522550ebacc037f772c52cbfa5d5 deleted file mode 100644 index a6230cdf3..000000000 Binary files a/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-2/objects/a9/193e348262522550ebacc037f772c52cbfa5d5 and /dev/null differ diff --git a/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-2/objects/ae/4fc53ed172182cf8ab07d2f087994950a2ccdf b/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-2/objects/ae/4fc53ed172182cf8ab07d2f087994950a2ccdf deleted file mode 100644 index 57fd1016c..000000000 Binary files a/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-2/objects/ae/4fc53ed172182cf8ab07d2f087994950a2ccdf and /dev/null differ diff --git a/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-2/objects/be/fe5fe7626f1850e202fb35ac375c61e1f27f95 b/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-2/objects/be/fe5fe7626f1850e202fb35ac375c61e1f27f95 deleted file mode 100644 index 61c8d6ad7..000000000 Binary files a/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-2/objects/be/fe5fe7626f1850e202fb35ac375c61e1f27f95 and /dev/null differ diff --git a/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-2/refs/heads/master b/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-2/refs/heads/master deleted file mode 100644 index 204b49b4b..000000000 --- a/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-2/refs/heads/master +++ /dev/null @@ -1 +0,0 @@ -9a311b181c4ec0fe4d8856b9fc935a191855742a diff --git a/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-2/refs/heads/test-branch b/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-2/refs/heads/test-branch deleted file mode 100644 index 0825c194e..000000000 --- a/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/DOTgit-2/refs/heads/test-branch +++ /dev/null @@ -1 +0,0 @@ -34fa5e1fb706dc77cc0b0cf622c82e67ba84e297 diff --git a/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/main.tf b/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/main.tf deleted file mode 100644 index befe5fe76..000000000 --- a/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/main.tf +++ /dev/null @@ -1 +0,0 @@ -# MAIN diff --git a/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/main_branch.tf b/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/main_branch.tf deleted file mode 100644 index 3e655aa57..000000000 --- a/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/main_branch.tf +++ /dev/null @@ -1 +0,0 @@ -# Branch diff --git a/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/main_branch_update.tf b/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/main_branch_update.tf deleted file mode 100644 index 8a2dfe46d..000000000 --- a/vendor/github.com/hashicorp/go-getter/test-fixtures/git-branch-update/main_branch_update.tf +++ /dev/null @@ -1 +0,0 @@ -# Branch update diff --git a/vendor/github.com/hashicorp/go-getter/test-fixtures/validate-bad-output-to-module/child/main.tf b/vendor/github.com/hashicorp/go-getter/test-fixtures/validate-bad-output-to-module/child/main.tf deleted file mode 100644 index 4d68c80b3..000000000 --- a/vendor/github.com/hashicorp/go-getter/test-fixtures/validate-bad-output-to-module/child/main.tf +++ /dev/null @@ -1 +0,0 @@ -variable "memory" { default = "foo" } diff --git a/vendor/github.com/hashicorp/go-getter/test-fixtures/validate-bad-output-to-module/main.tf b/vendor/github.com/hashicorp/go-getter/test-fixtures/validate-bad-output-to-module/main.tf deleted file mode 100644 index 4b627bbe5..000000000 --- a/vendor/github.com/hashicorp/go-getter/test-fixtures/validate-bad-output-to-module/main.tf +++ /dev/null @@ -1,8 +0,0 @@ -module "child" { - source = "./child" -} - -module "child2" { - source = "./child" - memory = "${module.child.memory_max}" -} diff --git a/vendor/github.com/hashicorp/go-getter/test-fixtures/validate-bad-output/child/main.tf b/vendor/github.com/hashicorp/go-getter/test-fixtures/validate-bad-output/child/main.tf deleted file mode 100644 index e69de29bb..000000000 diff --git a/vendor/github.com/hashicorp/go-getter/test-fixtures/validate-bad-output/main.tf b/vendor/github.com/hashicorp/go-getter/test-fixtures/validate-bad-output/main.tf deleted file mode 100644 index a19233e12..000000000 --- a/vendor/github.com/hashicorp/go-getter/test-fixtures/validate-bad-output/main.tf +++ /dev/null @@ -1,7 +0,0 @@ -module "child" { - source = "./child" -} - -resource "aws_instance" "foo" { - memory = "${module.child.memory}" -} diff --git a/vendor/github.com/hashicorp/go-getter/test-fixtures/validate-bad-var/child/main.tf b/vendor/github.com/hashicorp/go-getter/test-fixtures/validate-bad-var/child/main.tf deleted file mode 100644 index e69de29bb..000000000 diff --git a/vendor/github.com/hashicorp/go-getter/test-fixtures/validate-bad-var/main.tf b/vendor/github.com/hashicorp/go-getter/test-fixtures/validate-bad-var/main.tf deleted file mode 100644 index 7cc785d17..000000000 --- a/vendor/github.com/hashicorp/go-getter/test-fixtures/validate-bad-var/main.tf +++ /dev/null @@ -1,5 +0,0 @@ -module "child" { - source = "./child" - - memory = "foo" -} diff --git a/vendor/github.com/hashicorp/go-getter/test-fixtures/validate-child-bad/child/main.tf b/vendor/github.com/hashicorp/go-getter/test-fixtures/validate-child-bad/child/main.tf deleted file mode 100644 index 93b365403..000000000 --- a/vendor/github.com/hashicorp/go-getter/test-fixtures/validate-child-bad/child/main.tf +++ /dev/null @@ -1,3 +0,0 @@ -# Duplicate resources -resource "aws_instance" "foo" {} -resource "aws_instance" "foo" {} diff --git a/vendor/github.com/hashicorp/go-getter/test-fixtures/validate-child-bad/main.tf b/vendor/github.com/hashicorp/go-getter/test-fixtures/validate-child-bad/main.tf deleted file mode 100644 index 813f7ef8e..000000000 --- a/vendor/github.com/hashicorp/go-getter/test-fixtures/validate-child-bad/main.tf +++ /dev/null @@ -1,3 +0,0 @@ -module "foo" { - source = "./child" -} diff --git a/vendor/github.com/hashicorp/go-getter/test-fixtures/validate-child-good/child/main.tf b/vendor/github.com/hashicorp/go-getter/test-fixtures/validate-child-good/child/main.tf deleted file mode 100644 index 2cfd2a80f..000000000 --- a/vendor/github.com/hashicorp/go-getter/test-fixtures/validate-child-good/child/main.tf +++ /dev/null @@ -1,3 +0,0 @@ -variable "memory" {} - -output "result" {} diff --git a/vendor/github.com/hashicorp/go-getter/test-fixtures/validate-child-good/main.tf b/vendor/github.com/hashicorp/go-getter/test-fixtures/validate-child-good/main.tf deleted file mode 100644 index 5f3ad8da5..000000000 --- a/vendor/github.com/hashicorp/go-getter/test-fixtures/validate-child-good/main.tf +++ /dev/null @@ -1,8 +0,0 @@ -module "child" { - source = "./child" - memory = "1G" -} - -resource "aws_instance" "foo" { - memory = "${module.child.result}" -} diff --git a/vendor/github.com/hashicorp/go-getter/test-fixtures/validate-required-var/child/main.tf b/vendor/github.com/hashicorp/go-getter/test-fixtures/validate-required-var/child/main.tf deleted file mode 100644 index 618ae3c42..000000000 --- a/vendor/github.com/hashicorp/go-getter/test-fixtures/validate-required-var/child/main.tf +++ /dev/null @@ -1 +0,0 @@ -variable "memory" {} diff --git a/vendor/github.com/hashicorp/go-getter/test-fixtures/validate-required-var/main.tf b/vendor/github.com/hashicorp/go-getter/test-fixtures/validate-required-var/main.tf deleted file mode 100644 index 0f6991c53..000000000 --- a/vendor/github.com/hashicorp/go-getter/test-fixtures/validate-required-var/main.tf +++ /dev/null @@ -1,3 +0,0 @@ -module "child" { - source = "./child" -} diff --git a/vendor/github.com/hashicorp/go-getter/test-fixtures/validate-root-bad/main.tf b/vendor/github.com/hashicorp/go-getter/test-fixtures/validate-root-bad/main.tf deleted file mode 100644 index 93b365403..000000000 --- a/vendor/github.com/hashicorp/go-getter/test-fixtures/validate-root-bad/main.tf +++ /dev/null @@ -1,3 +0,0 @@ -# Duplicate resources -resource "aws_instance" "foo" {} -resource "aws_instance" "foo" {} diff --git a/vendor/github.com/hashicorp/go-plugin/examples/basic/main.go b/vendor/github.com/hashicorp/go-plugin/examples/basic/main.go deleted file mode 100644 index a5b3046fd..000000000 --- a/vendor/github.com/hashicorp/go-plugin/examples/basic/main.go +++ /dev/null @@ -1,131 +0,0 @@ -package main - -import ( - "fmt" - "io/ioutil" - "log" - "net/rpc" - "os" - "os/exec" - - "github.com/hashicorp/go-plugin" -) - -func main() { - // Normal a plugin will be a separate binary. We put both in one - // here so that it is easy to build and use this example. - if len(os.Args) >= 2 && os.Args[1] != "" { - mainPlugin() - return - } - - // We don't want to see the plugin logs. - log.SetOutput(ioutil.Discard) - - // We're a host! Start by launching the plugin process. - client := plugin.NewClient(&plugin.ClientConfig{ - HandshakeConfig: handshakeConfig, - Plugins: pluginMap, - Cmd: exec.Command(os.Args[0], "plugin"), - }) - defer client.Kill() - - // Connect via RPC - rpcClient, err := client.Client() - if err != nil { - log.Fatal(err) - } - - // Request the plugin - raw, err := rpcClient.Dispense("greeter") - if err != nil { - log.Fatal(err) - } - - // We should have a Greeter now! This feels like a normal interface - // implementation but is in fact over an RPC connection. - greeter := raw.(Greeter) - fmt.Println(greeter.Greet()) -} - -func mainPlugin() { - // We're a plugin! Serve the plugin. We set the handshake config - // so that the host and our plugin can verify they can talk to each other. - // Then we set the plugin map to say what plugins we're serving. - plugin.Serve(&plugin.ServeConfig{ - HandshakeConfig: handshakeConfig, - Plugins: pluginMap, - }) -} - -// handshakeConfigs are used to just do a basic handshake between -// a plugin and host. If the handshake fails, a user friendly error is shown. -// This prevents users from executing bad plugins or executing a plugin -// directory. It is a UX feature, not a security feature. -var handshakeConfig = plugin.HandshakeConfig{ - ProtocolVersion: 1, - MagicCookieKey: "BASIC_PLUGIN", - MagicCookieValue: "hello", -} - -// pluginMap is the map of plugins we can dispense. -var pluginMap = map[string]plugin.Plugin{ - "greeter": new(GreeterPlugin), -} - -// Greeter is the interface that we're exposing as a plugin. -type Greeter interface { - Greet() string -} - -// Here is a real implementation of Greeter -type GreeterHello struct{} - -func (GreeterHello) Greet() string { return "Hello!" } - -// Here is an implementation that talks over RPC -type GreeterRPC struct{ client *rpc.Client } - -func (g *GreeterRPC) Greet() string { - var resp string - err := g.client.Call("Plugin.Greet", new(interface{}), &resp) - if err != nil { - // You usually want your interfaces to return errors. If they don't, - // there isn't much other choice here. - panic(err) - } - - return resp -} - -// Here is the RPC server that GreeterRPC talks to, conforming to -// the requirements of net/rpc -type GreeterRPCServer struct { - // This is the real implementation - Impl Greeter -} - -func (s *GreeterRPCServer) Greet(args interface{}, resp *string) error { - *resp = s.Impl.Greet() - return nil -} - -// This is the implementation of plugin.Plugin so we can serve/consume this -// -// This has two methods: Server must return an RPC server for this plugin -// type. We construct a GreeterRPCServer for this. -// -// Client must return an implementation of our interface that communicates -// over an RPC client. We return GreeterRPC for this. -// -// Ignore MuxBroker. That is used to create more multiplexed streams on our -// plugin connection and is a more advanced use case. -type GreeterPlugin struct{} - -func (GreeterPlugin) Server(*plugin.MuxBroker) (interface{}, error) { - return &GreeterRPCServer{Impl: new(GreeterHello)}, nil -} - -func (GreeterPlugin) Client(b *plugin.MuxBroker, c *rpc.Client) (interface{}, error) { - return &GreeterRPC{client: c}, nil -} diff --git a/vendor/github.com/hashicorp/hcl/hcl/printer/nodes.go b/vendor/github.com/hashicorp/hcl/hcl/printer/nodes.go deleted file mode 100644 index a98495c76..000000000 --- a/vendor/github.com/hashicorp/hcl/hcl/printer/nodes.go +++ /dev/null @@ -1,575 +0,0 @@ -package printer - -import ( - "bytes" - "fmt" - "sort" - - "github.com/hashicorp/hcl/hcl/ast" - "github.com/hashicorp/hcl/hcl/token" -) - -const ( - blank = byte(' ') - newline = byte('\n') - tab = byte('\t') - infinity = 1 << 30 // offset or line -) - -var ( - unindent = []byte("\uE123") // in the private use space -) - -type printer struct { - cfg Config - prev token.Pos - - comments []*ast.CommentGroup // may be nil, contains all comments - standaloneComments []*ast.CommentGroup // contains all standalone comments (not assigned to any node) - - enableTrace bool - indentTrace int -} - -type ByPosition []*ast.CommentGroup - -func (b ByPosition) Len() int { return len(b) } -func (b ByPosition) Swap(i, j int) { b[i], b[j] = b[j], b[i] } -func (b ByPosition) Less(i, j int) bool { return b[i].Pos().Before(b[j].Pos()) } - -// collectComments comments all standalone comments which are not lead or line -// comment -func (p *printer) collectComments(node ast.Node) { - // first collect all comments. This is already stored in - // ast.File.(comments) - ast.Walk(node, func(nn ast.Node) (ast.Node, bool) { - switch t := nn.(type) { - case *ast.File: - p.comments = t.Comments - return nn, false - } - return nn, true - }) - - standaloneComments := make(map[token.Pos]*ast.CommentGroup, 0) - for _, c := range p.comments { - standaloneComments[c.Pos()] = c - } - - // next remove all lead and line comments from the overall comment map. - // This will give us comments which are standalone, comments which are not - // assigned to any kind of node. - ast.Walk(node, func(nn ast.Node) (ast.Node, bool) { - switch t := nn.(type) { - case *ast.LiteralType: - if t.LineComment != nil { - for _, comment := range t.LineComment.List { - if _, ok := standaloneComments[comment.Pos()]; ok { - delete(standaloneComments, comment.Pos()) - } - } - } - case *ast.ObjectItem: - if t.LeadComment != nil { - for _, comment := range t.LeadComment.List { - if _, ok := standaloneComments[comment.Pos()]; ok { - delete(standaloneComments, comment.Pos()) - } - } - } - - if t.LineComment != nil { - for _, comment := range t.LineComment.List { - if _, ok := standaloneComments[comment.Pos()]; ok { - delete(standaloneComments, comment.Pos()) - } - } - } - } - - return nn, true - }) - - for _, c := range standaloneComments { - p.standaloneComments = append(p.standaloneComments, c) - } - - sort.Sort(ByPosition(p.standaloneComments)) - -} - -// output prints creates b printable HCL output and returns it. -func (p *printer) output(n interface{}) []byte { - var buf bytes.Buffer - - switch t := n.(type) { - case *ast.File: - return p.output(t.Node) - case *ast.ObjectList: - var index int - var nextItem token.Pos - var commented bool - for { - // TODO(arslan): refactor below comment printing, we have the same in objectType - for _, c := range p.standaloneComments { - for _, comment := range c.List { - if index != len(t.Items) { - nextItem = t.Items[index].Pos() - } else { - nextItem = token.Pos{Offset: infinity, Line: infinity} - } - - if comment.Pos().After(p.prev) && comment.Pos().Before(nextItem) { - // if we hit the end add newlines so we can print the comment - if index == len(t.Items) { - buf.Write([]byte{newline, newline}) - } - - buf.WriteString(comment.Text) - - buf.WriteByte(newline) - if index != len(t.Items) { - buf.WriteByte(newline) - } - } - } - } - - if index == len(t.Items) { - break - } - - buf.Write(p.output(t.Items[index])) - if !commented && index != len(t.Items)-1 { - buf.Write([]byte{newline, newline}) - } - index++ - } - case *ast.ObjectKey: - buf.WriteString(t.Token.Text) - case *ast.ObjectItem: - p.prev = t.Pos() - buf.Write(p.objectItem(t)) - case *ast.LiteralType: - buf.Write(p.literalType(t)) - case *ast.ListType: - buf.Write(p.list(t)) - case *ast.ObjectType: - buf.Write(p.objectType(t)) - default: - fmt.Printf(" unknown type: %T\n", n) - } - - return buf.Bytes() -} - -func (p *printer) literalType(lit *ast.LiteralType) []byte { - result := []byte(lit.Token.Text) - if lit.Token.Type == token.HEREDOC { - // Clear the trailing newline from heredocs - if result[len(result)-1] == '\n' { - result = result[:len(result)-1] - } - - // Poison lines 2+ so that we don't indent them - result = p.heredocIndent(result) - } - - return result -} - -// objectItem returns the printable HCL form of an object item. An object type -// starts with one/multiple keys and has a value. The value might be of any -// type. -func (p *printer) objectItem(o *ast.ObjectItem) []byte { - defer un(trace(p, fmt.Sprintf("ObjectItem: %s", o.Keys[0].Token.Text))) - var buf bytes.Buffer - - if o.LeadComment != nil { - for _, comment := range o.LeadComment.List { - buf.WriteString(comment.Text) - buf.WriteByte(newline) - } - } - - for i, k := range o.Keys { - buf.WriteString(k.Token.Text) - buf.WriteByte(blank) - - // reach end of key - if o.Assign.IsValid() && i == len(o.Keys)-1 && len(o.Keys) == 1 { - buf.WriteString("=") - buf.WriteByte(blank) - } - } - - buf.Write(p.output(o.Val)) - - if o.Val.Pos().Line == o.Keys[0].Pos().Line && o.LineComment != nil { - buf.WriteByte(blank) - for _, comment := range o.LineComment.List { - buf.WriteString(comment.Text) - } - } - - return buf.Bytes() -} - -// objectType returns the printable HCL form of an object type. An object type -// begins with a brace and ends with a brace. -func (p *printer) objectType(o *ast.ObjectType) []byte { - defer un(trace(p, "ObjectType")) - var buf bytes.Buffer - buf.WriteString("{") - buf.WriteByte(newline) - - var index int - var nextItem token.Pos - var commented bool - for { - // Print stand alone comments - for _, c := range p.standaloneComments { - for _, comment := range c.List { - // if we hit the end, last item should be the brace - if index != len(o.List.Items) { - nextItem = o.List.Items[index].Pos() - } else { - nextItem = o.Rbrace - } - - if comment.Pos().After(p.prev) && comment.Pos().Before(nextItem) { - // add newline if it's between other printed nodes - if index > 0 { - commented = true - buf.WriteByte(newline) - } - - buf.Write(p.indent([]byte(comment.Text))) - buf.WriteByte(newline) - if index != len(o.List.Items) { - buf.WriteByte(newline) // do not print on the end - } - } - } - } - - if index == len(o.List.Items) { - p.prev = o.Rbrace - break - } - - // check if we have adjacent one liner items. If yes we'll going to align - // the comments. - var aligned []*ast.ObjectItem - for _, item := range o.List.Items[index:] { - // we don't group one line lists - if len(o.List.Items) == 1 { - break - } - - // one means a oneliner with out any lead comment - // two means a oneliner with lead comment - // anything else might be something else - cur := lines(string(p.objectItem(item))) - if cur > 2 { - break - } - - curPos := item.Pos() - - nextPos := token.Pos{} - if index != len(o.List.Items)-1 { - nextPos = o.List.Items[index+1].Pos() - } - - prevPos := token.Pos{} - if index != 0 { - prevPos = o.List.Items[index-1].Pos() - } - - // fmt.Println("DEBUG ----------------") - // fmt.Printf("prev = %+v prevPos: %s\n", prev, prevPos) - // fmt.Printf("cur = %+v curPos: %s\n", cur, curPos) - // fmt.Printf("next = %+v nextPos: %s\n", next, nextPos) - - if curPos.Line+1 == nextPos.Line { - aligned = append(aligned, item) - index++ - continue - } - - if curPos.Line-1 == prevPos.Line { - aligned = append(aligned, item) - index++ - - // finish if we have a new line or comment next. This happens - // if the next item is not adjacent - if curPos.Line+1 != nextPos.Line { - break - } - continue - } - - break - } - - // put newlines if the items are between other non aligned items. - // newlines are also added if there is a standalone comment already, so - // check it too - if !commented && index != len(aligned) { - buf.WriteByte(newline) - } - - if len(aligned) >= 1 { - p.prev = aligned[len(aligned)-1].Pos() - - items := p.alignedItems(aligned) - buf.Write(p.indent(items)) - } else { - p.prev = o.List.Items[index].Pos() - - buf.Write(p.indent(p.objectItem(o.List.Items[index]))) - index++ - } - - buf.WriteByte(newline) - } - - buf.WriteString("}") - return buf.Bytes() -} - -func (p *printer) alignedItems(items []*ast.ObjectItem) []byte { - var buf bytes.Buffer - - // find the longest key and value length, needed for alignment - var longestKeyLen int // longest key length - var longestValLen int // longest value length - for _, item := range items { - key := len(item.Keys[0].Token.Text) - val := len(p.output(item.Val)) - - if key > longestKeyLen { - longestKeyLen = key - } - - if val > longestValLen { - longestValLen = val - } - } - - for i, item := range items { - if item.LeadComment != nil { - for _, comment := range item.LeadComment.List { - buf.WriteString(comment.Text) - buf.WriteByte(newline) - } - } - - for i, k := range item.Keys { - keyLen := len(k.Token.Text) - buf.WriteString(k.Token.Text) - for i := 0; i < longestKeyLen-keyLen+1; i++ { - buf.WriteByte(blank) - } - - // reach end of key - if i == len(item.Keys)-1 && len(item.Keys) == 1 { - buf.WriteString("=") - buf.WriteByte(blank) - } - } - - val := p.output(item.Val) - valLen := len(val) - buf.Write(val) - - if item.Val.Pos().Line == item.Keys[0].Pos().Line && item.LineComment != nil { - for i := 0; i < longestValLen-valLen+1; i++ { - buf.WriteByte(blank) - } - - for _, comment := range item.LineComment.List { - buf.WriteString(comment.Text) - } - } - - // do not print for the last item - if i != len(items)-1 { - buf.WriteByte(newline) - } - } - - return buf.Bytes() -} - -// list returns the printable HCL form of an list type. -func (p *printer) list(l *ast.ListType) []byte { - var buf bytes.Buffer - buf.WriteString("[") - - var longestLine int - for _, item := range l.List { - // for now we assume that the list only contains literal types - if lit, ok := item.(*ast.LiteralType); ok { - lineLen := len(lit.Token.Text) - if lineLen > longestLine { - longestLine = lineLen - } - } - } - - insertSpaceBeforeItem := false - for i, item := range l.List { - if item.Pos().Line != l.Lbrack.Line { - // multiline list, add newline before we add each item - buf.WriteByte(newline) - insertSpaceBeforeItem = false - // also indent each line - val := p.output(item) - curLen := len(val) - buf.Write(p.indent(val)) - buf.WriteString(",") - - if lit, ok := item.(*ast.LiteralType); ok && lit.LineComment != nil { - // if the next item doesn't have any comments, do not align - buf.WriteByte(blank) // align one space - for i := 0; i < longestLine-curLen; i++ { - buf.WriteByte(blank) - } - - for _, comment := range lit.LineComment.List { - buf.WriteString(comment.Text) - } - } - - if i == len(l.List)-1 { - buf.WriteByte(newline) - } - } else { - if insertSpaceBeforeItem { - buf.WriteByte(blank) - insertSpaceBeforeItem = false - } - buf.Write(p.output(item)) - if i != len(l.List)-1 { - buf.WriteString(",") - insertSpaceBeforeItem = true - } - } - - } - - buf.WriteString("]") - return buf.Bytes() -} - -// indent indents the lines of the given buffer for each non-empty line -func (p *printer) indent(buf []byte) []byte { - var prefix []byte - if p.cfg.SpacesWidth != 0 { - for i := 0; i < p.cfg.SpacesWidth; i++ { - prefix = append(prefix, blank) - } - } else { - prefix = []byte{tab} - } - - var res []byte - bol := true - for _, c := range buf { - if bol && c != '\n' { - res = append(res, prefix...) - } - - res = append(res, c) - bol = c == '\n' - } - return res -} - -// unindent removes all the indentation from the tombstoned lines -func (p *printer) unindent(buf []byte) []byte { - var res []byte - for i := 0; i < len(buf); i++ { - skip := len(buf)-i <= len(unindent) - if !skip { - skip = !bytes.Equal(unindent, buf[i:i+len(unindent)]) - } - if skip { - res = append(res, buf[i]) - continue - } - - // We have a marker. we have to backtrace here and clean out - // any whitespace ahead of our tombstone up to a \n - for j := len(res) - 1; j >= 0; j-- { - if res[j] == '\n' { - break - } - - res = res[:j] - } - - // Skip the entire unindent marker - i += len(unindent) - 1 - } - - return res -} - -// heredocIndent marks all the 2nd and further lines as unindentable -func (p *printer) heredocIndent(buf []byte) []byte { - var res []byte - bol := false - for _, c := range buf { - if bol && c != '\n' { - res = append(res, unindent...) - } - res = append(res, c) - bol = c == '\n' - } - return res -} - -func lines(txt string) int { - endline := 1 - for i := 0; i < len(txt); i++ { - if txt[i] == '\n' { - endline++ - } - } - return endline -} - -// ---------------------------------------------------------------------------- -// Tracing support - -func (p *printer) printTrace(a ...interface{}) { - if !p.enableTrace { - return - } - - const dots = ". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . " - const n = len(dots) - i := 2 * p.indentTrace - for i > n { - fmt.Print(dots) - i -= n - } - // i <= n - fmt.Print(dots[0:i]) - fmt.Println(a...) -} - -func trace(p *printer, msg string) *printer { - p.printTrace(msg, "(") - p.indentTrace++ - return p -} - -// Usage pattern: defer un(trace(p, "...")) -func un(p *printer) { - p.indentTrace-- - p.printTrace(")") -} diff --git a/vendor/github.com/hashicorp/hcl/hcl/printer/printer.go b/vendor/github.com/hashicorp/hcl/hcl/printer/printer.go deleted file mode 100644 index fb9df58d4..000000000 --- a/vendor/github.com/hashicorp/hcl/hcl/printer/printer.go +++ /dev/null @@ -1,64 +0,0 @@ -// Package printer implements printing of AST nodes to HCL format. -package printer - -import ( - "bytes" - "io" - "text/tabwriter" - - "github.com/hashicorp/hcl/hcl/ast" - "github.com/hashicorp/hcl/hcl/parser" -) - -var DefaultConfig = Config{ - SpacesWidth: 2, -} - -// A Config node controls the output of Fprint. -type Config struct { - SpacesWidth int // if set, it will use spaces instead of tabs for alignment -} - -func (c *Config) Fprint(output io.Writer, node ast.Node) error { - p := &printer{ - cfg: *c, - comments: make([]*ast.CommentGroup, 0), - standaloneComments: make([]*ast.CommentGroup, 0), - // enableTrace: true, - } - - p.collectComments(node) - - if _, err := output.Write(p.unindent(p.output(node))); err != nil { - return err - } - - // flush tabwriter, if any - var err error - if tw, _ := output.(*tabwriter.Writer); tw != nil { - err = tw.Flush() - } - - return err -} - -// Fprint "pretty-prints" an HCL node to output -// It calls Config.Fprint with default settings. -func Fprint(output io.Writer, node ast.Node) error { - return DefaultConfig.Fprint(output, node) -} - -// Format formats src HCL and returns the result. -func Format(src []byte) ([]byte, error) { - node, err := parser.Parse(src) - if err != nil { - return nil, err - } - - var buf bytes.Buffer - if err := DefaultConfig.Fprint(&buf, node); err != nil { - return nil, err - } - - return buf.Bytes(), nil -} diff --git a/vendor/github.com/hashicorp/hcl/hcl/test-fixtures/array_comment.hcl b/vendor/github.com/hashicorp/hcl/hcl/test-fixtures/array_comment.hcl deleted file mode 100644 index 78c267582..000000000 --- a/vendor/github.com/hashicorp/hcl/hcl/test-fixtures/array_comment.hcl +++ /dev/null @@ -1,4 +0,0 @@ -foo = [ - "1", - "2", # comment -] diff --git a/vendor/github.com/hashicorp/hcl/hcl/test-fixtures/assign_colon.hcl b/vendor/github.com/hashicorp/hcl/hcl/test-fixtures/assign_colon.hcl deleted file mode 100644 index eb5a99a69..000000000 --- a/vendor/github.com/hashicorp/hcl/hcl/test-fixtures/assign_colon.hcl +++ /dev/null @@ -1,6 +0,0 @@ -resource = [{ - "foo": { - "bar": {}, - "baz": [1, 2, "foo"], - } -}] diff --git a/vendor/github.com/hashicorp/hcl/hcl/test-fixtures/assign_deep.hcl b/vendor/github.com/hashicorp/hcl/hcl/test-fixtures/assign_deep.hcl deleted file mode 100644 index dd3151cb7..000000000 --- a/vendor/github.com/hashicorp/hcl/hcl/test-fixtures/assign_deep.hcl +++ /dev/null @@ -1,5 +0,0 @@ -resource = [{ - foo = [{ - bar = {} - }] -}] diff --git a/vendor/github.com/hashicorp/hcl/hcl/test-fixtures/comment.hcl b/vendor/github.com/hashicorp/hcl/hcl/test-fixtures/comment.hcl deleted file mode 100644 index 1ff7f29fd..000000000 --- a/vendor/github.com/hashicorp/hcl/hcl/test-fixtures/comment.hcl +++ /dev/null @@ -1,15 +0,0 @@ -// Foo - -/* Bar */ - -/* -/* -Baz -*/ - -# Another - -# Multiple -# Lines - -foo = "bar" diff --git a/vendor/github.com/hashicorp/hcl/hcl/test-fixtures/comment_single.hcl b/vendor/github.com/hashicorp/hcl/hcl/test-fixtures/comment_single.hcl deleted file mode 100644 index fec56017d..000000000 --- a/vendor/github.com/hashicorp/hcl/hcl/test-fixtures/comment_single.hcl +++ /dev/null @@ -1 +0,0 @@ -# Hello diff --git a/vendor/github.com/hashicorp/hcl/hcl/test-fixtures/complex.hcl b/vendor/github.com/hashicorp/hcl/hcl/test-fixtures/complex.hcl deleted file mode 100644 index cccb5b06f..000000000 --- a/vendor/github.com/hashicorp/hcl/hcl/test-fixtures/complex.hcl +++ /dev/null @@ -1,42 +0,0 @@ -// This comes from Terraform, as a test -variable "foo" { - default = "bar" - description = "bar" -} - -provider "aws" { - access_key = "foo" - secret_key = "bar" -} - -provider "do" { - api_key = "${var.foo}" -} - -resource "aws_security_group" "firewall" { - count = 5 -} - -resource aws_instance "web" { - ami = "${var.foo}" - security_groups = [ - "foo", - "${aws_security_group.firewall.foo}" - ] - - network_interface { - device_index = 0 - description = "Main network interface" - } -} - -resource "aws_instance" "db" { - security_groups = "${aws_security_group.firewall.*.id}" - VPC = "foo" - - depends_on = ["aws_instance.web"] -} - -output "web_ip" { - value = "${aws_instance.web.private_ip}" -} diff --git a/vendor/github.com/hashicorp/hcl/hcl/test-fixtures/complex_key.hcl b/vendor/github.com/hashicorp/hcl/hcl/test-fixtures/complex_key.hcl deleted file mode 100644 index 0007aaf5f..000000000 --- a/vendor/github.com/hashicorp/hcl/hcl/test-fixtures/complex_key.hcl +++ /dev/null @@ -1 +0,0 @@ -foo.bar = "baz" diff --git a/vendor/github.com/hashicorp/hcl/hcl/test-fixtures/empty.hcl b/vendor/github.com/hashicorp/hcl/hcl/test-fixtures/empty.hcl deleted file mode 100644 index e69de29bb..000000000 diff --git a/vendor/github.com/hashicorp/hcl/hcl/test-fixtures/list.hcl b/vendor/github.com/hashicorp/hcl/hcl/test-fixtures/list.hcl deleted file mode 100644 index 059d4ce65..000000000 --- a/vendor/github.com/hashicorp/hcl/hcl/test-fixtures/list.hcl +++ /dev/null @@ -1 +0,0 @@ -foo = [1, 2, "foo"] diff --git a/vendor/github.com/hashicorp/hcl/hcl/test-fixtures/list_comma.hcl b/vendor/github.com/hashicorp/hcl/hcl/test-fixtures/list_comma.hcl deleted file mode 100644 index 50f4218ac..000000000 --- a/vendor/github.com/hashicorp/hcl/hcl/test-fixtures/list_comma.hcl +++ /dev/null @@ -1 +0,0 @@ -foo = [1, 2, "foo",] diff --git a/vendor/github.com/hashicorp/hcl/hcl/test-fixtures/multiple.hcl b/vendor/github.com/hashicorp/hcl/hcl/test-fixtures/multiple.hcl deleted file mode 100644 index 029c54b0c..000000000 --- a/vendor/github.com/hashicorp/hcl/hcl/test-fixtures/multiple.hcl +++ /dev/null @@ -1,2 +0,0 @@ -foo = "bar" -key = 7 diff --git a/vendor/github.com/hashicorp/hcl/hcl/test-fixtures/old.hcl b/vendor/github.com/hashicorp/hcl/hcl/test-fixtures/old.hcl deleted file mode 100644 index e9f77cae9..000000000 --- a/vendor/github.com/hashicorp/hcl/hcl/test-fixtures/old.hcl +++ /dev/null @@ -1,3 +0,0 @@ -default = { - "eu-west-1": "ami-b1cf19c6", -} diff --git a/vendor/github.com/hashicorp/hcl/hcl/test-fixtures/structure.hcl b/vendor/github.com/hashicorp/hcl/hcl/test-fixtures/structure.hcl deleted file mode 100644 index 92592fbb3..000000000 --- a/vendor/github.com/hashicorp/hcl/hcl/test-fixtures/structure.hcl +++ /dev/null @@ -1,5 +0,0 @@ -// This is a test structure for the lexer -foo bar "baz" { - key = 7 - foo = "bar" -} diff --git a/vendor/github.com/hashicorp/hcl/hcl/test-fixtures/structure_basic.hcl b/vendor/github.com/hashicorp/hcl/hcl/test-fixtures/structure_basic.hcl deleted file mode 100644 index 7229a1f01..000000000 --- a/vendor/github.com/hashicorp/hcl/hcl/test-fixtures/structure_basic.hcl +++ /dev/null @@ -1,5 +0,0 @@ -foo { - value = 7 - "value" = 8 - "complex::value" = 9 -} diff --git a/vendor/github.com/hashicorp/hcl/hcl/test-fixtures/structure_empty.hcl b/vendor/github.com/hashicorp/hcl/hcl/test-fixtures/structure_empty.hcl deleted file mode 100644 index 4d156ddea..000000000 --- a/vendor/github.com/hashicorp/hcl/hcl/test-fixtures/structure_empty.hcl +++ /dev/null @@ -1 +0,0 @@ -resource "foo" "bar" {} diff --git a/vendor/github.com/hashicorp/hcl/hcl/test-fixtures/types.hcl b/vendor/github.com/hashicorp/hcl/hcl/test-fixtures/types.hcl deleted file mode 100644 index cf2747ea1..000000000 --- a/vendor/github.com/hashicorp/hcl/hcl/test-fixtures/types.hcl +++ /dev/null @@ -1,7 +0,0 @@ -foo = "bar" -bar = 7 -baz = [1,2,3] -foo = -12 -bar = 3.14159 -foo = true -bar = false diff --git a/vendor/github.com/hashicorp/hcl/json/test-fixtures/array.json b/vendor/github.com/hashicorp/hcl/json/test-fixtures/array.json deleted file mode 100644 index e320f17ab..000000000 --- a/vendor/github.com/hashicorp/hcl/json/test-fixtures/array.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "foo": [1, 2, "bar"], - "bar": "baz" -} diff --git a/vendor/github.com/hashicorp/hcl/json/test-fixtures/basic.json b/vendor/github.com/hashicorp/hcl/json/test-fixtures/basic.json deleted file mode 100644 index b54bde96c..000000000 --- a/vendor/github.com/hashicorp/hcl/json/test-fixtures/basic.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "foo": "bar" -} diff --git a/vendor/github.com/hashicorp/hcl/json/test-fixtures/object.json b/vendor/github.com/hashicorp/hcl/json/test-fixtures/object.json deleted file mode 100644 index 72168a3cc..000000000 --- a/vendor/github.com/hashicorp/hcl/json/test-fixtures/object.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "foo": { - "bar": [1,2] - } -} diff --git a/vendor/github.com/hashicorp/hcl/json/test-fixtures/types.json b/vendor/github.com/hashicorp/hcl/json/test-fixtures/types.json deleted file mode 100644 index 9a142a6ca..000000000 --- a/vendor/github.com/hashicorp/hcl/json/test-fixtures/types.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "foo": "bar", - "bar": 7, - "baz": [1,2,3], - "foo": -12, - "bar": 3.14159, - "foo": true, - "bar": false, - "foo": null -} diff --git a/vendor/github.com/hashicorp/hcl/test-fixtures/basic.hcl b/vendor/github.com/hashicorp/hcl/test-fixtures/basic.hcl deleted file mode 100644 index 949994487..000000000 --- a/vendor/github.com/hashicorp/hcl/test-fixtures/basic.hcl +++ /dev/null @@ -1,2 +0,0 @@ -foo = "bar" -bar = "${file("bing/bong.txt")}" diff --git a/vendor/github.com/hashicorp/hcl/test-fixtures/basic.json b/vendor/github.com/hashicorp/hcl/test-fixtures/basic.json deleted file mode 100644 index 7bdddc84b..000000000 --- a/vendor/github.com/hashicorp/hcl/test-fixtures/basic.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "foo": "bar", - "bar": "${file(\"bing/bong.txt\")}" -} diff --git a/vendor/github.com/hashicorp/hcl/test-fixtures/basic_int_string.hcl b/vendor/github.com/hashicorp/hcl/test-fixtures/basic_int_string.hcl deleted file mode 100644 index 4e415da20..000000000 --- a/vendor/github.com/hashicorp/hcl/test-fixtures/basic_int_string.hcl +++ /dev/null @@ -1 +0,0 @@ -count = "3" diff --git a/vendor/github.com/hashicorp/hcl/test-fixtures/basic_squish.hcl b/vendor/github.com/hashicorp/hcl/test-fixtures/basic_squish.hcl deleted file mode 100644 index 363697b49..000000000 --- a/vendor/github.com/hashicorp/hcl/test-fixtures/basic_squish.hcl +++ /dev/null @@ -1,3 +0,0 @@ -foo="bar" -bar="${file("bing/bong.txt")}" -foo-bar="baz" diff --git a/vendor/github.com/hashicorp/hcl/test-fixtures/decode_policy.hcl b/vendor/github.com/hashicorp/hcl/test-fixtures/decode_policy.hcl deleted file mode 100644 index 5b185cc91..000000000 --- a/vendor/github.com/hashicorp/hcl/test-fixtures/decode_policy.hcl +++ /dev/null @@ -1,15 +0,0 @@ -key "" { - policy = "read" -} - -key "foo/" { - policy = "write" -} - -key "foo/bar/" { - policy = "read" -} - -key "foo/bar/baz" { - policy = "deny" -} diff --git a/vendor/github.com/hashicorp/hcl/test-fixtures/decode_policy.json b/vendor/github.com/hashicorp/hcl/test-fixtures/decode_policy.json deleted file mode 100644 index 151864ee8..000000000 --- a/vendor/github.com/hashicorp/hcl/test-fixtures/decode_policy.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "key": { - "": { - "policy": "read" - }, - - "foo/": { - "policy": "write" - }, - - "foo/bar/": { - "policy": "read" - }, - - "foo/bar/baz": { - "policy": "deny" - } - } -} diff --git a/vendor/github.com/hashicorp/hcl/test-fixtures/decode_tf_variable.hcl b/vendor/github.com/hashicorp/hcl/test-fixtures/decode_tf_variable.hcl deleted file mode 100644 index 52dcaa1bc..000000000 --- a/vendor/github.com/hashicorp/hcl/test-fixtures/decode_tf_variable.hcl +++ /dev/null @@ -1,10 +0,0 @@ -variable "foo" { - default = "bar" - description = "bar" -} - -variable "amis" { - default = { - east = "foo" - } -} diff --git a/vendor/github.com/hashicorp/hcl/test-fixtures/decode_tf_variable.json b/vendor/github.com/hashicorp/hcl/test-fixtures/decode_tf_variable.json deleted file mode 100644 index 49f921ed0..000000000 --- a/vendor/github.com/hashicorp/hcl/test-fixtures/decode_tf_variable.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "variable": { - "foo": { - "default": "bar", - "description": "bar" - }, - - "amis": { - "default": { - "east": "foo" - } - } - } -} diff --git a/vendor/github.com/hashicorp/hcl/test-fixtures/empty.hcl b/vendor/github.com/hashicorp/hcl/test-fixtures/empty.hcl deleted file mode 100644 index 5be1b2315..000000000 --- a/vendor/github.com/hashicorp/hcl/test-fixtures/empty.hcl +++ /dev/null @@ -1 +0,0 @@ -resource "foo" {} diff --git a/vendor/github.com/hashicorp/hcl/test-fixtures/escape.hcl b/vendor/github.com/hashicorp/hcl/test-fixtures/escape.hcl deleted file mode 100644 index ead1b8b99..000000000 --- a/vendor/github.com/hashicorp/hcl/test-fixtures/escape.hcl +++ /dev/null @@ -1 +0,0 @@ -foo = "bar\"baz\\n" diff --git a/vendor/github.com/hashicorp/hcl/test-fixtures/flat.hcl b/vendor/github.com/hashicorp/hcl/test-fixtures/flat.hcl deleted file mode 100644 index 9bca551f8..000000000 --- a/vendor/github.com/hashicorp/hcl/test-fixtures/flat.hcl +++ /dev/null @@ -1,2 +0,0 @@ -foo = "bar" -Key = 7 diff --git a/vendor/github.com/hashicorp/hcl/test-fixtures/float.hcl b/vendor/github.com/hashicorp/hcl/test-fixtures/float.hcl deleted file mode 100644 index eed44e542..000000000 --- a/vendor/github.com/hashicorp/hcl/test-fixtures/float.hcl +++ /dev/null @@ -1 +0,0 @@ -a = 1.02 diff --git a/vendor/github.com/hashicorp/hcl/test-fixtures/float.json b/vendor/github.com/hashicorp/hcl/test-fixtures/float.json deleted file mode 100644 index a9d1ab4b0..000000000 --- a/vendor/github.com/hashicorp/hcl/test-fixtures/float.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "a": 1.02 -} diff --git a/vendor/github.com/hashicorp/hcl/test-fixtures/interpolate_escape.hcl b/vendor/github.com/hashicorp/hcl/test-fixtures/interpolate_escape.hcl deleted file mode 100644 index 7b9539138..000000000 --- a/vendor/github.com/hashicorp/hcl/test-fixtures/interpolate_escape.hcl +++ /dev/null @@ -1 +0,0 @@ -foo="${file(\"bing/bong.txt\")}" diff --git a/vendor/github.com/hashicorp/hcl/test-fixtures/multiline.hcl b/vendor/github.com/hashicorp/hcl/test-fixtures/multiline.hcl deleted file mode 100644 index f883bd707..000000000 --- a/vendor/github.com/hashicorp/hcl/test-fixtures/multiline.hcl +++ /dev/null @@ -1,4 +0,0 @@ -foo = < /dev/null 2>&1 -if [ $? -eq 0 ] -then - exit -fi - -# If we're not on OS X, then error -case $OSTYPE in - darwin*) - ;; - *) - echo "Can't setup interfaces on non-Mac. Error!" - exit 1 - ;; -esac - -# Setup loopback -for ((i=2;i<256;i++)) -do - sudo ifconfig lo0 alias 127.0.0.$i up -done diff --git a/vendor/github.com/hashicorp/memberlist/todo.md b/vendor/github.com/hashicorp/memberlist/todo.md new file mode 100644 index 000000000..009c1d647 --- /dev/null +++ b/vendor/github.com/hashicorp/memberlist/todo.md @@ -0,0 +1,6 @@ +# TODO +* Dynamic RTT discovery + * Compute 99th percentile for ping/ack + * Better lower bound for ping/ack, faster failure detection +* Dynamic MTU discovery + * Prevent lost updates, increases efficiency diff --git a/vendor/github.com/hashicorp/raft/bench/bench.go b/vendor/github.com/hashicorp/raft/bench/bench.go deleted file mode 100644 index d7a58f45f..000000000 --- a/vendor/github.com/hashicorp/raft/bench/bench.go +++ /dev/null @@ -1,171 +0,0 @@ -package raftbench - -// raftbench provides common benchmarking functions which can be used by -// anything which implements the raft.LogStore and raft.StableStore interfaces. -// All functions accept these interfaces and perform benchmarking. This -// makes comparing backend performance easier by sharing the tests. - -import ( - "github.com/hashicorp/raft" - "testing" -) - -func FirstIndex(b *testing.B, store raft.LogStore) { - // Create some fake data - var logs []*raft.Log - for i := 1; i < 10; i++ { - logs = append(logs, &raft.Log{Index: uint64(i), Data: []byte("data")}) - } - if err := store.StoreLogs(logs); err != nil { - b.Fatalf("err: %s", err) - } - b.ResetTimer() - - // Run FirstIndex a number of times - for n := 0; n < b.N; n++ { - store.FirstIndex() - } -} - -func LastIndex(b *testing.B, store raft.LogStore) { - // Create some fake data - var logs []*raft.Log - for i := 1; i < 10; i++ { - logs = append(logs, &raft.Log{Index: uint64(i), Data: []byte("data")}) - } - if err := store.StoreLogs(logs); err != nil { - b.Fatalf("err: %s", err) - } - b.ResetTimer() - - // Run LastIndex a number of times - for n := 0; n < b.N; n++ { - store.LastIndex() - } -} - -func GetLog(b *testing.B, store raft.LogStore) { - // Create some fake data - var logs []*raft.Log - for i := 1; i < 10; i++ { - logs = append(logs, &raft.Log{Index: uint64(i), Data: []byte("data")}) - } - if err := store.StoreLogs(logs); err != nil { - b.Fatalf("err: %s", err) - } - b.ResetTimer() - - // Run GetLog a number of times - for n := 0; n < b.N; n++ { - if err := store.GetLog(5, new(raft.Log)); err != nil { - b.Fatalf("err: %s", err) - } - } -} - -func StoreLog(b *testing.B, store raft.LogStore) { - // Run StoreLog a number of times - for n := 0; n < b.N; n++ { - log := &raft.Log{Index: uint64(n), Data: []byte("data")} - if err := store.StoreLog(log); err != nil { - b.Fatalf("err: %s", err) - } - } -} - -func StoreLogs(b *testing.B, store raft.LogStore) { - // Run StoreLogs a number of times. We want to set multiple logs each - // run, so we create 3 logs with incrementing indexes for each iteration. - for n := 0; n < b.N; n++ { - b.StopTimer() - offset := 3 * (n + 1) - logs := []*raft.Log{ - &raft.Log{Index: uint64(offset - 2), Data: []byte("data")}, - &raft.Log{Index: uint64(offset - 1), Data: []byte("data")}, - &raft.Log{Index: uint64(offset), Data: []byte("data")}, - } - b.StartTimer() - - if err := store.StoreLogs(logs); err != nil { - b.Fatalf("err: %s", err) - } - } -} - -func DeleteRange(b *testing.B, store raft.LogStore) { - // Create some fake data. In this case, we create 3 new log entries for each - // test case, and separate them by index in multiples of 10. This allows - // some room so that we can test deleting ranges with "extra" logs to - // to ensure we stop going to the database once our max index is hit. - var logs []*raft.Log - for n := 0; n < b.N; n++ { - offset := 10 * n - for i := offset; i < offset+3; i++ { - logs = append(logs, &raft.Log{Index: uint64(i), Data: []byte("data")}) - } - } - if err := store.StoreLogs(logs); err != nil { - b.Fatalf("err: %s", err) - } - b.ResetTimer() - - // Delete a range of the data - for n := 0; n < b.N; n++ { - offset := 10 * n - if err := store.DeleteRange(uint64(offset), uint64(offset+9)); err != nil { - b.Fatalf("err: %s", err) - } - } -} - -func Set(b *testing.B, store raft.StableStore) { - // Run Set a number of times - for n := 0; n < b.N; n++ { - if err := store.Set([]byte{byte(n)}, []byte("val")); err != nil { - b.Fatalf("err: %s", err) - } - } -} - -func Get(b *testing.B, store raft.StableStore) { - // Create some fake data - for i := 1; i < 10; i++ { - if err := store.Set([]byte{byte(i)}, []byte("val")); err != nil { - b.Fatalf("err: %s", err) - } - } - b.ResetTimer() - - // Run Get a number of times - for n := 0; n < b.N; n++ { - if _, err := store.Get([]byte{0x05}); err != nil { - b.Fatalf("err: %s", err) - } - } -} - -func SetUint64(b *testing.B, store raft.StableStore) { - // Run SetUint64 a number of times - for n := 0; n < b.N; n++ { - if err := store.SetUint64([]byte{byte(n)}, uint64(n)); err != nil { - b.Fatalf("err: %s", err) - } - } -} - -func GetUint64(b *testing.B, store raft.StableStore) { - // Create some fake data - for i := 0; i < 10; i++ { - if err := store.SetUint64([]byte{byte(i)}, uint64(i)); err != nil { - b.Fatalf("err: %s", err) - } - } - b.ResetTimer() - - // Run GetUint64 a number of times - for n := 0; n < b.N; n++ { - if _, err := store.Get([]byte{0x05}); err != nil { - b.Fatalf("err: %s", err) - } - } -} diff --git a/vendor/github.com/hashicorp/scada-client/test/cert.pem b/vendor/github.com/hashicorp/scada-client/test/cert.pem deleted file mode 100644 index cad2560fb..000000000 --- a/vendor/github.com/hashicorp/scada-client/test/cert.pem +++ /dev/null @@ -1,28 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIExzCCA6+gAwIBAgIJAMjqGgoPoyXdMA0GCSqGSIb3DQEBBQUAMIGdMQswCQYD -VQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZyYW5j -aXNjbzEWMBQGA1UEChMNSGFzaGlDb3JwIEluYzEMMAoGA1UECxMDQml6MRkwFwYD -VQQDExB2YWdyYW50Y2xvdWQuY29tMSAwHgYJKoZIhvcNAQkBFhFiaXpAaGFzaGlj -b3JwLmNvbTAeFw0xNDAxMjUyMTU3NTVaFw0xNTAxMjUyMTU3NTVaMIGdMQswCQYD -VQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZyYW5j -aXNjbzEWMBQGA1UEChMNSGFzaGlDb3JwIEluYzEMMAoGA1UECxMDQml6MRkwFwYD -VQQDExB2YWdyYW50Y2xvdWQuY29tMSAwHgYJKoZIhvcNAQkBFhFiaXpAaGFzaGlj -b3JwLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKR0+gv/F+ZY -obiNBqRME1CLKP7ibVJjp3wsgjkdyUfpP7jkJMxQhBYFGxjxQ/XmiLgg1v6Z3ruf -SHkGZjWmzXfiYkybbBFo7jSlkiaKgbmPWAn1jX3kL7XsanZb82Vr/GmdtCl7PRED -yKE0MBdGIU+MGz9ukQg+gqY3eJlE6YnmkqNd8yKuwm4SH855EF/KhmVm6EOcAZVx -t69h0Bc092ewl2gSfQTZ+8codyJYBcQnWl9IZhjvhcJjbLh6Pg9qroG9QnqXxqwz -7dA0CoRiY/2a2oKJmyrlls5XCVZlJ8ycTeZ1dSPvrpy1B6Hg+6hWflDk9uR9NH9d -71KhLu4bfPECAwEAAaOCAQYwggECMB0GA1UdDgQWBBS0HpX60bh6l4zmpmZEG/ZT -SGaapjCB0gYDVR0jBIHKMIHHgBS0HpX60bh6l4zmpmZEG/ZTSGaapqGBo6SBoDCB -nTELMAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNh -biBGcmFuY2lzY28xFjAUBgNVBAoTDUhhc2hpQ29ycCBJbmMxDDAKBgNVBAsTA0Jp -ejEZMBcGA1UEAxMQdmFncmFudGNsb3VkLmNvbTEgMB4GCSqGSIb3DQEJARYRYml6 -QGhhc2hpY29ycC5jb22CCQDI6hoKD6Ml3TAMBgNVHRMEBTADAQH/MA0GCSqGSIb3 -DQEBBQUAA4IBAQBsSg0uLYIWQEwQjzl9WAIiXMk4ztnE3C66wXzcDJlx4UMXs5Vu -s7A0L4BM/kpdpO96CNtV4LRO8KAJLTTZUQdsjhVrZu8PhiQx75W2enmJ1ogvWyUf -l11PfmzCweXtCQo1Uf2IQrXh0r5qYhQpCehaLfp0JnKSJPSaIyxcbo97YDdVkUr1 -sGJLpEOcLODh0FwHHGEt0wjap225zfGiJdlehYp19g9zlaqoG4RPLhqkj8zBtN2v -OCEj15q8K8e25ummAJG4yjRiJw4ndtS6jnATJxgbaT/HG6INWK7qpm47TPGAk7CV -Nb/rNw3eU3/FyngcqXmnpZP+mJVSgxOP/7v1 ------END CERTIFICATE----- diff --git a/vendor/github.com/hashicorp/scada-client/test/key.pem b/vendor/github.com/hashicorp/scada-client/test/key.pem deleted file mode 100644 index f4bdaddb8..000000000 --- a/vendor/github.com/hashicorp/scada-client/test/key.pem +++ /dev/null @@ -1,27 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -MIIEowIBAAKCAQEApHT6C/8X5lihuI0GpEwTUIso/uJtUmOnfCyCOR3JR+k/uOQk -zFCEFgUbGPFD9eaIuCDW/pneu59IeQZmNabNd+JiTJtsEWjuNKWSJoqBuY9YCfWN -feQvtexqdlvzZWv8aZ20KXs9EQPIoTQwF0YhT4wbP26RCD6Cpjd4mUTpieaSo13z -Iq7CbhIfznkQX8qGZWboQ5wBlXG3r2HQFzT3Z7CXaBJ9BNn7xyh3IlgFxCdaX0hm -GO+FwmNsuHo+D2qugb1CepfGrDPt0DQKhGJj/ZragombKuWWzlcJVmUnzJxN5nV1 -I++unLUHoeD7qFZ+UOT25H00f13vUqEu7ht88QIDAQABAoIBAGX37c4gZfY6AFQI -hRS74sHu9wVK6ZPLHF7ezgOSF2pSEmOWecaBKdTpZ4rIlWXTgfQA0K1eRH863NnF -gPxFJ2Ls6BwtxgzpbcEQ5BSnjpW6blEGgquLH5YCN2SZ0MmS8heeY8XQluWE3hIt -5J+ZqS/EZGSpLp3Y/HMJM+p8kv0gDc6d6CnadWhbTTBMyR6xl5GYzhMU+ZXoPsD0 -oKbAmY2AjCSu3UyQSvp9rwRl1JnGJxl0OAa+2c/dxjhcHBfXB4tfrkvfaAlLiW2l -h9pdTTpO4c6k8uHbaWRMNYsDPTH3ttKo7PF13kkp/LTqKY6u0z2nc3FpovB54E6r -KaLD2AECgYEA2yLZRiiPs7mYnOtAxuGLCsyKVQMXJVjz+Nd986rUBDwcChGVvQif -9AIBjg71GxgA8dJaSrsZJHp3VDUh101vsf1lLhlwnEJRQp2X3Z69Pn3qFf5oO7DS -t7ZuftkKSANoxPXuWV0nPflKo8c+ogmG6YBFjm9zlQsXxRo+8/MpA4ECgYEAwB9a -+J2/Ogf5/WMVp0WRnTTT++1SL29Gxh/1pF62Y23Xya172WJVSXe/BTx0/C0jNXQr -TUzsN/LRfYhTl3aYD8LJwjfGy5tjGh7UDzZQwr4dy2R0n7zqLAY9Shb8479RM/AR -x7ApMMTUOW/U0Pl/LM/MoPTR2milPUlw7ST1cXECgYABUh1zIc1z7Ntxnq1eRX+8 -Ce2Pg5xBGl8mEc5tiIsMl3wnx2FaqVGle9mcjJSHnEZtLrJinuwQ3zgW5tcUYCAb -N4bDl12pY3Dv8Nk4ebt0Q/gEN+tS6MbsWooh85bvRi38eer82OXiprz/bbT/7wTE -JYTFzgApVs7G3ligycdmgQKBgGNoVfPJ+4YVVn6LZErWrk9/ZCg4VYwBsccWBk30 -S78KuNq7jxedz69h7E7TR1ysJkmkQDuRD7CrTUX84fO/A1M0YJzDq3LyhcagKO1u -Fz+Mi3IQGmAEqc35tIC/gD5/YY7UKv794XJAhebqPF2cmvce1ix6QJMYDle1xl6N -/wmhAoGBAIvEsNlKkaJDQp9uGL6wWXkOe31fOVHsF7717WDfb2wvG1+aqxPfQQYI -IvHeir0QBK1cX/qOj7CPP1uLKEuXm9Si1ExNSyMfyyV5o8tjN81Lbp9GP2nFDCGJ -WgTZn2W8WipoY/pPjKxjPy+3H0e4AU7XeYJGrfqNZJrqZnftXHin ------END RSA PRIVATE KEY-----