Skip to content

Commit 75d7f1e

Browse files
authored
Merge pull request #2982 from git-lfs/git-include-sha1-in-ref-parse
git: include SHA1 in ref-less revisions
2 parents 41794df + 568a0ca commit 75d7f1e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

git/git.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,8 @@ func ResolveRef(ref string) (*Ref, error) {
245245

246246
if len(lines) == 1 {
247247
// ref is a sha1 and has no symbolic-full-name
248-
fullref.Name = lines[0] // fullref.Sha
248+
fullref.Name = lines[0]
249+
fullref.Sha = lines[0]
249250
fullref.Type = RefTypeOther
250251
return fullref, nil
251252
}

0 commit comments

Comments
 (0)