Commit Graph

589 Commits

Author SHA1 Message Date
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 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 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 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 3b5633de21 Mention that MergeAnalysis is a bitmask 2015-10-26 21:22:22 +01: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 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 ebf7f15bf9 Merge branch 'status-options' 2015-09-18 10:49:14 +02:00
Calin Seciu 34fb7e03ec Fix crash when using Pathspec in StatusOptions
Using `StatusOptions.Pathspec` results in a fatal error panic with
the message 'unexpected signal during runtime execution'.

This is because the `&cpathspec` C.git_strarray gets freed in
`*StatusOptions.toC()` before being passed to
`C.git_status_init_options()` in `*Repository.StatusList()`
(see b3e7705c48/status.go (L138))

The relevant panic trace is:

```
fatal error: unexpected signal during runtime execution
[signal 0xb code=0x1 addr=0xb01dfacedebac1e pc=0x4062609]

runtime stack:
runtime.throw(0x469a080, 0x2a)
    /usr/local/Cellar/go/1.5.1/libexec/src/runtime/panic.go:527 +0x90
runtime.sigpanic()
    /usr/local/Cellar/go/1.5.1/libexec/src/runtime/sigpanic_unix.go:12
+0x5a

goroutine 71 [syscall, locked to thread]:
runtime.cgocall(0x400a720, 0xc8204e9998, 0x0)
    /usr/local/Cellar/go/1.5.1/libexec/src/runtime/cgocall.go:120 +0x11b
fp=0xc8204e9968 sp=0xc8204e9938
github.com/libgit2/git2go._Cfunc_git_status_list_new(0xc8204c39c8,
0x5e17780, 0xc820478c40, 0xc800000000)
    ??:0 +0x39 fp=0xc8204e9998 sp=0xc8204e9968
github.com/libgit2/git2go.(*Repository).StatusList(0xc820013290,
0xc8204e9b58, 0x0, 0x0, 0x0)
    /Users/calin/go/src/github.com/libgit2/git2go/status.go:168 +0x11d
fp=0xc8204e99e8 sp=0xc8204e9998
```
2015-09-18 10:48:26 +02:00
Carlos Martín Nieto 6d3a3499f1 Merge branch 'master-v23' 2015-08-31 19:58:29 +02:00
Carlos Martín Nieto 4090c401c8 Don't call the finalizer on a borrowed repository
When libgit2 gives us the repository for us to create the remote in, we
do not own it, so we must make sure we don't try to free it.
2015-08-31 16:07:37 +02:00
Carlos Martín Nieto 2743bbfca3 Test against Go 1.5 2015-08-31 16:07:37 +02:00
Carlos Martín Nieto 1ea9965824 Install v23 on Travis 2015-08-31 16:07:37 +02:00
Carlos Martín Nieto 337f25d47e Remove the vendored libgit2 submodule
This is a left-over from the merge from 'next'.
2015-08-31 16:07:08 +02:00
Carlos Martín Nieto f72db33baf Merge branch 'next' 2015-08-31 13:55:46 +02:00
Carlos Martín Nieto 157593f38d Don't trat a revwalk's ITEROVER as an error 2015-08-31 13:13:27 +02:00
Carlos Martín Nieto e4b2222888 Merge pull request #242 from pks-t/fix-populate-clone-options
clone: do not free clone options' payload
2015-08-31 13:05:36 +02:00
Carlos Martín Nieto c6c2e9389f Merge branch 'push-cb' into next 2015-08-31 12:52:20 +02:00
Aaron O'Mullan 803ef7dad5 Add nil check on CredentialsCallback wrapper 2015-08-31 12:48:11 +02:00
Aaron O'Mullan a572b15df6 Add back support for RemoteCallbacks in Remote.Push() 2015-08-31 12:43:36 +02:00
Patrick Steinhardt 0b530c15cf clone: improve handling of remote create callback
The clone options contain fields for ae remote create callback
and its payload, which can be used to override the behavior when
the default remote is being created for newly cloned
repositories.

Currently we only accept a C function as callback, though, making
it overly complicated to use it. We also unconditionally `free`
the payload if its address is non-`nil`, which may cause the
program to segfault when the memory is not dynamically allocated.

Instead, we want callers to provide a Go function that is
subsequently being called by us. To do this, we introduce an
indirection such that we are able to extract the provided
function and payload when being called by `git_clone` and handle
the return values of the user-provided function.
2015-08-18 14:01:51 +02:00
Carlos Martín Nieto 3d15c877d8 Merge pull request #241 from pks-t/memleak-fixes
Memleak fixes
2015-08-13 02:04:23 +02:00
Patrick Steinhardt 37bb1a6025 merge: fix memory leak related to merge file opts 2015-08-12 10:24:59 +02:00
Patrick Steinhardt cce14aa58b branch: fix memory leaks related to CStrings 2015-08-12 10:24:59 +02:00
Carlos Martín Nieto ff6d4a7dfd We do require sudo on Travis 2015-08-04 15:01:17 +02:00
Carlos Martín Nieto 47949510f1 Merge remote-tracking branch 'origin/master' into next 2015-08-04 14:59:10 +02:00
Carlos Martín Nieto 5d989f2cad Merge pull request #236 from clns/object-peel
Add ability to peel any git object
2015-08-03 10:56:47 +02:00
Carlos Martín Nieto fba081ddbb Merge pull request #227 from clns/describe
Add git-describe support
2015-08-03 10:50:11 +02:00
Calin Seciu 17950c198b Add ability to peel any git object
Includes support for 'git_object_peel'.
2015-08-01 14:28:20 +02:00
Calin Seciu 1018ff76d0 Add git-describe support
Includes 'git_describe_commit' and 'git_describe_workdir'.
2015-07-31 22:39:33 +02:00