libgit2sharp

Error encountered while cloning the remote repository with VS 2015 Update 3 (TFS 2015 Update 3)

旧巷老猫 提交于 2019-12-07 04:05:37
问题 I have recently upgraded to VS 2015 (Update 3) on the client side and TFS 2015 (Update 3) on server side. The Git operations worked for a while, then I started getting following error when trying to clone a git repo: Error encountered while cloning the remote repository: An error occurred while sending the request. Inner Exception: The remote server returned an error: (401) Unauthorized. Inner Exception: No credentials are available in the security package But I can navigate to repo in the

Is it possible to add parts of a file to Git index using libgit2?

99封情书 提交于 2019-12-06 16:24:20
I am using libgit2, actually libgit2sharp, is there a way to add parts of a file similar to what add -p in CLI? I don't find anything from the documentation: http://libgit2.github.com/libgit2/#HEAD/group/index This is neither implemented (yet) in libgit2 , nor in LibGit2Sharp . In order to make this happen sooner rather than later, I'd suggest you to open a feature request in the libgit2 tracker . 来源: https://stackoverflow.com/questions/9597663/is-it-possible-to-add-parts-of-a-file-to-git-index-using-libgit2

How to get files changed/removed/added using libgit2sharp?

陌路散爱 提交于 2019-12-06 04:28:17
I have two dates - from and to. I have to find the files changed in the repository between that date difference and make a list of it. Here is a related question which gets the differece between trees. Get files modified/added/removed from a commit in LibGit2Sharp . So lets assume you are trying to replicate: git log --reverse --since "11/10/2015" --until="11/15/2015" --format="%cD %s" Once you have a list of commits, ICommitLog , via all the repo's Commits , a filtered branch list, etc.. you can filter via Linq. So create your commit list: var repo = new Repository ("/Users/sushi/code

Find out the branch a commit belongs to in LibGit2Sharp?

半城伤御伤魂 提交于 2019-12-05 16:43:56
I am looping through commits in LibGit2Sharp : Repository repo = new Repository("Z:/www/gg"); foreach (LibGit2Sharp.Commit commit in repo.Commits) { ... } I can retrieve properties like Author and Message , but I do not see anything about what branch it belongs to? Ideally I would like to have a pointer to the branch object, but even a name would be fine in this scenario. This is what the debugger shows up: This is what I am looking for: TortoiseGit's behavior of showing the most relevant branch name: Example repository: https://docs.google.com/open?id=0B-3

Get changes between a commit and its parent with libgit2sharp

♀尐吖头ヾ 提交于 2019-12-04 20:26:08
问题 I am working with libgit2sharp (a C# wrapper for libgit2) and have been running into issues because it doesnt have a lot of the functionality I am hoping for (hopefully I can contribute to it soon; this seems like a really useful project) The thing I am trying to do right now is get a list of the files changed from a particular commit and its parent. I will not try to figure out what has changed between a merge and its two parents. I am more interested in regular commits. These guys (https:/

LibGit2Sharp how to resolve a conflict?

非 Y 不嫁゛ 提交于 2019-12-04 03:33:15
问题 Using libgit2sharp I am merging changes from two users: public void Merge(string branchName) { using (Repository repo = new Repository(this._settings.Directory)) { var branch = repo.Branches[branchName]; MergeOptions opts = new MergeOptions() { FileConflictStrategy = CheckoutFileConflictStrategy.Merge }; repo.Merge(branch, this._signature, opts); if (repo.Index.Conflicts.Count() > 0) { //TODO: resolve conflicts } } } Even if the strategy is set to merge the conflics still appear. I found no

LibGit2Sharp and TFS Git repository

三世轮回 提交于 2019-12-04 02:36:40
问题 I have cloned: https://github.com/libgit2/libgit2sharp which as I understand is the git client used in TFS 2015. I am trying to run the test: public void CanCloneFromBBWithCredentials(string url, string user, string pass, bool secure) In: https://github.com/libgit2/libgit2sharp/blob/vNext/LibGit2Sharp.Tests/CloneFixture.cs Where I have updated it to use a Git repository I have in TFS: [Theory] //[InlineData("https://libgit2@bitbucket.org/libgit2/testgitrepository.git", "libgit3", "libgit3",

Get changes between a commit and its parent with libgit2sharp

試著忘記壹切 提交于 2019-12-03 12:47:21
I am working with libgit2sharp (a C# wrapper for libgit2) and have been running into issues because it doesnt have a lot of the functionality I am hoping for (hopefully I can contribute to it soon; this seems like a really useful project) The thing I am trying to do right now is get a list of the files changed from a particular commit and its parent. I will not try to figure out what has changed between a merge and its two parents. I am more interested in regular commits. These guys (https://github.com/libgit2/libgit2sharp/issues/89) are working on something similar. I think their procedure is

Git repository internal format explained

女生的网名这么多〃 提交于 2019-12-03 09:08:59
问题 Is there any documentation on how Git stores files in his repository? I'm try to search over the Internet, but no usable results. Maybe I'm using incorrect query or maybe this is great secret — Git repository internal format? Let me explain, why I need this rocket science information: I'm using C# to get file history form repository. But in libgit2sharp library it's not implemented currently. So (as a responsible person ;) I need to implement this feature by myself and contribute to community

Work with libgit2sharp to retrieve only the latest revision of a specific branch

半城伤御伤魂 提交于 2019-12-02 13:21:48
问题 Consider the following scenario: Some content (e.g. a web-site) is under git repository having several branches like master (for dev), qa and prod. A .net application (e.g. some cloud service) needs to have always the latest version of one specific branch (e.g. prod). There is no need to fetch full repository, only HEAD of this branch (git clone -b <branch> --depth=1 <remote_repo_url> --single-branch) and perform consequent updates. How would you implement such scenario with libgit2sharp