Commit Graph

209 Commits

Author SHA1 Message Date
Carlos Martín Nieto 605f942e94 Merge pull request #66 from jezell/branch-iterator
Add branch iterator
2014-04-26 20:25:26 +02:00
Carlos Martín Nieto 3cf0b6db80 Merge pull request #80 from jezell/oid-parse-protection
make it possible to handle errors
2014-04-26 20:24:11 +02:00
Carlos Martín Nieto dca2192492 Merge pull request #81 from jezell/remote-set-callbacks
add remote functions to set callbacks / set cert check
2014-04-26 20:22:44 +02:00
Carlos Martín Nieto b3a160b0f8 Adjust to libgit2 dev changes
This fixes #87
2014-04-26 18:43:22 +02:00
Jesse Ezell 7cf6b4f082 add set callbacks / set cert check 2014-04-04 09:51:46 -07:00
Jesse Ezell a7d3c5955a merge with improved error handling logic 2014-04-04 00:56:58 -07:00
Jesse Ezell fc999289a2 Merge branch 'oid-parse-protection' into branch-iterator 2014-04-04 00:50:41 -07:00
Jesse Ezell 39f59d921b fix typo / return name iterator 2014-04-04 00:27:07 -07:00
Jesse Ezell 8319a792f3 Merge remote-tracking branch 'libgit/master' into branch-iterator 2014-04-04 00:26:22 -07:00
Jesse Ezell 8982f4b3be adjust comments on error messages to standard godoc style 2014-04-04 00:14:31 -07:00
Jesse Ezell b660db0a4b make it possible to handle errors 2014-04-02 10:31:48 -07:00
Carlos Martín Nieto 9cd1d129bc Remote: The whole point of the anonymous change
Was that it would break and we'd remember that the order changed. Oh
well.
2014-04-01 20:10:20 +02:00
Carlos Martín Nieto c8ff10933b Merge pull request #77 from jezell/inmemory-to-anon
rename inmemory to anonymous remote
2014-04-01 20:07:58 +02:00
Jesse Ezell 9d0d814f19 rename inmemory to anonymous remote 2014-04-01 11:06:47 -07:00
Carlos Martín Nieto fa41ce8575 Merge pull request #73 from libgit2/cmn/settings
Add a settings package
2014-04-01 12:43:28 +02:00
Carlos Martín Nieto 1b4962cafe Merge pull request #75 from jezell/add-conflict-to-index
Add index conflict functions
2014-04-01 12:43:07 +02:00
Carlos Martín Nieto a06f4a030a Adjust to Go tip changes
It does not like breaking aliasing rules, so let's keep a casted pointer
for when libgit2 wants that.
2014-04-01 12:36:44 +02:00
Carlos Martín Nieto 286ff62b14 Merge pull request #76 from jezell/walk-enhancements
Add missing walk functions
2014-04-01 12:00:20 +02:00
Carlos Martín Nieto 5adb756c48 Merge pull request #74 from fd/master
Added force argument for (*Submodule).Reload() and (*Repository).ReloadAllSubmodules()
2014-03-31 17:08:00 +02:00
Jesse Ezell dcdf2c3555 add conflict functions 2014-03-30 19:53:07 -07:00
Jesse Ezell 552557ba51 add missing walk functions 2014-03-30 13:23:03 -07:00
Simon Menke 429408dbe5 Added force argument for (*Submodule).Reload() and (*Repository).ReloadAllSubmodules() 2014-03-27 11:32:22 +01:00
Carlos Martín Nieto b2a2a279d9 Add a settings package
This lets us modify the libgit2-wide options/settings.
2014-03-25 09:27:05 +01:00
Carlos Martín Nieto 2811845a12 Merge pull request #71 from jezell/add-index-write-tree-to
Add index WriteTreeTo + test
2014-03-21 05:29:57 +01:00
Carlos Martín Nieto b869775665 Merge pull request #70 from jezell/add-remote-list
Add git_remote_list + test
2014-03-21 05:29:05 +01:00
Jesse Ezell 1f3f8adda8 Add index WriteTreeTo + test 2014-03-20 20:49:05 -07:00
Jesse Ezell 5d8db7f936 return nil instead of empty array on error 2014-03-20 20:32:23 -07:00
Jesse Ezell 99d7f66477 add remote list 2014-03-20 20:32:15 -07:00
Jesse Ezell 5590078e6f remove channel based iteration for branch / ref. Add ReferenceNameIterator. All iterators use Next(). Remove interfaces. 2014-03-20 20:28:41 -07:00
Jesse Ezell 37b950bc90 various improvements to interface 2014-03-19 20:24:19 -07:00
Carlos Martín Nieto 574f0dd12d Remote: remove Get prefix from refspecs
Idiomatic Go is to omit the Get from the getter methods.
2014-03-20 03:29:54 +01:00
Jesse Ezell 27bea93efe split out name iterator 2014-03-19 00:36:00 -07:00
Jesse Ezell 006286edb7 remove Branch struct, unify reference iterators 2014-03-19 00:19:02 -07:00
Carlos Martín Nieto 3ae9813fca Clean up after the tests 2014-03-19 08:15:19 +01:00
Carlos Martín Nieto ad128bdefb Remote: don't mix allocators
We cannot ask libgit2 to free the memory we have allocated ourselves, as
it cannot know how to do it. Let's free the strarray ourselves.
2014-03-19 08:15:18 +01:00
Carlos Martín Nieto 3274d477c9 Merge pull request #68 from libgit2/cmn/oid-revamp
Oid revamp
2014-03-19 07:20:45 +01:00
Carlos Martín Nieto b82a72a9ce Oid: fix IsZero()
We need to compare against the number zero, not its ASCII value.
2014-03-19 03:58:02 +01:00
Carlos Martín Nieto 0bb73e43a8 Oid: use Go's conversion functions
Go already has all the necessary pieces for encoding and decoding hex
strings. Using them let's us avoid going into C land.

Benchmarks show this takes about half the time as using libgit2's
functions.
2014-03-19 03:57:36 +01:00
Carlos Martín Nieto c243c31f7d Oid: remove Bytes()
This is not needed. We can do id[:] to get a slice.
2014-03-19 03:56:50 +01:00
Carlos Martín Nieto c9c7c1e779 Oid: make NewOid take a string
This is the most common way of having an id that's not in Oid form, so
let's make it the "default" and rename to NewOidFromBytes() the one that
takes []byte.
2014-03-19 03:56:50 +01:00
Carlos Martín Nieto b6703d4767 Oid: make the type directly [20]byte
There is no need for a struct with a single field. An Oid is 20 bytes
which hold the binary representation of the hash, so let's use that
directly. Go lets us have methods on this new type just the same.
2014-03-19 03:56:50 +01:00
Carlos Martín Nieto b5ce60925e Merge pull request #69 from jezell/clone_opts_init_fix
Clone opts init fix
2014-03-19 03:56:38 +01:00
Jesse Ezell f1f0fa7335 fix naming on test 2014-03-18 19:38:02 -07:00
Jesse Ezell 3d7f737481 add simple clone test 2014-03-18 18:24:31 -07:00
Jesse Ezell d1e7ee53d5 fix clone options init 2014-03-18 18:23:33 -07:00
Carlos Martín Nieto 5f35f13737 Merge pull request #61 from jezell/remotes-wip
Cleaned up remotes / clone / add push / fetch
2014-03-18 05:21:35 +01:00
Carlos Martín Nieto dbdbb4b0d1 Merge pull request #67 from jezell/chunk-create-fix
fix chunk create return values
2014-03-17 16:04:05 +01:00
Jesse Ezell 663c2a69c9 fix chunk create logic 2014-03-16 22:09:12 -07:00
Jesse Ezell 5f01bd7abd add branch iterator / remove useless repo from reference iterator 2014-03-12 15:49:11 -07:00
Jesse Ezell 51aa76d6f7 remove strarray wrappers 2014-03-11 16:25:22 -07:00