mirror of
https://github.com/sourcebot-dev/sourcebot.git
synced 2025-12-12 12:25:22 +00:00
fix(backend): Explicitly set refspec on fetch (#497)
This commit is contained in:
parent
2309b67999
commit
b05fc7a0c8
2 changed files with 4 additions and 4 deletions
|
|
@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||||
|
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
- Fixed "couldn't find remote ref HEAD" errors when re-indexing certain repositories. [#497](https://github.com/sourcebot-dev/sourcebot/pull/497)
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
- Disable page scroll when using arrow keys on search suggestions box. [#493](https://github.com/sourcebot-dev/sourcebot/pull/493)
|
- Disable page scroll when using arrow keys on search suggestions box. [#493](https://github.com/sourcebot-dev/sourcebot/pull/493)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -27,10 +27,6 @@ export const cloneRepository = async (
|
||||||
);
|
);
|
||||||
|
|
||||||
await unsetGitConfig(path, ["remote.origin.url"]);
|
await unsetGitConfig(path, ["remote.origin.url"]);
|
||||||
|
|
||||||
await git.cwd({
|
|
||||||
path,
|
|
||||||
}).addConfig("remote.origin.fetch", "+refs/heads/*:refs/heads/*");
|
|
||||||
} catch (error: unknown) {
|
} catch (error: unknown) {
|
||||||
const baseLog = `Failed to clone repository: ${path}`;
|
const baseLog = `Failed to clone repository: ${path}`;
|
||||||
|
|
||||||
|
|
@ -59,6 +55,7 @@ export const fetchRepository = async (
|
||||||
|
|
||||||
await git.fetch([
|
await git.fetch([
|
||||||
remoteUrl.toString(),
|
remoteUrl.toString(),
|
||||||
|
"+refs/heads/*:refs/heads/*",
|
||||||
"--prune",
|
"--prune",
|
||||||
"--progress"
|
"--progress"
|
||||||
]);
|
]);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue