mirror of
https://github.com/harness/drone.git
synced 2025-05-04 10:10:14 +08:00
[GIT] fix output for getting single commit without parents (#1060)
This commit is contained in:
parent
aae15eb5a5
commit
1d74fcde4c
@ -616,7 +616,10 @@ func GetCommit(
|
|||||||
}
|
}
|
||||||
|
|
||||||
sha := commitData[0]
|
sha := commitData[0]
|
||||||
parentSHAs := strings.Split(commitData[1], " ")
|
var parentSHAs []string
|
||||||
|
if commitData[1] != "" {
|
||||||
|
parentSHAs = strings.Split(commitData[1], " ")
|
||||||
|
}
|
||||||
authorName := commitData[2]
|
authorName := commitData[2]
|
||||||
authorEmail := commitData[3]
|
authorEmail := commitData[3]
|
||||||
authorTimestamp := commitData[4]
|
authorTimestamp := commitData[4]
|
||||||
|
Loading…
Reference in New Issue
Block a user