mirror of
https://github.com/actions/checkout.git
synced 2025-07-12 08:40:45 +00:00
log commit sha as well
This commit is contained in:
parent
0e8d9f459e
commit
8940ec9519
3 changed files with 15 additions and 8 deletions
|
@ -31,7 +31,7 @@ export interface IGitCommandManager {
|
|||
isDetached(): Promise<boolean>
|
||||
lfsFetch(ref: string): Promise<void>
|
||||
lfsInstall(): Promise<void>
|
||||
log1(): Promise<string>
|
||||
log1(format?: string): Promise<string>
|
||||
remoteAdd(remoteName: string, remoteUrl: string): Promise<void>
|
||||
removeEnvironmentVariable(name: string): void
|
||||
revParse(ref: string): Promise<string>
|
||||
|
@ -254,8 +254,9 @@ class GitCommandManager {
|
|||
await this.execGit(['lfs', 'install', '--local'])
|
||||
}
|
||||
|
||||
async log1(): Promise<string> {
|
||||
const output = await this.execGit(['log', '-1'], false, true)
|
||||
async log1(format?: string): Promise<string> {
|
||||
var args = format ? ['log', '-1', format] : ['log', '-1']
|
||||
const output = await this.execGit(args, false, true)
|
||||
return output.stdout
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue