mirror of
https://github.com/desktop/desktop
synced 2024-09-20 00:21:23 +00:00
fallback to parsing the packed-refs file
This commit is contained in:
parent
4ae8ea2d1b
commit
082c3b95e4
|
@ -44,6 +44,11 @@ function revParse(gitDir, ref) {
|
|||
// eslint-disable-next-line no-sync
|
||||
fs.statSync(refPath)
|
||||
} catch (err) {
|
||||
const packedRefMatch = packedRefsParse(gitDir, ref)
|
||||
if (packedRefMatch) {
|
||||
return packedRefMatch
|
||||
}
|
||||
|
||||
throw new Error(
|
||||
`Could not de-reference HEAD to SHA, ref does not exist on disk: ${refPath}`
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue