Commit Graph

7 Commits

Author SHA1 Message Date
brian m. carlson
3e765ab08b
t: test locking with git-lfs-transfer
Test locking using git-lfs-transfer as well as git-lfs-authenticate, and
label the tests to distinguish between them.  Add functions to assert
and refute the existence of a lock over SSH and, to implement these, to
speak basic pkt-line commands over a pipe.

While we're at it, remove a debugging statement in one of the tests.
2021-07-20 19:16:00 +00:00
brian m. carlson
a0190a6020
lfshttp: don't strip off initial slash on SSH commands
When we process an SSH URL, we intentionally strip off the slash at the
beginning of the URL.  While that was convenient for
git-lfs-authenticate, it also prevents us from handling an absolute path
in git-lfs-transfer, since the path will have its leading slash stripped
off and will therefore be relative.

Instead, let's adopt Git's behavior, which is to not remove the leading
slash.  This is an incompatible change, but we're about to do a major
release, so it's a good time to make it.  This will affect both
git-lfs-transfer and git-lfs-authenticate commands, but at least GitHub
already supports the proper syntax.

Note that since we process the non-URL form of SSH remotes by converting
them to a URL and then parsing, let's strip off the leading slash when
we process that form, since there we do have the ability to distinguish
between absolute and relative paths.

Update the lfs-ssh-echo binary to handle this new format.
2021-07-20 19:16:00 +00:00
brian m. carlson
9e006ac4e2
Rename default branch in tests to "main"
Currently, our default branch in tests is "master".  This is the Git
default, but the Git default will likely change in the future, so it
makes sense to update our testsuite to be explicit about the branch
name.  We'll ensure this continues by building against older versions of
Git as well as newer versions.

We use "main" for the new branch name, since that's the proposed value
upstream.

This commit was made entirely by automated means using the following
command:

  git grep -l master t | xargs sed -i -e 's/master/main/g'
2020-07-08 15:38:17 +00:00
brian m. carlson
3fa6e145a2
locking: use a download token when searching locks
The locking API documentation specifies that a user need only have pull
access to the repository when searching locks. However, we requested an
upload token, which requires push access. Instead, ask for a download
token, which requires only pull access, as documented.
2019-07-17 21:41:56 +00:00
TBK
81c8d527be
Fix typo in t-locks.sh 2019-05-26 19:19:07 +02:00
Taylor Blau
de9152049c t: load shell scripts from $(dirname) instead of 't' 2018-07-10 13:51:40 -05:00
Taylor Blau
219b7e0a3d t: prefix all existing tests with t- 2018-07-09 16:24:25 -05:00