Merge branch 'main' into bmc/add-fetchhead-fallback
This commit is contained in:
commit
71140c0929
6
.github/workflows/ci.yml
vendored
6
.github/workflows/ci.yml
vendored
@ -20,7 +20,7 @@ jobs:
|
||||
# See https://github.com/actions/checkout/issues/882 for details.
|
||||
- uses: ruby/setup-ruby@v1
|
||||
- run: gem install asciidoctor
|
||||
- uses: actions/setup-go@v3
|
||||
- uses: actions/setup-go@v4
|
||||
with:
|
||||
go-version: ${{ matrix.go }}
|
||||
- run: brew install gettext
|
||||
@ -53,7 +53,7 @@ jobs:
|
||||
fetch-depth: 0
|
||||
- run: git fetch origin "+${GITHUB_REF}:${GITHUB_REF}"
|
||||
if: ${{ github.ref_type == 'tag' }}
|
||||
- uses: actions/setup-go@v3
|
||||
- uses: actions/setup-go@v4
|
||||
with:
|
||||
go-version: ${{ matrix.go }}
|
||||
- run: script/cibuild
|
||||
@ -72,7 +72,7 @@ jobs:
|
||||
- run: Rename-Item -Path C:\msys64 -NewName msys64-tmp -Force
|
||||
# We move the MSYS2 installed for Ruby aside to prevent use of its Git,
|
||||
# which does not honour the PATH we set to our built git-lfs binary.
|
||||
- uses: actions/setup-go@v3
|
||||
- uses: actions/setup-go@v4
|
||||
with:
|
||||
go-version: '1.20.x'
|
||||
- run: mkdir -p "$HOME/go/bin"
|
||||
|
6
.github/workflows/release.yml
vendored
6
.github/workflows/release.yml
vendored
@ -24,7 +24,7 @@ jobs:
|
||||
- run: Rename-Item -Path C:\msys64 -NewName msys64-tmp -Force
|
||||
# We move the MSYS2 installed for Ruby aside to prevent use of its Git,
|
||||
# which does not honour the PATH we set to our built git-lfs binary.
|
||||
- uses: actions/setup-go@v3
|
||||
- uses: actions/setup-go@v4
|
||||
with:
|
||||
go-version: ${{ matrix.go }}
|
||||
- run: mkdir -p "$HOME/go/bin"
|
||||
@ -81,7 +81,7 @@ jobs:
|
||||
- run: git fetch origin "+${GITHUB_REF}:${GITHUB_REF}"
|
||||
- uses: ruby/setup-ruby@v1
|
||||
- run: gem install asciidoctor
|
||||
- uses: actions/setup-go@v3
|
||||
- uses: actions/setup-go@v4
|
||||
with:
|
||||
go-version: ${{ matrix.go }}
|
||||
- run: brew install gettext
|
||||
@ -120,7 +120,7 @@ jobs:
|
||||
- run: git fetch origin "+${GITHUB_REF}:${GITHUB_REF}"
|
||||
- uses: ruby/setup-ruby@v1
|
||||
- run: gem install asciidoctor
|
||||
- uses: actions/setup-go@v3
|
||||
- uses: actions/setup-go@v4
|
||||
with:
|
||||
go-version: ${{ matrix.go }}
|
||||
- run: sudo apt-get update && sudo apt-get -y install gettext libarchive-tools
|
||||
|
@ -69,16 +69,16 @@ func (lv *lockVerifier) Verify(ref *git.Ref) {
|
||||
Exit(tr.Tr.Get("error: Authentication error: %s", err))
|
||||
}
|
||||
} else {
|
||||
Print(tr.Tr.Get("Remote %q does not support the Git LFS locking API. Consider disabling it with:", cfg.PushRemote()))
|
||||
Print(" $ git config lfs.%s.locksverify false", lv.endpoint.Url)
|
||||
Error(tr.Tr.Get("Remote %q does not support the Git LFS locking API. Consider disabling it with:", cfg.PushRemote()))
|
||||
Error(" $ git config lfs.%s.locksverify false", lv.endpoint.Url)
|
||||
if lv.verifyState == verifyStateEnabled {
|
||||
ExitWithError(err)
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if lv.verifyState == verifyStateUnknown {
|
||||
Print(tr.Tr.Get("Locking support detected on remote %q. Consider enabling it with:", cfg.PushRemote()))
|
||||
Print(" $ git config lfs.%s.locksverify true", lv.endpoint.Url)
|
||||
Error(tr.Tr.Get("Locking support detected on remote %q. Consider enabling it with:", cfg.PushRemote()))
|
||||
Error(" $ git config lfs.%s.locksverify true", lv.endpoint.Url)
|
||||
}
|
||||
|
||||
lv.addLocks(ref, ours, lv.ourLocks)
|
||||
|
@ -98,14 +98,21 @@ pointers as files by using `--pointers=no-follow`. (The latter option is
|
||||
akin to how existing Git LFS pointers were handled by the `info` mode in
|
||||
prior versions of Git LFS).
|
||||
|
||||
When using the `--everything` option, take note that it means all refs
|
||||
(local and remote) will be considered, but not necessarily all file
|
||||
types. The `import` and `info` modes consider all file types by default,
|
||||
although the `--include` and `--exclude` options constrain this
|
||||
behavior. Also note that after importing across all branches with the
|
||||
`--everything` option (and then checking to ensure the results are
|
||||
satisfactory!) it may be convenient to update multiple branches on your
|
||||
remotes by using the `--all` option to `git push`.
|
||||
When using the `--everything` option, take note that it means all commits
|
||||
reachable from all refs (local and remote) will be considered, but not
|
||||
necessarily all file types. The `import` and `info` modes consider all file
|
||||
types by default, although the `--include` and `--exclude` options constrain
|
||||
this behavior.
|
||||
|
||||
While the `--everything` option means all commits reachable from any
|
||||
ref will be considered for migration, after migration only local refs will
|
||||
be updated even when `--everything` is specified. This ensures remote
|
||||
refs stay synchronized with their remote. In other words, `refs/heads/foo`
|
||||
will be updated with the `--everything` option, but `refs/remotes/origin/foo`
|
||||
will not, so it stays in sync with the remote until `git push origin foo`
|
||||
is performed. After checking that the results of a migration with
|
||||
`--everything` are satisfactory, it may be convenient to push all local
|
||||
branches to your remotes by using the `--all` option to `git push`.
|
||||
|
||||
Unless the `--skip-fetch` option is given, `git lfs migrate` always
|
||||
begins by fetching updated lists of refs from all the remotes returned
|
||||
@ -369,8 +376,9 @@ commits F, E, D, C, and B, but exclude commit A:
|
||||
--exclude-ref=refs/remotes/origin/main
|
||||
....
|
||||
|
||||
The presence of flag `--everything` indicates that all local and remote
|
||||
references should be migrated.
|
||||
The presence of flag `--everything` indicates that all commits reachable
|
||||
from all local and remote references should be migrated (but note that
|
||||
the remote refs themselves will not be updated).
|
||||
|
||||
== EXAMPLES
|
||||
|
||||
@ -443,7 +451,7 @@ $ git lfs migrate import --everything --above=100Kb
|
||||
....
|
||||
|
||||
Note: This will require a force-push to any existing Git remotes. Using
|
||||
the `--all` option when force-pushing may be convenient if many refs
|
||||
the `--all` option when force-pushing may be convenient if many local refs
|
||||
were updated, e.g., after importing to Git LFS with the `--everything`
|
||||
option.
|
||||
|
||||
@ -490,7 +498,7 @@ $ git lfs migrate export --everything --include="*"
|
||||
....
|
||||
|
||||
Note: This will require a force-push to any existing Git remotes. Using
|
||||
the `--all` option when force-pushing may be convenient if many refs
|
||||
the `--all` option when force-pushing may be convenient if many local refs
|
||||
were updated, e.g., after exporting from Git LFS with the `--everything`
|
||||
option.
|
||||
|
||||
|
@ -967,6 +967,10 @@ func gitHandler(w http.ResponseWriter, r *http.Request) {
|
||||
fmt.Sprintf("CONTENT_TYPE=%s", r.Header.Get("Content-Type")),
|
||||
}
|
||||
|
||||
if vals := r.Header.Values("Git-Protocol"); len(vals) == 1 {
|
||||
cmd.Env = append(cmd.Env, fmt.Sprintf("GIT_PROTOCOL=%s", vals[0]))
|
||||
}
|
||||
|
||||
buffer := &bytes.Buffer{}
|
||||
cmd.Stdin = r.Body
|
||||
cmd.Stdout = buffer
|
||||
|
Loading…
Reference in New Issue
Block a user