git-lfs/debian/copyright
brian m. carlson a66274014c
tools: add a function to properly canonicalize paths
Git consistently uses canonicalized paths internally.  This is for many
reasons, but mostly to verify that a single path is within a repository.
In order to interoperate properly with Git, we need to canonicalize
paths and do it in the same way as Git.

On Unix systems, to canonicalize a path, it is sufficient to make the
path absolute and then resolve any symlinks.  Go provides two functions
to do these two steps, filepath.Abs and filepath.EvalSymlinks, and they
work as advertised.

Windows, however, has much more complex path handling and these
functions do not handle all cases.  The typical way to canonicalize
paths on Windows is using GetFinalPathNameByHandle, and this is the
technique Git uses.

Go, however, does not provide a general API to canonicalize paths,
unlike Rust's std::fs::canonicalize and similar functionality in myriad
other languages.  Therefore, in order to get this working on Windows,
let's add a function to canonicalize paths in the appropriate system
way, one for Unix systems and one for Windows.  The code comes from Go's
standard library, so update the copyright and license accordingly.

Update the CanonicalizePath function to use the new function.  We
duplicate the Abs call because we an absolute path in CanonicalizePath
in some cases even if the path is missing, whereas the new function
needs to do it in all cases because we will use it other situations in
the future.  This should be a simple string check, so it should not
involve an extra system call or other overhead.
2021-03-01 22:10:19 +00:00

176 lines
7.7 KiB
Plaintext

Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: git-lfs
Source: https://github.com/git-lfs/git-lfs
Files: *
Copyright: 2013-2015 Github, Inc.
License: Expat
Copyright (c) GitHub, Inc. and Git LFS contributors
.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
.
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Files: vendor/github.com/alexbrainman/sspi/*
vendor/golang.org/x/*
vendor/github.com/jcmturner/gofork/*
subprocess/path.go
subprocess/path_nix.go
subprocess/path_windows.go
tools/filetools_windows.go
Copyright: 2009, 2010, 2012, 2017 The Go Authors
License: Go
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
.
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following disclaimer
in the documentation and/or other materials provided with the
distribution.
* Neither the name of Google Inc. nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Files: vendor/github.com/davecgh/go-spew/*
Copyright: 2012-2016 Dave Collins
License: ISC
Copyright (c) 2012-2016 Dave Collins <dave@davec.name>
.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
Files: vendor/github.com/pkg/errors/*
Copyright: 2015 Dave Cheney
License: BSD-2-Clause
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
.
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Files: vendor/github.com/pmezard/go-difflib/*
Copyright: 2013 Patrick Mezard
License: BSD-3-Clause
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
.
Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
The names of its contributors may not be used to endorse or promote
products derived from this software without specific prior written
permission.
.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Files: vendor/github.com/hashicorp/go-uuid/*
License: MPL-2.0
The complete text of the Mozilla Public License 2.0 can be found in
the file `/usr/share/common-licenses/MPL-2.0'.
Files: vendor/github.com/inconshreveable/mousetrap/*
Copyright: 2014 Alan Shreve
License: Apache-2.0
The complete text of the Apache License 2.0 can be found in the file
`/usr/share/common-licenses/Apache-2.0`.
Files: vendor/github.com/avast/retry-go
Copyright: 2017 Avast
License: Expat
Files: vendor/github.com/dpotapov/go-spnego/*
Copyright: 2018 Daniel Potapov
License: Expat
Files: vendor/github.com/mattn/go-isatty/*
Copyright: Yasuhiro MATSUMOTO
License: Expat
Files: vendor/github.com/rubyist/tracerx/*
Copyright: 2014 Scott Barron
License: Expat
Files: vendor/github.com/spf13/cobra/*
vendor/github.com/xeipuuv/*
vendor/gopkg.in/jcmturner/*
License: Apache-2.0
Files: vendor/github.com/spf13/pflag/*
Copyright: 2012 Alex Ogier
2012 The Go Authors
License: Go
Files: vendor/github.com/ssgelm/cookiejarparser/*
Copyright: 2019 Stephen Gelman
License: Expat
Files: vendor/github.com/stretchr/testify/*
Copyright: 2012-2013 Mat Ryer and Tyler Bunnell
License: Expat