mirror of
https://gitcode.com/gitea/gitea.git
synced 2025-06-21 20:32:46 +08:00
Dump: add output format tar and output to stdout (#10376)
* Dump: Use mholt/archive/v3 to support tar including many compressions Signed-off-by: Philipp Homann <homann.philipp@googlemail.com> * Dump: Allow dump output to stdout Signed-off-by: Philipp Homann <homann.philipp@googlemail.com> * Dump: Fixed bug present since #6677 where SessionConfig.Provider is never "file" Signed-off-by: Philipp Homann <homann.philipp@googlemail.com> * Dump: never pack RepoRootPath, LFS.ContentPath and LogRootPath when they are below AppDataPath Signed-off-by: Philipp Homann <homann.philipp@googlemail.com> * Dump: also dump LFS (fixes #10058) Signed-off-by: Philipp Homann <homann.philipp@googlemail.com> * Dump: never dump CustomPath if CustomPath is a subdir of or equal to AppDataPath (fixes #10365) Signed-off-by: Philipp Homann <homann.philipp@googlemail.com> * Use log.Info instead of fmt.Fprintf Signed-off-by: Philipp Homann <homann.philipp@googlemail.com> * import ordering * make fmt Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io> Co-authored-by: Matti R <matti@mdranta.net>
This commit is contained in:
cmd
go.modgo.summodules/setting
vendor
github.com
andybalholm/brotli
LICENSEREADME.mdbackward_references.gobackward_references_hq.gobit_cost.gobit_reader.goblock_splitter.goblock_splitter_command.goblock_splitter_distance.goblock_splitter_literal.gobrotli_bit_stream.gocluster.gocluster_command.gocluster_distance.gocluster_literal.gocommand.gocompress_fragment.gocompress_fragment_two_pass.goconstants.gocontext.godecode.godictionary.godictionary_hash.goencode.goencoder_dict.goentropy_encode.goentropy_encode_static.gofast_log.gofind_match_length.gogo.modgo.sumh10.goh5.goh6.gohash.gohash_composite.gohash_forgetful_chain.gohash_longest_match_quickly.gohash_rolling.gohistogram.gohuffman.goliteral_cost.gomemory.gometablock.gometablock_command.gometablock_distance.gometablock_literal.goparams.goplatform.goprefix.goprefix_dec.goquality.goreader.goringbuffer.gostate.gostatic_dict.gostatic_dict_lut.gosymbol_list.gotransform.goutf8_util.goutil.gowrite_bits.gowriter.go
dsnet/compress
.travis.ymlLICENSE.mdREADME.mdapi.go
bzip2
go.modgo.suminternal
zbench.shzfuzz.shzprof.shztest.shgolang/gddo
klauspost
compress
fse
huff0
snappy
.gitignoreAUTHORSCONTRIBUTORSLICENSEREADMEdecode.godecode_amd64.godecode_amd64.sdecode_other.goencode.goencode_amd64.goencode_amd64.sencode_other.gorunbench.cmdsnappy.go
zstd
README.mdbitreader.gobitwriter.goblockdec.goblockenc.goblocktype_string.gobytebuf.gobytereader.godecoder.godecoder_options.goenc_dfast.goenc_fast.goenc_params.goencoder.goencoder_options.goframedec.goframeenc.gofse_decoder.gofse_encoder.gofse_predefined.gohash.gohistory.go
internal/xxhash
seqdec.goseqenc.gosnappy.gozstd.gopgzip
mholt/archiver/v3
.gitignoreLICENSEREADME.mdarchiver.goazure-pipelines.ymlbrotli.gobuild.bashbz2.gofilecompressor.gogo.modgo.sumgz.golz4.gorar.gosz.gotar.gotarbrotli.gotarbz2.gotargz.gotarlz4.gotarsz.gotarxz.gotarzst.goxz.gozip.gozstd.go
nwaples/rardecode
LICENSEREADME.mdarchive.goarchive15.goarchive50.gobit_reader.godecode29.godecode29_lz.godecode29_ppm.godecode50.godecode_reader.godecrypt_reader.gofilters.gogo.modhuffman.goppm_model.goreader.govm.go
pierrec/lz4
.gitignore.travis.ymlLICENSEREADME.mdblock.godebug.godebug_stub.go
internal/xxh32
lz4.golz4_go1.10.golz4_notgo1.10.goreader.gowriter.goulikunitz/xz
.gitignoreLICENSEREADME.mdTODO.mdbits.gocrc.goformat.gofox.xzgo.mod
internal
lzma
bintree.gobitops.gobreader.gobuffer.gobytewriter.godecoder.godecoderdict.godirectcodec.godistcodec.goencoder.goencoderdict.gofox.lzmahashtable.goheader.goheader2.golengthcodec.goliteralcodec.gomatchalgorithm.gooperation.goprob.goproperties.gorangecodec.goreader.goreader2.gostate.gotreecodecs.gowriter.gowriter2.go
lzmafilter.gomake-docsreader.gowriter.gounknwon/cae
xi2/xz
74
vendor/github.com/dsnet/compress/api.go
generated
vendored
Normal file
74
vendor/github.com/dsnet/compress/api.go
generated
vendored
Normal file
@ -0,0 +1,74 @@
|
||||
// Copyright 2015, Joe Tsai. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE.md file.
|
||||
|
||||
// Package compress is a collection of compression libraries.
|
||||
package compress
|
||||
|
||||
import (
|
||||
"bufio"
|
||||
"io"
|
||||
|
||||
"github.com/dsnet/compress/internal/errors"
|
||||
)
|
||||
|
||||
// The Error interface identifies all compression related errors.
|
||||
type Error interface {
|
||||
error
|
||||
CompressError()
|
||||
|
||||
// IsDeprecated reports the use of a deprecated and unsupported feature.
|
||||
IsDeprecated() bool
|
||||
|
||||
// IsCorrupted reports whether the input stream was corrupted.
|
||||
IsCorrupted() bool
|
||||
}
|
||||
|
||||
var _ Error = errors.Error{}
|
||||
|
||||
// ByteReader is an interface accepted by all decompression Readers.
|
||||
// It guarantees that the decompressor never reads more data than is necessary
|
||||
// from the underlying io.Reader.
|
||||
type ByteReader interface {
|
||||
io.Reader
|
||||
io.ByteReader
|
||||
}
|
||||
|
||||
var _ ByteReader = (*bufio.Reader)(nil)
|
||||
|
||||
// BufferedReader is an interface accepted by all decompression Readers.
|
||||
// It guarantees that the decompressor never reads more data than is necessary
|
||||
// from the underlying io.Reader. Since BufferedReader allows a decompressor
|
||||
// to peek at bytes further along in the stream without advancing the read
|
||||
// pointer, decompression can experience a significant performance gain when
|
||||
// provided a reader that satisfies this interface. Thus, a decompressor will
|
||||
// prefer this interface over ByteReader for performance reasons.
|
||||
//
|
||||
// The bufio.Reader satisfies this interface.
|
||||
type BufferedReader interface {
|
||||
io.Reader
|
||||
|
||||
// Buffered returns the number of bytes currently buffered.
|
||||
//
|
||||
// This value becomes invalid following the next Read/Discard operation.
|
||||
Buffered() int
|
||||
|
||||
// Peek returns the next n bytes without advancing the reader.
|
||||
//
|
||||
// If Peek returns fewer than n bytes, it also returns an error explaining
|
||||
// why the peek is short. Peek must support peeking of at least 8 bytes.
|
||||
// If 0 <= n <= Buffered(), Peek is guaranteed to succeed without reading
|
||||
// from the underlying io.Reader.
|
||||
//
|
||||
// This result becomes invalid following the next Read/Discard operation.
|
||||
Peek(n int) ([]byte, error)
|
||||
|
||||
// Discard skips the next n bytes, returning the number of bytes discarded.
|
||||
//
|
||||
// If Discard skips fewer than n bytes, it also returns an error.
|
||||
// If 0 <= n <= Buffered(), Discard is guaranteed to succeed without reading
|
||||
// from the underlying io.Reader.
|
||||
Discard(n int) (int, error)
|
||||
}
|
||||
|
||||
var _ BufferedReader = (*bufio.Reader)(nil)
|
Reference in New Issue
Block a user