libgit2

How to push git repository through ssh using git2r?

天大地大妈咪最大 提交于 2021-02-19 23:54:29
问题 I'm trying to use git2r package (version 0.21.0). I always use ssh connexions in my projects (GitHub and GitLab hosted): I can do git pull/push with both RStudio IDE and command line. I have a standard Ubuntu Xenial configuration; my keys are stored in ~/.ssh with standard names, my ssh-agent is running, and keys were added to ssh-agent . My problem is how to use the git2r package to push with ssh ? Here's what I do with a very basic workflow (work on master , remote name is origin ): library

How to push git repository through ssh using git2r?

爱⌒轻易说出口 提交于 2021-02-19 23:51:08
问题 I'm trying to use git2r package (version 0.21.0). I always use ssh connexions in my projects (GitHub and GitLab hosted): I can do git pull/push with both RStudio IDE and command line. I have a standard Ubuntu Xenial configuration; my keys are stored in ~/.ssh with standard names, my ssh-agent is running, and keys were added to ssh-agent . My problem is how to use the git2r package to push with ssh ? Here's what I do with a very basic workflow (work on master , remote name is origin ): library

Configuration failed to find libgit2 library

江枫思渺然 提交于 2021-02-19 07:34:19
问题 When attempting to install the R devtools package (on Linux Mint, 19.3 & R 4.0.2),I receive this error. In the ANTICONF section the message offers some suggestions for what I should do, but being new to Linux I don't understand how to implement the instructions, and my search of the internet has not yielded fruit. Could someone offer guidance on the commands/steps I need to take to install libgit2 or resolve this issue? > install.packages("devtools") Installing package into ‘/home/xilliam/R

How is “git pull” done with the git2-rs Rust crate?

ぃ、小莉子 提交于 2021-02-08 15:16:39
问题 I'm using git2-rs to implement some standard git functionality in a Rust application. I've been reading up on git internals and understand that at a high level "git pull" is a "git fetch" followed by a "git merge", but am still having trouble understanding how to make it work with git2-rs. There is a discussion on an issue here where it's agreed that a git2-rs "git pull" example would be nice, but one was never created. There is an example of doing a hard reset in that discussion, but I want

How is “git pull” done with the git2-rs Rust crate?

回眸只為那壹抹淺笑 提交于 2021-02-08 15:13:05
问题 I'm using git2-rs to implement some standard git functionality in a Rust application. I've been reading up on git internals and understand that at a high level "git pull" is a "git fetch" followed by a "git merge", but am still having trouble understanding how to make it work with git2-rs. There is a discussion on an issue here where it's agreed that a git2-rs "git pull" example would be nice, but one was never created. There is an example of doing a hard reset in that discussion, but I want

Why does git_treebuilder_insert fail for invalid objects?

依然范特西╮ 提交于 2021-01-28 07:56:55
问题 The documention for git_treebuilder_insert seems to imply that it doesn't care whether the object being inserted is valid: No attempt is being made to ensure that the provided oid points to an existing git object in the object database, nor that the attributes make sense regarding the type of the pointed at object. However, when actually using the library to create tree objects, if I try to write an entry with an invalid oid, this function returns failure. As reference, here's the code: if

How to “unstage” a file with Objective-Git (libgit2)?

倖福魔咒の 提交于 2020-01-17 03:17:25
问题 I am writing an app that allows performing basic git operations using Objective-Git, but I am having trouble figuring out how to "unstage" a file. More specifically, I have a file with changes that have previously been added to the current GTIndex and I now want to discard those changes (without losing the file's current state on disk). Here is a rough outline of the relevant logic my program currently follows when toggling the "staged" state of a file: - Fetch current GTIndex using

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

喜夏-厌秋 提交于 2020-01-13 20:36:26
问题 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. 回答1: 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..

Find out the branch a commit belongs to in LibGit2Sharp?

随声附和 提交于 2020-01-13 12:27:43
问题 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