summaryrefslogtreecommitdiff
path: root/config.go
diff options
context:
space:
mode:
authorPatrick Steinhardt <[email protected]>2015-08-12 12:44:58 +0200
committerPatrick Steinhardt <[email protected]>2015-08-18 14:01:51 +0200
commit0b530c15cfff492e61c7afae55888fe1eeffe214 (patch)
tree0882a7e325dc4c4fe64c1df1f7d48d7454807b27 /config.go
parent4eae20ec279d20948aa5a45e0963ae7c4bcb0712 (diff)
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.
Diffstat (limited to 'config.go')
0 files changed, 0 insertions, 0 deletions