summaryrefslogtreecommitdiffstats
path: root/git-access.c
AgeCommit message (Collapse)Author
2015-05-31Add strndup.h header so we can use this useful functionGravatar Dirk Hohndel
It's missing on Windows... we had this helper in liquivision.c but since I used the function in git-access.c I figured I should just turn it into a little helper. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-31Cloud storage: first stab at implementing cloud storageGravatar Dirk Hohndel
So far there is no mechanism to actually create a repository on the server, so this only works with the two test repositories. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-31Cloud storage: rethink the terminology usedGravatar Dirk Hohndel
Cloud storage makes more sense that remote storage - at least I assume that more people are used to thinking about "storing things in the cloud". Don't use PIN or passphrase, call it a password everywhere. Don't use copy_string() to copy the password - the git credentials routine asserts that password is not NULL, so make sure we at least have a pointer to an empty string here. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-31Cloud storage: add support for https based remoteGravatar Dirk Hohndel
This will make it easier to access the remote storage. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-28Remote storage: second attempt to fix build with older libgit2Gravatar Dirk Hohndel
That was embarrassing... Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-28Remote storage: turns out you need a newer libgit2Gravatar Dirk Hohndel
I was afraid that this would only work with a farily current git master of libgit2 and it turns out I was right. The API was available, but the correct type wasn't. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-28Remote storage: provide credentials for ssh based remotesGravatar Dirk Hohndel
The key location is hard coded as this is only intended for our own infrastructure, so we don't need multiple keys. If the private key is protected by a passphrase, this needs to be manually added to the preferences. As RemoteStorage->passphrase. This has only be tested with a current version of libgit2 master, but should compile with any previous version (the API doesn't exist in v0.19 and earlier - that's handled with appropriate #if clauses). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-28Add USE_LIBGIT23_API as cmake optionGravatar Dirk Hohndel
Just as we would expect, the libgit2 developers of course once again broke their API. In order to compile against current master we need to remap those APIs once again. Simply call cmake with -DUSE_LIBGIT23_API Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-28Fix parsing of git branch encoded in file nameGravatar Dirk Hohndel
If the folder has a trailing '/' we picked the wrong substring as branch name. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-24Fix Ubuntu compilation error.Gravatar Patrick Valsecchi
Ubuntu has git minor version 20 which has less parameters in git-remote-fetch. From ac9516984e4fbc787635b0dfd76649c8e43fab83 Mon Sep 17 00:00:00 2001 From: Patrick Valsecchi <patrick@thus.ch> Date: Tue, 24 Feb 2015 08:45:21 +0100 Subject: [PATCH 2/2] Fix Ubuntu compilation error. Ubuntu has git minor version 20 which has less parameters in git-remote-fetch. Signed-off-by: Patrick Valsecchi <patrick@thus.ch> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-15Remove unnecessary use of non-portable 'mkdir()'Gravatar Linus Torvalds
This fixes the problem with Windows being the usual non-POSIX PoS that it is.. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-15Start parsing remote git repository addressesGravatar Linus Torvalds
This doesn't really usefully work, but I'm committing it to have git diff and history. It also insanely hardcodes the git-repo cache directory, because right now it's purely useful for development. The big missing pieces are: - progress information - credential callbacks not implemented where the first one makes the user interface horrible (long delays with nothing visibly going on), and the second one makes ssh logins etc not work. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-15git-access: use the new format_string helpersGravatar Linus Torvalds
It may be a bit less efficient to use a printf-style interface rather than the explicit malloc and memcpy, but the code ends up simpler and more readable. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-15Start splitting out git repo helper routinesGravatar Linus Torvalds
This doesn't actually change any code, but it moves the 'is_git_repo()' function that is used by both loading and saving into a new git-access.c file. This is where I'll start doing remote repo syncing too. Knock wood. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>