Skip to content

Commit

Permalink
Packbuilder: adjust to changes in dev
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosmn committed Nov 13, 2013
1 parent f583ad8 commit b5b891a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packbuilder.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ extern int _go_git_packbuilder_foreach(git_packbuilder *pb, void *payload);
import "C"
import (
"io"
"os"
"runtime"
"unsafe"
)
Expand Down Expand Up @@ -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()
}
Expand Down

0 comments on commit b5b891a

Please sign in to comment.