| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Try the xUnit runner extension. |
Sorry, something went wrong.
There was a problem hiding this comment.
use_gitLink can be bool.
Sorry, something went wrong.
|
I've made all the changes but the Clone. Clone requires that there's no repository but when you add as submodule you have an empty one. I've added the optional parameters exposed by fetch and checkout, so now you can control Tags, Progress, Credentials, etc... |
Sorry, something went wrong.
|
@olmobrutall Hey! That looks like a nice addition to this project. Indeed, the submodule area need a bit of love. Thanks a lot for helping us with it! Just a few thoughts.
/cc @dahlbyk |
Sorry, something went wrong.
|
Hi @nulltoken,
I think the API could be improved by:
Congratulations for this nicely designed piece of work, maps perfectly with Git concepts, to the point that is maybe a better way to introduce C# programmers to git without all the bash woodoo. |
Sorry, something went wrong.
There would be a (convoluted) way to do this by retrieving the tips of the repository to submodule (through something similar to repo.Network.ListReferences()) and inserting in the index a submodule entry pointing to the Sha of one of the retrieved tips. But, you're very right, that wouldn't work if one's willing to point at a specific commit (or even use a revparse expression). Even if dislike this a bit, we'll have no choice than mimicking git.git process.
I like not having to combine the working directory path with the submodule location by hand, but I'm unsure about adding another way to instanciate a Repository? Could you please open a feature request so that we can discuss about this in a dedicated thread?
I'm not sure to follow you. Did you succeed in making it work? Do you encounter an issue but pushed the requested changes whatsoever? Could you please elaborate a bit on this, please?
❤️ Thanks, but I don't deserve this. It's been a team work. Nothing would have been possible without all the awesome contributions of these people. |
Sorry, something went wrong.
There was a problem hiding this comment.
This is init-ing an empty repo at path, but at L57 here, you're attempting to clone into that directory. In order to clone into a directory, it must be empty.
Sorry, something went wrong.
Check my comment here: https://github.com/libgit2/libgit2sharp/pull/482/files#r7454934 |
Sorry, something went wrong.
|
Happy to take this up and finish the implementation. How do I get this patch into my own repo? |
Sorry, something went wrong.
@pms1969 Add https://github.com/olmobrutall/libgit2sharp.git as a new remote of your repo, then fetch from it. |
Sorry, something went wrong.
|
@pms1969 Some more gory details
|
Sorry, something went wrong.
|
You're a champ.Thanks. I'll see what I can manage. |
Sorry, something went wrong.
|
I'm getting the following 2 errors when trying to compile..... Should I be using the "Lax" or "Strict" versions? Error 1 The type or namespace name 'Utf8Marshaler' could not be found (are you missing a using directive or an assembly reference?) C:\Development\libgit2sharp\LibGit2Sharp\Core\NativeMethods.cs 1294 122 LibGit2Sharp |
Sorry, something went wrong.
|
Hmmm. It'll be hard to troubleshoot those errors without peeking at the code, could you please push it in a branch an open a PR? Regarding the Lax/Strict Marshalers, we use them as follows:
|
Sorry, something went wrong.
|
I had set them to Lax, but I think I may need to set them to Strict. It compiles now, but alas, I am at work. I plan to get the unit testing working on the way home, and set up a test or 2. Then I'll push and open a pull request. (might be next week now tho, since Easter is going to get in the way of anything productive). |
Sorry, something went wrong.
|
What branch should I push it too? any name do? |
Sorry, something went wrong.
The branch name doesn't matter much (we tend to use something that identifies the feature eg. submodule_add). It's only a way to keep your work isolated from vNext and master. Thus, when some more commits are added upstream on those branches, it's easier for you to rebase your work onto them. |
Sorry, something went wrong.
|
I wouldn't mind taking this over as I need this functionality for a project I'm working on converting from another source control provider to git. I just have one issue that I'm not sure about. I can't find in the libgit2 api how you can add a submodule specifying a name that is different than the path: GIT_EXTERN(int) git_submodule_add_setup(
git_submodule **out,
git_repository *repo,
const char *url,
const char *path,
int use_gitlink);
Does it make sense then for SubmoduleCollection.Add() to only take the path and not the name then? The submodule ends up getting named whatever the relative path is. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
This is my first pull request. I've created an Add method to Submodules. I haven't been able to run xUnit on VS so there's no test.
Feel free to change it.