mirror of
https://github.com/collinbarrett/FilterLists.git
synced 2026-03-11 09:04:27 +00:00
fix(archival): 🐛 log and swallow EmptyCommitExceptions
This commit is contained in:
parent
8247982aef
commit
ff43b3facf
1 changed files with 8 additions and 1 deletions
|
|
@ -77,7 +77,14 @@ public void Commit()
|
|||
var signature = new Signature(_options.UserName, _options.UserEmail, DateTime.UtcNow);
|
||||
var message = $"feat(archives): archive {fileNames.Count} file(s){Environment.NewLine}{string.Join(Environment.NewLine, fileNames)}";
|
||||
Commands.Stage(_repo, fileNames);
|
||||
_repo.Commit(message, signature, signature);
|
||||
try
|
||||
{
|
||||
_repo.Commit(message, signature, signature);
|
||||
}
|
||||
catch (EmptyCommitException ex)
|
||||
{
|
||||
_logger.LogInformation(ex, "No changes to commit for {@FileNames}", fileNames);
|
||||
}
|
||||
|
||||
_logger.LogInformation("Committed {@FileNames}", fileNames);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue