mirror of
https://github.com/facebook/sapling.git
synced 2024-10-07 23:38:50 +03:00
update gitrepo.commit() to return the new commit ID
Summary: This makes gitrepo.commit() return the new commit ID as a hexadecimal string, just like hgrepo.commit() currently does. Reviewed By: wez Differential Revision: D7341605 fbshipit-source-id: 83ebddb8c23d5e4650432bea6f8dcb8d18c0ff38
This commit is contained in:
parent
8f0e976661
commit
f54e89b43c
@ -105,7 +105,7 @@ class GitRepository(repobase.Repository):
|
||||
committer_email: Optional[str] = None,
|
||||
committer_date: Optional[datetime.datetime] = None,
|
||||
amend: bool = False
|
||||
) -> None:
|
||||
) -> str:
|
||||
if author_name is None:
|
||||
author_name = self.author_name
|
||||
if author_email is None:
|
||||
@ -144,3 +144,6 @@ class GitRepository(repobase.Repository):
|
||||
if amend:
|
||||
args.append('--amend')
|
||||
self.git(*args, env=git_commit_env)
|
||||
|
||||
# Get the commit ID and return it
|
||||
return self.git('rev-parse', 'HEAD').strip()
|
||||
|
Loading…
Reference in New Issue
Block a user