Files
git-tfs/GitTfs/Core/IGitRepository.cs
T
Philippe Miossec e956d1d340 Expose a BatchSize option...
Since 21f36fa47c, tfs changesets are
 fetched by batches of 100 changesets (instead of all at once)
 to better support big history when cloning (and use less memory).

This option let the user specify the size of the batch
(because perhaps even 100 is too big for some big repositories).

Values accepted:
x < 0 => Only one batch with ALL the changesets
x == 0 => default value of 100
x > 0 => batches of x changesets
2014-10-02 13:42:41 +02:00

58 lines
3.0 KiB
C#

using System;
using System.Collections.Generic;
using LibGit2Sharp;
using Branch = LibGit2Sharp.Branch;
namespace Sep.Git.Tfs.Core
{
public interface IGitRepository : IGitHelpers
{
string GitDir { get; set; }
string GetConfig(string key);
T GetConfig<T>(string key);
void SetConfig(string key, string value);
IEnumerable<IGitTfsRemote> ReadAllTfsRemotes();
IGitTfsRemote ReadTfsRemote(string remoteId);
IGitTfsRemote CreateTfsRemote(RemoteInfo remoteInfo, string autocrlf = null, string ignorecase = null);
void DeleteTfsRemote(IGitTfsRemote remoteId);
IEnumerable<string> GetGitRemoteBranches(string gitRemote);
bool HasRemote(string remoteId);
bool HasRef(string gitRef);
GitCommit Commit(LogEntry logEntry);
void UpdateRef(string gitRefName, string commitSha, string message = null);
void MoveTfsRefForwardIfNeeded(IGitTfsRemote remote);
IEnumerable<TfsChangesetInfo> GetLastParentTfsCommits(string head);
TfsChangesetInfo GetTfsChangesetById(string remoteRef, long changesetId);
TfsChangesetInfo GetTfsCommit(string sha);
TfsChangesetInfo GetCurrentTfsCommit();
IDictionary<string, GitObject> CreateObjectsDictionary();
IDictionary<string, GitObject> GetObjects(string commit);
IDictionary<string, GitObject> GetObjects(string commit, IDictionary<string, GitObject> initialTree);
IGitTreeBuilder GetTreeBuilder(string commit);
IEnumerable<IGitChangedFile> GetChangedFiles(string from, string to);
bool WorkingCopyHasUnstagedOrUncommitedChanges { get; }
void CopyBlob(string sha, string outputFile);
GitCommit GetCommit(string commitish);
MergeResult Merge(string commitish);
string GetCurrentCommit();
string GetCommitMessage(string head, string parentCommitish);
string AssertValidBranchName(string gitBranchName);
bool CreateBranch(string gitBranchName, string target);
Branch RenameBranch(string oldName, string newName);
string FindCommitHashByChangesetId(long changesetId);
void CreateTag(string name, string sha, string comment, string Owner, string emailOwner, System.DateTime creationDate);
void CreateNote(string sha, string content, string owner, string emailOwner, DateTime creationDate);
void MoveRemote(string oldRemoteName, string newRemoteName);
void ResetHard(string sha);
bool IsBare { get; }
/// Gets all configured "subtree" remotes which point to the same Tfs URL as the given remote.
/// If the given remote is itself a subtree, an empty enumerable is returned.
/// </summary>
IEnumerable<IGitTfsRemote> GetSubtrees(IGitTfsRemote owner);
void ResetRemote(IGitTfsRemote remoteToReset, string target);
string GetCurrentBranch();
void GarbageCollect(bool auto = false, string additionalMessage = null);
bool Checkout(string commitish);
}
}