diff options
| author | Carlos Martín Nieto <[email protected]> | 2013-11-13 06:53:10 +0100 |
|---|---|---|
| committer | Carlos Martín Nieto <[email protected]> | 2013-11-13 06:53:10 +0100 |
| commit | b5b891a03d9154add260d2ba18e7d12b4768130b (patch) | |
| tree | 98f25f67777c8b64cde9d4b7e438915185e44a46 /packbuilder.go | |
| parent | f583ad8abd047b2b281c56be9ca2f3c811ae112b (diff) | |
Packbuilder: adjust to changes in dev
Diffstat (limited to 'packbuilder.go')
| -rw-r--r-- | packbuilder.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/packbuilder.go b/packbuilder.go index bcb61a4..f1407e8 100644 --- a/packbuilder.go +++ b/packbuilder.go @@ -12,6 +12,7 @@ extern int _go_git_packbuilder_foreach(git_packbuilder *pb, void *payload); import "C" import ( "io" + "os" "runtime" "unsafe" ) @@ -65,10 +66,10 @@ func (pb *Packbuilder) ObjectCount() uint32 { return uint32(C.git_packbuilder_object_count(pb.ptr)) } -func (pb *Packbuilder) WriteToFile(name string) error { +func (pb *Packbuilder) WriteToFile(name string, mode os.FileMode) error { cname := C.CString(name) defer C.free(unsafe.Pointer(cname)) - ret := C.git_packbuilder_write(pb.ptr, cname, nil, nil) + ret := C.git_packbuilder_write(pb.ptr, cname, C.uint(mode.Perm()), nil, nil) if ret != 0 { return LastError() } |
