Load author file during rcheckin
...because there is fetch of commit even during rcheckin command
This commit is contained in:
@@ -19,18 +19,20 @@ namespace Sep.Git.Tfs.Commands
|
||||
private readonly CommitSpecificCheckinOptionsFactory _checkinOptionsFactory;
|
||||
private readonly TfsWriter _writer;
|
||||
private readonly Globals _globals;
|
||||
private readonly AuthorsFile _authors;
|
||||
|
||||
private bool Quick { get; set; }
|
||||
private bool AutoRebase { get; set; }
|
||||
private bool ForceCheckin { get; set; }
|
||||
|
||||
public Rcheckin(TextWriter stdout, CheckinOptions checkinOptions, TfsWriter writer, Globals globals)
|
||||
public Rcheckin(TextWriter stdout, CheckinOptions checkinOptions, TfsWriter writer, Globals globals, AuthorsFile authors)
|
||||
{
|
||||
_stdout = stdout;
|
||||
_checkinOptions = checkinOptions;
|
||||
_checkinOptionsFactory = new CommitSpecificCheckinOptionsFactory(_stdout, globals);
|
||||
_writer = writer;
|
||||
_globals = globals;
|
||||
_authors = authors;
|
||||
}
|
||||
|
||||
public OptionSet OptionSet
|
||||
@@ -53,6 +55,8 @@ namespace Sep.Git.Tfs.Commands
|
||||
if (_globals.Repository.IsBare)
|
||||
throw new GitTfsException("error: you should specify the local branch to checkin for a bare repository.");
|
||||
|
||||
_authors.Parse(null, _globals.GitDir);
|
||||
|
||||
return _writer.Write("HEAD", PerformRCheckin);
|
||||
}
|
||||
|
||||
@@ -62,6 +66,8 @@ namespace Sep.Git.Tfs.Commands
|
||||
if (!_globals.Repository.IsBare)
|
||||
throw new GitTfsException("error: This syntax with one parameter is only allowed in bare repository.");
|
||||
|
||||
_authors.Parse(null, _globals.GitDir);
|
||||
|
||||
return _writer.Write(GitRepository.ShortToLocalName(localBranch), PerformRCheckin);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user