Comments (1)
First, nothing will work if GitFetch
doesn't work. I.e., the transport protocol needs to be functioning. So, before you read anything else, ensure that the fully documented and supported GitFetch
works. Unfortunately, GitLink doesn't support the full range of transport protocols, and doing so is a lot of detailed fiddly work that's not likely to be done by me anytime soon. I've implemented the protocols I need (in true, open source fashion
The reason GitPush
isn't documented is because right now the only acceptable form is a modestly user-hostile form used internally by git, and I wasn't eager to document that. But it works, and we've used it plenty internally at Wolfram. The syntax is GitPush[repo_GitRepo, remote_String, refspec_String]
. Which seems simple enough. Except that most of the things you think might work for refspec
don't.
See the documentation for refspec
here (second item under the Options heading). There are limitations on what can be used...some I remember for sure and some may or may not be limitations...I can't recall for certain what's supported by the current libgit2 git_remote_upload
function:
- Inferencing of the
refs/heads/
namespace is not supported; you absolutely must include that explicitly for source and destination - I don't recall, but I think that it doesn't auto-detect the upstream branch, and so you must use the
source:dest
form of the refspec to explicitly specify source branch (in your local repo) and the destination branch (in the remote repo) - There's no force option, so you must use
+
if you want to force push - I honestly don't think I've ever tried pushing tags; it's unclear to me whether just using a refspec in the
refs/tags/
namespace would work or not.
Since I originally wrote this, libgit2 added a git_remote_push()
function (yes, this was originally written so long ago that libgit2 didn't even have a properly codified push). It's unclear to me whether reimplementing this with git_remote_push()
would do all of the expected refspec inferencing/upstream detection/etc., or whether I'll have to replicate that logic in GitLink.
If you want to see examples that work, check out the GitPush tests in Push.wl. These tests do work, except that they refer to a remote that you won't have access to.
In summary, it does work...with limitations and user hostility that I'll acknowledge. None of these is a bug. But there are certainly features that could be improved here.
from gitlink.
Related Issues (13)
- Unable to open repo on Linux64 HOT 3
- Documentation not compatible with M11.0 or earlier HOT 1
- Marked as compatible with M10.1 but uses M10.2 symbols HOT 2
- Getting a new release
- GitLink won't show up in list of installed add-ons HOT 2
- git archive functionality
- support for ranges HOT 5
- GitAdd has troubles with new directories
- Usage of CommitterSignature and AuthorSignature HOT 2
- GitInit[]
- Feature request: notebook diff tool HOT 2
- Does not work with M10.3 on OS X HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gitlink.