Commit Graph

767 Commits

Author SHA1 Message Date
Carlos Martín Nieto fa644d2fc9 Merge pull request #296 from libgit2/cmn/track-real-pointers
handles: use real pointers to keep track of handles
2016-02-18 18:43:56 +01:00
Carlos Martín Nieto f1240e6565 handles: use real pointers to keep track of handles
With the change to 1.6 rules, we couldn't use the Go pointers, so we
went with casting the list indices into pointers.

The runtime does not like this, however. It will sometimes detect that
we have a pointer with a very small value and consider it an invalid
pointer, bringing down the application with it.

Work around that by asking libc for the smallest amount of memory it'll
give us so we have an actual allocated pointer to use. We then use this
pointer value as the key in our map to find the Go object we're
tracking.
2016-02-18 17:33:44 +01:00
Carlos Martín Nieto ac719c6759 Merge branch 'master' into next 2016-02-18 15:57:46 +01:00
Carlos Martín Nieto 4a9a59c6fa Merge commit 'refs/pull/285/head' of github.com:libgit2/git2go into next 2016-02-18 15:43:58 +01:00
Carlos Martín Nieto f05417aaba Merge pull request #282 from ianlancetaylor/master
handles, merge, odb: changes for Go 1.6 pointer passing rules
2016-02-18 13:10:08 +01:00
Han-Wen Nienhuys 090dc7ee39 Use Filemode in TreeBuilder.Insert, and add test coverage for some
TreeBuilder methods.
2016-02-17 18:23:52 +01:00
Han-Wen Nienhuys aa59dccea7 Upgrade to libgit2 to 0f9d15493d5d8ad4353dd7beed52c9567334f6e5 2016-02-17 18:23:52 +01:00
Ian Lance Taylor dc8b154f4f odb: don't copy buffer 2016-02-16 21:40:05 -08:00
Ian Lance Taylor ddbf1baab1 merge: remove whitespace change 2016-02-16 21:36:57 -08:00
Ian Lance Taylor a1f25eafec handles, merge: simplify code, don't copy file contents 2016-02-16 21:34:43 -08:00
Ian Lance Taylor b70973e5c7 Merge remote-tracking branch 'upstream/master' 2016-02-16 21:06:45 -08:00
Carlos Martín Nieto 6d6736b2bd Merge remote-tracking branch 'upstream/master' into next 2016-02-15 15:02:19 +01:00
Carlos Martín Nieto 55594814c9 Merge pull request #263 from joseferminj/master
Expose AddGitIgnoreRules and ClearGitIgnoreRules funcs
2016-02-15 14:47:53 +01:00
Carlos Martín Nieto ae1de83894 Merge pull request #292 from orivej/git_revwalk_simplify_first_parent
Add RevWalk.SimplifyFirstParent()
2016-02-09 06:03:27 +01:00
Orivej Desh b876e836fa Add RevWalk.SimplifyFirstParent() 2016-02-07 03:15:40 +00:00
Carlos Martín Nieto 4a7794664e Merge pull request #288 from hanwen/readheader
Expose git_odb_read_header as Odb.ReadHeader.
2016-02-06 13:16:59 -08:00
Han-Wen Nienhuys 773ac24a16 Expose git_odb_read_header as Odb.ReadHeader.
This function is much faster for discovering sizes for a given OID.
2016-02-03 15:56:39 +01:00
Carlos Martín Nieto 6d60e0f2c9 Merge pull request #283 from ebfe/repo-open
Add missing RepositoryOpenExtended arguments
2016-01-16 01:44:09 +01:00
Michael Gehring 1bc7cf60bd Add missing RepositoryOpenExtended arguments
Fixes #277
2016-01-15 22:31:21 +01:00
Carlos Martín Nieto 2e17c3d55f Merge pull request #280 from ebfe/hint-path
Don't drop CreateBlobFromChunks hintPath argument
2016-01-15 22:22:36 +01:00
Ian Lance Taylor 42b11d403d handles, merge, odb: changes for Go 1.6 pointer passing rules
See http://tip.golang.org/cmd/cgo/#hdr-Passing_pointers .
2016-01-07 18:37:46 -08:00
Michael Gehring 51d3ead30d Don't drop CreateBlobFromChunks hintPath argument 2016-01-04 15:02:21 +01:00
Carlos Martín Nieto 105573ac7a Merge pull request #275 from clearr/index-find
Add Index.Find() and Index.FindPrefix()
2015-12-29 13:21:41 +00:00
FUJII Ryota 20ab28bfea Add Index.Find() and Index.FindPrefix() 2015-12-21 18:19:03 +09:00
Carlos Martín Nieto 9022ab9c19 Merge pull request #273 from clearr/fix-index-entrybypath-leak
Fix a memory leak in Index.EntryByPath()
2015-12-16 15:19:35 +01:00
FUJII Ryota 1cdf1d70a2 Fix a memory leak in Index.EntryByPath() 2015-12-16 16:43:26 +09:00
Carlos Martín Nieto 4ee13db86d Merge pull request #271 from joseferminj/fix-memory-problems
Fix Fetch/Push memory allocation problems
2015-11-13 18:33:02 +01:00
Jose Alvarez 92d736d12c Fix Fetch/Push memory allocation problems
The Fetch/Push operations didn't allocate the git_*_options structure
and this causes a memory problem in the libgit2 code. Following the
example of Clone operation, the Fetch/Push functions allocates the
options structure before calling the C.
2015-11-12 21:15:24 -05:00
Carlos Martín Nieto f05a6a3384 Merge pull request #269 from durin42/small-fixes
Small fixes I noticed while perusing the code.
2015-11-03 08:30:59 -08:00
Augie Fackler 714cd56c71 odb: remove debug fmt.Printlns
These appear to be left over debug statements, and they also look like
they were intended to be fmt.Printf calls anyway.
2015-11-02 16:00:19 -05:00
Augie Fackler f18ea412dc config_test: properly detect failed config writes
This patch fixes the setup stage of the config tests to notice when
the writes fail (eg $PWD is a read-only filesystem) and to correctly
skip the entire test function as a result.
2015-11-02 16:00:04 -05:00
Carlos Martín Nieto c646a2eb30 Merge pull request #268 from clearr/fix-index-leaks
Fix memory leaks in NewIndex() and OpenIndex()
2015-10-29 13:04:01 +01:00
FUJII Ryota ae107d5f56 Fix memory leaks in NewIndex() and OpenIndex() 2015-10-27 15:20:50 +09:00
Carlos Martín Nieto 749963ce55 Merge pull request #266 from clns/update-libgit2
[next] Update libgit2 to 821131f
2015-10-26 21:44:16 +01:00
Carlos Martín Nieto 3b5633de21 Mention that MergeAnalysis is a bitmask 2015-10-26 21:22:22 +01:00
Calin Seciu 367cd8eb9b Update libgit2 to 821131f
The API changes are:

- `*Remote.Connect`

  ```go
  // from:
  func (o *Remote) Connect(direction ConnectDirection, callbacks *RemoteCallbacks) error
  // to:
  func (o *Remote) Connect(direction ConnectDirection, callbacks *RemoteCallbacks, headers []string) error
  ```

- `*Remote.ConnectFetch` - `headers` was added as above
- `*Remote.ConnectPush` - `headers` was added as above
2015-10-26 16:20:18 +02:00
Carlos Martín Nieto c4868aef6c Merge pull request #262 from clearr/ignore-support
Add support for ignore
2015-10-21 16:33:05 +02:00
FUJII Ryota 56cc9e1b0e Add support for ignore 2015-10-20 15:07:54 +09:00
Jose Alvarez 22495763b7 Expose AddGitIgnoreRules and ClearGitIgnoreRules funcs 2015-10-13 11:33:37 -04:00
Carlos Martín Nieto 22da351b1e Merge pull request #258 from TheDahv/feat-config-snapshot
Fix bug in Config LookupString
2015-10-09 13:00:26 +02:00
David Pierce 81e0b16d9f Tests config lookup methods 2015-10-08 09:47:23 -07:00
David Pierce 80cf533fe4 Config#LookupString uses git_buf to load value 2015-10-08 09:37:36 -07:00
Carlos Martín Nieto 43b39805bd Merge pull request #261 from jbranchaud/fix-readme-typo
Fix typo in README: manaager -> manager
2015-10-07 12:29:34 +02:00
jbranchaud b1d97c1ebd Fix typo in README: manaager -> manager 2015-10-06 15:12:49 -05:00
Carlos Martín Nieto 698ed4a42d Merge pull request #260 from clearr/index-entrybypath
Add EntryByPath method to Index
2015-09-30 08:53:05 +02:00
FUJII Ryota b8283e7277 Add EntryByPath method to Index 2015-09-28 20:38:04 +09:00
Calin Seciu d54ea1d6a8 Add stash support 2015-09-21 14:50:57 +03:00
Carlos Martín Nieto 1c855246ca Merge pull request #253 from joseferminj/checkout-baseline
Expose baseline field in CheckoutOptions
2015-09-18 22:55:04 +02:00
Jose Alvarez 9397af0854 Expose baseline field in CheckoutOptions 2015-09-18 09:50:59 -04:00
Carlos Martín Nieto 0522886781 Merge remote-tracking branch 'origin/master' into next 2015-09-18 10:52:37 +02:00