Skip to content

Commit 2b0f5cb

Browse files
committed
Bump to 0.1.9
1 parent 9affb94 commit 2b0f5cb

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+1323
-1239
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22

33
name = "git2"
4-
version = "0.1.8"
4+
version = "0.1.9"
55
authors = ["Alex Crichton <[email protected]>"]
66
license = "MIT/Apache-2.0"
77
readme = "README.md"

examples/add.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ fn run(args: &Args) -> Result<(), git2::Error> {
3434
let repo = try!(Repository::open(&Path::new(".")));
3535
let mut index = try!(repo.index());
3636

37-
let cb = (&mut |&mut: path: &[u8], _matched_spec: &[u8]| -> int {
37+
let cb = (&mut |&mut: path: &[u8], _matched_spec: &[u8]| -> i32 {
3838
let path = Path::new(path);
3939
let status = repo.status_file(&path).unwrap();
4040

@@ -55,9 +55,9 @@ fn run(args: &Args) -> Result<(), git2::Error> {
5555
};
5656

5757
if args.flag_update {
58-
try!(index.update_all(args.arg_spec.as_slice(), cb));
58+
try!(index.update_all(args.arg_spec.iter(), cb));
5959
} else {
60-
try!(index.add_all(args.arg_spec.as_slice(), git2::ADD_DEFAULT, cb));
60+
try!(index.add_all(args.arg_spec.iter(), git2::ADD_DEFAULT, cb));
6161
}
6262

6363
try!(index.write());

examples/clone.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ struct Args {
3333

3434
struct State {
3535
progress: Option<Progress<'static>>,
36-
total: uint,
37-
current: uint,
36+
total: usize,
37+
current: usize,
3838
path: Path,
3939
newline: bool,
4040
}

examples/log.rs

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@
1212
* <http://creativecommons.org/publicdomain/zero/1.0/>.
1313
*/
1414

15-
#![feature(macro_rules)]
16-
#![deny(warnings)]
1715
#![allow(unstable)]
1816

1917
extern crate "rustc-serialize" as rustc_serialize;
@@ -37,14 +35,14 @@ struct Args {
3735
flag_committer: Option<String>,
3836
flag_grep: Option<String>,
3937
flag_git_dir: Option<String>,
40-
flag_skip: Option<uint>,
41-
flag_max_count: Option<uint>,
38+
flag_skip: Option<usize>,
39+
flag_max_count: Option<usize>,
4240
flag_merges: bool,
4341
flag_no_merges: bool,
4442
flag_no_min_parents: bool,
4543
flag_no_max_parents: bool,
46-
flag_max_parents: Option<uint>,
47-
flag_min_parents: Option<uint>,
44+
flag_max_parents: Option<usize>,
45+
flag_min_parents: Option<usize>,
4846
flag_patch: bool,
4947
}
5048

@@ -221,12 +219,12 @@ fn match_with_parent(repo: &Repository, commit: &Commit, parent: &Commit,
221219
}
222220

223221
impl Args {
224-
fn min_parents(&self) -> uint {
222+
fn min_parents(&self) -> usize {
225223
if self.flag_no_min_parents { return 0 }
226224
self.flag_min_parents.unwrap_or(if self.flag_merges {2} else {0})
227225
}
228226

229-
fn max_parents(&self) -> Option<uint> {
227+
fn max_parents(&self) -> Option<usize> {
230228
if self.flag_no_max_parents { return None }
231229
self.flag_max_parents.or(if self.flag_no_merges {Some(1)} else {None})
232230
}

examples/ls-remote.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
* <http://creativecommons.org/publicdomain/zero/1.0/>.
1313
*/
1414

15-
#![deny(warnings)]
1615
#![allow(unstable)]
16+
#![deny(warnings)]
1717

1818
extern crate git2;
1919
extern crate docopt;

examples/rev-list.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
* <http://creativecommons.org/publicdomain/zero/1.0/>.
1414
*/
1515

16-
#![feature(slicing_syntax)]
1716
#![deny(warnings)]
1817
#![allow(unstable)]
1918

examples/rev-parse.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ fn run(args: &Args) -> Result<(), git2::Error> {
3232
let path = args.flag_git_dir.as_ref().map(Path::new).unwrap_or(Path::new("."));
3333
let repo = try!(Repository::open(&path));
3434

35-
let revspec = try!(repo.revparse(args.arg_spec.as_slice()));
35+
let revspec = try!(repo.revparse(&args.arg_spec[]));
3636

3737
if revspec.mode().contains(git2::REVPARSE_SINGLE) {
3838
println!("{}", revspec.from().unwrap().id());

libgit2-sys/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22

33
name = "libgit2-sys"
4-
version = "0.1.5"
4+
version = "0.1.6"
55
authors = ["Alex Crichton <[email protected]>"]
66
links = "git2"
77
build = "build.rs"

libgit2-sys/build.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#![allow(unstable)]
2+
13
extern crate "pkg-config" as pkg_config;
24

35
use std::os;

libgit2-sys/lib.rs

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
#![allow(non_camel_case_types, missing_copy_implementations)]
2+
#![allow(raw_pointer_derive)]
23

4+
#[allow(unstable)]
35
extern crate libc;
46
extern crate "libssh2-sys" as libssh2;
57
#[cfg(unix)] extern crate "openssl-sys" as openssl;
@@ -36,8 +38,8 @@ pub use git_diff_stats_format_t::*;
3638

3739
use libc::{c_int, c_char, c_uint, size_t, c_uchar, c_void, c_ushort};
3840

39-
pub const GIT_OID_RAWSZ: uint = 20;
40-
pub const GIT_OID_HEXSZ: uint = GIT_OID_RAWSZ * 2;
41+
pub const GIT_OID_RAWSZ: usize = 20;
42+
pub const GIT_OID_HEXSZ: usize = GIT_OID_RAWSZ * 2;
4143
pub const GIT_CLONE_OPTIONS_VERSION: c_uint = 1;
4244
pub const GIT_CHECKOUT_OPTIONS_VERSION: c_uint = 1;
4345
pub const GIT_REMOTE_CALLBACKS_VERSION: c_uint = 1;
@@ -77,19 +79,19 @@ pub struct git_revspec {
7779
}
7880

7981
#[repr(C)]
80-
#[derive(Show)]
8182
pub struct git_error {
8283
pub message: *mut c_char,
8384
pub klass: c_int,
8485
}
8586

8687
#[repr(C)]
87-
#[derive(Copy,Show)]
88+
#[derive(Copy)]
8889
pub struct git_oid {
8990
pub id: [u8; GIT_OID_RAWSZ],
9091
}
9192

9293
#[repr(C)]
94+
#[derive(Copy)]
9395
pub struct git_strarray {
9496
pub strings: *mut *mut c_char,
9597
pub count: size_t,
@@ -103,7 +105,7 @@ pub struct git_signature {
103105
}
104106

105107
#[repr(C)]
106-
#[derive(Copy)]
108+
#[derive(Copy, Clone, Eq, PartialEq)]
107109
pub struct git_time {
108110
pub time: git_time_t,
109111
pub offset: c_int,
@@ -118,7 +120,7 @@ pub const GIT_REVPARSE_RANGE: c_int = 1 << 1;
118120
pub const GIT_REVPARSE_MERGE_BASE: c_int = 1 << 2;
119121

120122
#[repr(C)]
121-
#[derive(PartialEq, Eq, Clone, Show, Copy)]
123+
#[derive(PartialEq, Eq, Clone, Copy)]
122124
pub enum git_error_code {
123125
GIT_OK = 0,
124126

@@ -465,7 +467,7 @@ pub enum git_ref_t {
465467
GIT_REF_INVALID = 0,
466468
GIT_REF_OID = 1,
467469
GIT_REF_SYMBOLIC = 2,
468-
GIT_REF_LISTALL = GIT_REF_OID as int | GIT_REF_SYMBOLIC as int,
470+
GIT_REF_LISTALL = GIT_REF_OID as isize | GIT_REF_SYMBOLIC as isize,
469471
}
470472

471473
#[repr(C)]
@@ -490,6 +492,7 @@ pub type git_treewalk_cb = extern fn(*const c_char, *const git_tree_entry,
490492
*mut c_void) -> c_int;
491493

492494
#[repr(C)]
495+
#[derive(Copy)]
493496
pub struct git_buf {
494497
pub ptr: *mut c_char,
495498
pub asize: size_t,
@@ -501,13 +504,14 @@ pub struct git_buf {
501504
pub enum git_branch_t {
502505
GIT_BRANCH_LOCAL = 1,
503506
GIT_BRANCH_REMOTE = 2,
504-
GIT_BRANCH_ALL = GIT_BRANCH_LOCAL as int | GIT_BRANCH_REMOTE as int,
507+
GIT_BRANCH_ALL = GIT_BRANCH_LOCAL as isize | GIT_BRANCH_REMOTE as isize,
505508
}
506509

507510
pub type git_index_matched_path_cb = extern fn(*const c_char, *const c_char,
508511
*mut c_void) -> c_int;
509512

510513
#[repr(C)]
514+
#[derive(Copy)]
511515
pub struct git_index_entry {
512516
pub ctime: git_index_time,
513517
pub mtime: git_index_time,
@@ -524,7 +528,7 @@ pub struct git_index_entry {
524528
}
525529

526530
#[repr(C)]
527-
#[derive(Copy)]
531+
#[derive(Copy, Clone, Eq, PartialEq)]
528532
pub struct git_index_time {
529533
pub seconds: git_time_t,
530534
pub nanoseconds: c_uint,

0 commit comments

Comments
 (0)