├── .gitignore ├── Cargo.lock ├── Cargo.toml ├── README.org ├── bin ├── load.sh └── test.sh ├── elisp ├── magit-libgit2-test.el └── magit-libgit2-x.el └── src └── lib.rs /.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | **/*.rs.bk 3 | -------------------------------------------------------------------------------- /Cargo.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Cargo. 2 | # It is not intended for manual editing. 3 | [[package]] 4 | name = "aho-corasick" 5 | version = "0.6.6" 6 | source = "registry+https://github.com/rust-lang/crates.io-index" 7 | dependencies = [ 8 | "memchr 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)", 9 | ] 10 | 11 | [[package]] 12 | name = "ansi_term" 13 | version = "0.11.0" 14 | source = "registry+https://github.com/rust-lang/crates.io-index" 15 | dependencies = [ 16 | "winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", 17 | ] 18 | 19 | [[package]] 20 | name = "atty" 21 | version = "0.2.11" 22 | source = "registry+https://github.com/rust-lang/crates.io-index" 23 | dependencies = [ 24 | "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", 25 | "termion 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)", 26 | "winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", 27 | ] 28 | 29 | [[package]] 30 | name = "backtrace" 31 | version = "0.3.9" 32 | source = "registry+https://github.com/rust-lang/crates.io-index" 33 | dependencies = [ 34 | "backtrace-sys 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)", 35 | "cfg-if 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", 36 | "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", 37 | "rustc-demangle 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", 38 | "winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", 39 | ] 40 | 41 | [[package]] 42 | name = "backtrace-sys" 43 | version = "0.1.24" 44 | source = "registry+https://github.com/rust-lang/crates.io-index" 45 | dependencies = [ 46 | "cc 1.0.18 (registry+https://github.com/rust-lang/crates.io-index)", 47 | "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", 48 | ] 49 | 50 | [[package]] 51 | name = "bindgen" 52 | version = "0.48.1" 53 | source = "registry+https://github.com/rust-lang/crates.io-index" 54 | dependencies = [ 55 | "bitflags 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", 56 | "cexpr 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", 57 | "cfg-if 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", 58 | "clang-sys 0.26.4 (registry+https://github.com/rust-lang/crates.io-index)", 59 | "clap 2.32.0 (registry+https://github.com/rust-lang/crates.io-index)", 60 | "env_logger 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", 61 | "hashbrown 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", 62 | "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", 63 | "log 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", 64 | "peeking_take_while 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", 65 | "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", 66 | "quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", 67 | "regex 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", 68 | "which 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", 69 | ] 70 | 71 | [[package]] 72 | name = "bitflags" 73 | version = "0.9.1" 74 | source = "registry+https://github.com/rust-lang/crates.io-index" 75 | 76 | [[package]] 77 | name = "bitflags" 78 | version = "1.0.3" 79 | source = "registry+https://github.com/rust-lang/crates.io-index" 80 | 81 | [[package]] 82 | name = "byteorder" 83 | version = "1.3.1" 84 | source = "registry+https://github.com/rust-lang/crates.io-index" 85 | 86 | [[package]] 87 | name = "cc" 88 | version = "1.0.18" 89 | source = "registry+https://github.com/rust-lang/crates.io-index" 90 | 91 | [[package]] 92 | name = "cexpr" 93 | version = "0.3.5" 94 | source = "registry+https://github.com/rust-lang/crates.io-index" 95 | dependencies = [ 96 | "nom 4.2.3 (registry+https://github.com/rust-lang/crates.io-index)", 97 | ] 98 | 99 | [[package]] 100 | name = "cfg-if" 101 | version = "0.1.5" 102 | source = "registry+https://github.com/rust-lang/crates.io-index" 103 | 104 | [[package]] 105 | name = "clang-sys" 106 | version = "0.26.4" 107 | source = "registry+https://github.com/rust-lang/crates.io-index" 108 | dependencies = [ 109 | "glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", 110 | "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", 111 | "libloading 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", 112 | ] 113 | 114 | [[package]] 115 | name = "clap" 116 | version = "2.32.0" 117 | source = "registry+https://github.com/rust-lang/crates.io-index" 118 | dependencies = [ 119 | "ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", 120 | "atty 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", 121 | "bitflags 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", 122 | "strsim 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", 123 | "textwrap 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", 124 | "unicode-width 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", 125 | "vec_map 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", 126 | ] 127 | 128 | [[package]] 129 | name = "cmake" 130 | version = "0.1.33" 131 | source = "registry+https://github.com/rust-lang/crates.io-index" 132 | dependencies = [ 133 | "cc 1.0.18 (registry+https://github.com/rust-lang/crates.io-index)", 134 | ] 135 | 136 | [[package]] 137 | name = "ctor" 138 | version = "0.1.9" 139 | source = "registry+https://github.com/rust-lang/crates.io-index" 140 | dependencies = [ 141 | "quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", 142 | "syn 0.15.44 (registry+https://github.com/rust-lang/crates.io-index)", 143 | ] 144 | 145 | [[package]] 146 | name = "curl-sys" 147 | version = "0.4.8" 148 | source = "registry+https://github.com/rust-lang/crates.io-index" 149 | dependencies = [ 150 | "cc 1.0.18 (registry+https://github.com/rust-lang/crates.io-index)", 151 | "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", 152 | "libz-sys 1.0.20 (registry+https://github.com/rust-lang/crates.io-index)", 153 | "openssl-sys 0.9.35 (registry+https://github.com/rust-lang/crates.io-index)", 154 | "pkg-config 0.3.13 (registry+https://github.com/rust-lang/crates.io-index)", 155 | "vcpkg 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", 156 | "winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", 157 | ] 158 | 159 | [[package]] 160 | name = "darling" 161 | version = "0.9.0" 162 | source = "registry+https://github.com/rust-lang/crates.io-index" 163 | dependencies = [ 164 | "darling_core 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", 165 | "darling_macro 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", 166 | ] 167 | 168 | [[package]] 169 | name = "darling_core" 170 | version = "0.9.0" 171 | source = "registry+https://github.com/rust-lang/crates.io-index" 172 | dependencies = [ 173 | "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", 174 | "ident_case 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", 175 | "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", 176 | "quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", 177 | "strsim 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", 178 | "syn 0.15.44 (registry+https://github.com/rust-lang/crates.io-index)", 179 | ] 180 | 181 | [[package]] 182 | name = "darling_macro" 183 | version = "0.9.0" 184 | source = "registry+https://github.com/rust-lang/crates.io-index" 185 | dependencies = [ 186 | "darling_core 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", 187 | "quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", 188 | "syn 0.15.44 (registry+https://github.com/rust-lang/crates.io-index)", 189 | ] 190 | 191 | [[package]] 192 | name = "emacs" 193 | version = "0.11.0" 194 | source = "registry+https://github.com/rust-lang/crates.io-index" 195 | dependencies = [ 196 | "ctor 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", 197 | "emacs-macros 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", 198 | "emacs_module 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", 199 | "failure 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", 200 | "failure_derive 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", 201 | "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", 202 | ] 203 | 204 | [[package]] 205 | name = "emacs-macros" 206 | version = "0.11.0" 207 | source = "registry+https://github.com/rust-lang/crates.io-index" 208 | dependencies = [ 209 | "darling 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", 210 | "quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", 211 | "syn 0.15.44 (registry+https://github.com/rust-lang/crates.io-index)", 212 | ] 213 | 214 | [[package]] 215 | name = "emacs-rs-module" 216 | version = "0.11.0" 217 | source = "registry+https://github.com/rust-lang/crates.io-index" 218 | dependencies = [ 219 | "emacs 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", 220 | "libloading 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", 221 | ] 222 | 223 | [[package]] 224 | name = "emacs_module" 225 | version = "0.10.0" 226 | source = "registry+https://github.com/rust-lang/crates.io-index" 227 | dependencies = [ 228 | "bindgen 0.48.1 (registry+https://github.com/rust-lang/crates.io-index)", 229 | ] 230 | 231 | [[package]] 232 | name = "env_logger" 233 | version = "0.6.1" 234 | source = "registry+https://github.com/rust-lang/crates.io-index" 235 | dependencies = [ 236 | "atty 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", 237 | "humantime 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", 238 | "log 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", 239 | "regex 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", 240 | "termcolor 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", 241 | ] 242 | 243 | [[package]] 244 | name = "failure" 245 | version = "0.1.2" 246 | source = "registry+https://github.com/rust-lang/crates.io-index" 247 | dependencies = [ 248 | "backtrace 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", 249 | "failure_derive 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", 250 | ] 251 | 252 | [[package]] 253 | name = "failure_derive" 254 | version = "0.1.2" 255 | source = "registry+https://github.com/rust-lang/crates.io-index" 256 | dependencies = [ 257 | "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", 258 | "quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", 259 | "syn 0.14.8 (registry+https://github.com/rust-lang/crates.io-index)", 260 | "synstructure 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", 261 | ] 262 | 263 | [[package]] 264 | name = "fnv" 265 | version = "1.0.6" 266 | source = "registry+https://github.com/rust-lang/crates.io-index" 267 | 268 | [[package]] 269 | name = "git2" 270 | version = "0.6.11" 271 | source = "registry+https://github.com/rust-lang/crates.io-index" 272 | dependencies = [ 273 | "bitflags 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)", 274 | "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", 275 | "libgit2-sys 0.6.19 (registry+https://github.com/rust-lang/crates.io-index)", 276 | "openssl-probe 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", 277 | "openssl-sys 0.9.35 (registry+https://github.com/rust-lang/crates.io-index)", 278 | "url 1.7.1 (registry+https://github.com/rust-lang/crates.io-index)", 279 | ] 280 | 281 | [[package]] 282 | name = "glob" 283 | version = "0.2.11" 284 | source = "registry+https://github.com/rust-lang/crates.io-index" 285 | 286 | [[package]] 287 | name = "hashbrown" 288 | version = "0.1.8" 289 | source = "registry+https://github.com/rust-lang/crates.io-index" 290 | dependencies = [ 291 | "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", 292 | "scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", 293 | ] 294 | 295 | [[package]] 296 | name = "humantime" 297 | version = "1.2.0" 298 | source = "registry+https://github.com/rust-lang/crates.io-index" 299 | dependencies = [ 300 | "quick-error 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)", 301 | ] 302 | 303 | [[package]] 304 | name = "ident_case" 305 | version = "1.0.1" 306 | source = "registry+https://github.com/rust-lang/crates.io-index" 307 | 308 | [[package]] 309 | name = "idna" 310 | version = "0.1.5" 311 | source = "registry+https://github.com/rust-lang/crates.io-index" 312 | dependencies = [ 313 | "matches 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", 314 | "unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", 315 | "unicode-normalization 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", 316 | ] 317 | 318 | [[package]] 319 | name = "lazy_static" 320 | version = "1.3.0" 321 | source = "registry+https://github.com/rust-lang/crates.io-index" 322 | 323 | [[package]] 324 | name = "libc" 325 | version = "0.2.43" 326 | source = "registry+https://github.com/rust-lang/crates.io-index" 327 | 328 | [[package]] 329 | name = "libgit2-sys" 330 | version = "0.6.19" 331 | source = "registry+https://github.com/rust-lang/crates.io-index" 332 | dependencies = [ 333 | "cc 1.0.18 (registry+https://github.com/rust-lang/crates.io-index)", 334 | "cmake 0.1.33 (registry+https://github.com/rust-lang/crates.io-index)", 335 | "curl-sys 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", 336 | "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", 337 | "libssh2-sys 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", 338 | "libz-sys 1.0.20 (registry+https://github.com/rust-lang/crates.io-index)", 339 | "openssl-sys 0.9.35 (registry+https://github.com/rust-lang/crates.io-index)", 340 | "pkg-config 0.3.13 (registry+https://github.com/rust-lang/crates.io-index)", 341 | ] 342 | 343 | [[package]] 344 | name = "libloading" 345 | version = "0.5.2" 346 | source = "registry+https://github.com/rust-lang/crates.io-index" 347 | dependencies = [ 348 | "cc 1.0.18 (registry+https://github.com/rust-lang/crates.io-index)", 349 | "winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", 350 | ] 351 | 352 | [[package]] 353 | name = "libssh2-sys" 354 | version = "0.2.10" 355 | source = "registry+https://github.com/rust-lang/crates.io-index" 356 | dependencies = [ 357 | "cmake 0.1.33 (registry+https://github.com/rust-lang/crates.io-index)", 358 | "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", 359 | "libz-sys 1.0.20 (registry+https://github.com/rust-lang/crates.io-index)", 360 | "openssl-sys 0.9.35 (registry+https://github.com/rust-lang/crates.io-index)", 361 | "pkg-config 0.3.13 (registry+https://github.com/rust-lang/crates.io-index)", 362 | "vcpkg 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", 363 | ] 364 | 365 | [[package]] 366 | name = "libz-sys" 367 | version = "1.0.20" 368 | source = "registry+https://github.com/rust-lang/crates.io-index" 369 | dependencies = [ 370 | "cc 1.0.18 (registry+https://github.com/rust-lang/crates.io-index)", 371 | "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", 372 | "pkg-config 0.3.13 (registry+https://github.com/rust-lang/crates.io-index)", 373 | "vcpkg 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", 374 | ] 375 | 376 | [[package]] 377 | name = "log" 378 | version = "0.4.4" 379 | source = "registry+https://github.com/rust-lang/crates.io-index" 380 | dependencies = [ 381 | "cfg-if 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", 382 | ] 383 | 384 | [[package]] 385 | name = "magit-libgit2" 386 | version = "0.1.0" 387 | dependencies = [ 388 | "emacs 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", 389 | "emacs-rs-module 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", 390 | "git2 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", 391 | ] 392 | 393 | [[package]] 394 | name = "matches" 395 | version = "0.1.7" 396 | source = "registry+https://github.com/rust-lang/crates.io-index" 397 | 398 | [[package]] 399 | name = "memchr" 400 | version = "2.0.1" 401 | source = "registry+https://github.com/rust-lang/crates.io-index" 402 | dependencies = [ 403 | "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", 404 | ] 405 | 406 | [[package]] 407 | name = "nom" 408 | version = "4.2.3" 409 | source = "registry+https://github.com/rust-lang/crates.io-index" 410 | dependencies = [ 411 | "memchr 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)", 412 | "version_check 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", 413 | ] 414 | 415 | [[package]] 416 | name = "openssl-probe" 417 | version = "0.1.2" 418 | source = "registry+https://github.com/rust-lang/crates.io-index" 419 | 420 | [[package]] 421 | name = "openssl-sys" 422 | version = "0.9.35" 423 | source = "registry+https://github.com/rust-lang/crates.io-index" 424 | dependencies = [ 425 | "cc 1.0.18 (registry+https://github.com/rust-lang/crates.io-index)", 426 | "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", 427 | "pkg-config 0.3.13 (registry+https://github.com/rust-lang/crates.io-index)", 428 | "vcpkg 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", 429 | ] 430 | 431 | [[package]] 432 | name = "peeking_take_while" 433 | version = "0.1.2" 434 | source = "registry+https://github.com/rust-lang/crates.io-index" 435 | 436 | [[package]] 437 | name = "percent-encoding" 438 | version = "1.0.1" 439 | source = "registry+https://github.com/rust-lang/crates.io-index" 440 | 441 | [[package]] 442 | name = "pkg-config" 443 | version = "0.3.13" 444 | source = "registry+https://github.com/rust-lang/crates.io-index" 445 | 446 | [[package]] 447 | name = "proc-macro2" 448 | version = "0.4.27" 449 | source = "registry+https://github.com/rust-lang/crates.io-index" 450 | dependencies = [ 451 | "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", 452 | ] 453 | 454 | [[package]] 455 | name = "quick-error" 456 | version = "1.2.2" 457 | source = "registry+https://github.com/rust-lang/crates.io-index" 458 | 459 | [[package]] 460 | name = "quote" 461 | version = "0.6.13" 462 | source = "registry+https://github.com/rust-lang/crates.io-index" 463 | dependencies = [ 464 | "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", 465 | ] 466 | 467 | [[package]] 468 | name = "redox_syscall" 469 | version = "0.1.40" 470 | source = "registry+https://github.com/rust-lang/crates.io-index" 471 | 472 | [[package]] 473 | name = "redox_termios" 474 | version = "0.1.1" 475 | source = "registry+https://github.com/rust-lang/crates.io-index" 476 | dependencies = [ 477 | "redox_syscall 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)", 478 | ] 479 | 480 | [[package]] 481 | name = "regex" 482 | version = "1.0.3" 483 | source = "registry+https://github.com/rust-lang/crates.io-index" 484 | dependencies = [ 485 | "aho-corasick 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", 486 | "memchr 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)", 487 | "regex-syntax 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", 488 | "thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", 489 | "utf8-ranges 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", 490 | ] 491 | 492 | [[package]] 493 | name = "regex-syntax" 494 | version = "0.6.6" 495 | source = "registry+https://github.com/rust-lang/crates.io-index" 496 | dependencies = [ 497 | "ucd-util 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", 498 | ] 499 | 500 | [[package]] 501 | name = "rustc-demangle" 502 | version = "0.1.9" 503 | source = "registry+https://github.com/rust-lang/crates.io-index" 504 | 505 | [[package]] 506 | name = "scopeguard" 507 | version = "0.3.3" 508 | source = "registry+https://github.com/rust-lang/crates.io-index" 509 | 510 | [[package]] 511 | name = "strsim" 512 | version = "0.7.0" 513 | source = "registry+https://github.com/rust-lang/crates.io-index" 514 | 515 | [[package]] 516 | name = "syn" 517 | version = "0.14.8" 518 | source = "registry+https://github.com/rust-lang/crates.io-index" 519 | dependencies = [ 520 | "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", 521 | "quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", 522 | "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", 523 | ] 524 | 525 | [[package]] 526 | name = "syn" 527 | version = "0.15.44" 528 | source = "registry+https://github.com/rust-lang/crates.io-index" 529 | dependencies = [ 530 | "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", 531 | "quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", 532 | "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", 533 | ] 534 | 535 | [[package]] 536 | name = "synstructure" 537 | version = "0.9.0" 538 | source = "registry+https://github.com/rust-lang/crates.io-index" 539 | dependencies = [ 540 | "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", 541 | "quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", 542 | "syn 0.14.8 (registry+https://github.com/rust-lang/crates.io-index)", 543 | "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", 544 | ] 545 | 546 | [[package]] 547 | name = "termcolor" 548 | version = "1.0.4" 549 | source = "registry+https://github.com/rust-lang/crates.io-index" 550 | dependencies = [ 551 | "wincolor 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", 552 | ] 553 | 554 | [[package]] 555 | name = "termion" 556 | version = "1.5.1" 557 | source = "registry+https://github.com/rust-lang/crates.io-index" 558 | dependencies = [ 559 | "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", 560 | "redox_syscall 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)", 561 | "redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", 562 | ] 563 | 564 | [[package]] 565 | name = "textwrap" 566 | version = "0.10.0" 567 | source = "registry+https://github.com/rust-lang/crates.io-index" 568 | dependencies = [ 569 | "unicode-width 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", 570 | ] 571 | 572 | [[package]] 573 | name = "thread_local" 574 | version = "0.3.6" 575 | source = "registry+https://github.com/rust-lang/crates.io-index" 576 | dependencies = [ 577 | "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", 578 | ] 579 | 580 | [[package]] 581 | name = "ucd-util" 582 | version = "0.1.1" 583 | source = "registry+https://github.com/rust-lang/crates.io-index" 584 | 585 | [[package]] 586 | name = "unicode-bidi" 587 | version = "0.3.4" 588 | source = "registry+https://github.com/rust-lang/crates.io-index" 589 | dependencies = [ 590 | "matches 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", 591 | ] 592 | 593 | [[package]] 594 | name = "unicode-normalization" 595 | version = "0.1.7" 596 | source = "registry+https://github.com/rust-lang/crates.io-index" 597 | 598 | [[package]] 599 | name = "unicode-width" 600 | version = "0.1.5" 601 | source = "registry+https://github.com/rust-lang/crates.io-index" 602 | 603 | [[package]] 604 | name = "unicode-xid" 605 | version = "0.1.0" 606 | source = "registry+https://github.com/rust-lang/crates.io-index" 607 | 608 | [[package]] 609 | name = "url" 610 | version = "1.7.1" 611 | source = "registry+https://github.com/rust-lang/crates.io-index" 612 | dependencies = [ 613 | "idna 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", 614 | "matches 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", 615 | "percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", 616 | ] 617 | 618 | [[package]] 619 | name = "utf8-ranges" 620 | version = "1.0.0" 621 | source = "registry+https://github.com/rust-lang/crates.io-index" 622 | 623 | [[package]] 624 | name = "vcpkg" 625 | version = "0.2.5" 626 | source = "registry+https://github.com/rust-lang/crates.io-index" 627 | 628 | [[package]] 629 | name = "vec_map" 630 | version = "0.8.1" 631 | source = "registry+https://github.com/rust-lang/crates.io-index" 632 | 633 | [[package]] 634 | name = "version_check" 635 | version = "0.1.4" 636 | source = "registry+https://github.com/rust-lang/crates.io-index" 637 | 638 | [[package]] 639 | name = "which" 640 | version = "1.0.5" 641 | source = "registry+https://github.com/rust-lang/crates.io-index" 642 | dependencies = [ 643 | "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", 644 | ] 645 | 646 | [[package]] 647 | name = "winapi" 648 | version = "0.3.5" 649 | source = "registry+https://github.com/rust-lang/crates.io-index" 650 | dependencies = [ 651 | "winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", 652 | "winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", 653 | ] 654 | 655 | [[package]] 656 | name = "winapi-i686-pc-windows-gnu" 657 | version = "0.4.0" 658 | source = "registry+https://github.com/rust-lang/crates.io-index" 659 | 660 | [[package]] 661 | name = "winapi-util" 662 | version = "0.1.2" 663 | source = "registry+https://github.com/rust-lang/crates.io-index" 664 | dependencies = [ 665 | "winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", 666 | ] 667 | 668 | [[package]] 669 | name = "winapi-x86_64-pc-windows-gnu" 670 | version = "0.4.0" 671 | source = "registry+https://github.com/rust-lang/crates.io-index" 672 | 673 | [[package]] 674 | name = "wincolor" 675 | version = "1.0.1" 676 | source = "registry+https://github.com/rust-lang/crates.io-index" 677 | dependencies = [ 678 | "winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", 679 | "winapi-util 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", 680 | ] 681 | 682 | [metadata] 683 | "checksum aho-corasick 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c1c6d463cbe7ed28720b5b489e7c083eeb8f90d08be2a0d6bb9e1ffea9ce1afa" 684 | "checksum ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b" 685 | "checksum atty 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "9a7d5b8723950951411ee34d271d99dddcc2035a16ab25310ea2c8cfd4369652" 686 | "checksum backtrace 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "89a47830402e9981c5c41223151efcced65a0510c13097c769cede7efb34782a" 687 | "checksum backtrace-sys 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)" = "c66d56ac8dabd07f6aacdaf633f4b8262f5b3601a810a0dcddffd5c22c69daa0" 688 | "checksum bindgen 0.48.1 (registry+https://github.com/rust-lang/crates.io-index)" = "9d3d411fd93fd296e613bdac1d16755a6a922a4738e1c8f6a5e13542c905f3ca" 689 | "checksum bitflags 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4efd02e230a02e18f92fc2735f44597385ed02ad8f831e7c1c1156ee5e1ab3a5" 690 | "checksum bitflags 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "d0c54bb8f454c567f21197eefcdbf5679d0bd99f2ddbe52e84c77061952e6789" 691 | "checksum byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a019b10a2a7cdeb292db131fc8113e57ea2a908f6e7894b0c3c671893b65dbeb" 692 | "checksum cc 1.0.18 (registry+https://github.com/rust-lang/crates.io-index)" = "2119ea4867bd2b8ed3aecab467709720b2d55b1bcfe09f772fd68066eaf15275" 693 | "checksum cexpr 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "a7fa24eb00d5ffab90eaeaf1092ac85c04c64aaf358ea6f84505b8116d24c6af" 694 | "checksum cfg-if 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "0c4e7bb64a8ebb0d856483e1e682ea3422f883c5f5615a90d51a2c82fe87fdd3" 695 | "checksum clang-sys 0.26.4 (registry+https://github.com/rust-lang/crates.io-index)" = "6ef0c1bcf2e99c649104bd7a7012d8f8802684400e03db0ec0af48583c6fa0e4" 696 | "checksum clap 2.32.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b957d88f4b6a63b9d70d5f454ac8011819c6efa7727858f458ab71c756ce2d3e" 697 | "checksum cmake 0.1.33 (registry+https://github.com/rust-lang/crates.io-index)" = "704fbf3bb5149daab0afb255dbea24a1f08d2f4099cedb9baab6d470d4c5eefb" 698 | "checksum ctor 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "3b4c17619643c1252b5f690084b82639dd7fac141c57c8e77a00e0148132092c" 699 | "checksum curl-sys 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)" = "981bd902fcd8b8b999cf71b81447e27d66c3493a7f62f1372866fd32986c0c82" 700 | "checksum darling 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fcfbcb0c5961907597a7d1148e3af036268f2b773886b8bb3eeb1e1281d3d3d6" 701 | "checksum darling_core 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6afc018370c3bff3eb51f89256a6bdb18b4fdcda72d577982a14954a7a0b402c" 702 | "checksum darling_macro 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c6d8dac1c6f1d29a41c4712b4400f878cb4fcc4c7628f298dd75038e024998d1" 703 | "checksum emacs 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e7835efc5cb0529cd2c67c4665180661f9926c62278e5d698e44dc5151b6c6f6" 704 | "checksum emacs-macros 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c6d39c23c252aa8dae6398c65dd964c50e2c31db3f3f08c918b175a736f2200d" 705 | "checksum emacs-rs-module 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "640995f74274d8056dad10bcb48a82dd7dd037924becf9bd2745aaa01d65240b" 706 | "checksum emacs_module 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "aff4c8a59c08a336d3e8ac58556cb4a3bbdc8419dbb75172f473f532cea7c9bd" 707 | "checksum env_logger 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b61fa891024a945da30a9581546e8cfaf5602c7b3f4c137a2805cf388f92075a" 708 | "checksum failure 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7efb22686e4a466b1ec1a15c2898f91fa9cb340452496dca654032de20ff95b9" 709 | "checksum failure_derive 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "946d0e98a50d9831f5d589038d2ca7f8f455b1c21028c0db0e84116a12696426" 710 | "checksum fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "2fad85553e09a6f881f739c29f0b00b0f01357c743266d478b68951ce23285f3" 711 | "checksum git2 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)" = "ee5b4bb7cd2a44e6e5ee3a26ba6a9ca10d4ce2771cdc3839bbc54b47b7d1be84" 712 | "checksum glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "8be18de09a56b60ed0edf84bc9df007e30040691af7acd1c41874faac5895bfb" 713 | "checksum hashbrown 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "3bae29b6653b3412c2e71e9d486db9f9df5d701941d86683005efb9f2d28e3da" 714 | "checksum humantime 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3ca7e5f2e110db35f93b837c81797f3714500b81d517bf20c431b16d3ca4f114" 715 | "checksum ident_case 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" 716 | "checksum idna 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "38f09e0f0b1fb55fdee1f17470ad800da77af5186a1a76c026b679358b7e844e" 717 | "checksum lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bc5729f27f159ddd61f4df6228e827e86643d4d3e7c32183cb30a1c08f604a14" 718 | "checksum libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)" = "76e3a3ef172f1a0b9a9ff0dd1491ae5e6c948b94479a3021819ba7d860c8645d" 719 | "checksum libgit2-sys 0.6.19 (registry+https://github.com/rust-lang/crates.io-index)" = "6eeae66e7b1c995de45cb4e65c5ab438a96a7b4077e448645d4048dc753ad357" 720 | "checksum libloading 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f2b111a074963af1d37a139918ac6d49ad1d0d5e47f72fd55388619691a7d753" 721 | "checksum libssh2-sys 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)" = "10dbc0957a27626444f5a3f523e6b97a70c3d702999bf1c7161cfbe7a25a9368" 722 | "checksum libz-sys 1.0.20 (registry+https://github.com/rust-lang/crates.io-index)" = "f5f9aba969b3c45fe9c94bec65895868a9ceca9a600699f4054b75747a19c7c6" 723 | "checksum log 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "cba860f648db8e6f269df990180c2217f333472b4a6e901e97446858487971e2" 724 | "checksum matches 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "835511bab37c34c47da5cb44844bea2cfde0236db0b506f90ea4224482c9774a" 725 | "checksum memchr 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "796fba70e76612589ed2ce7f45282f5af869e0fdd7cc6199fa1aa1f1d591ba9d" 726 | "checksum nom 4.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2ad2a91a8e869eeb30b9cb3119ae87773a8f4ae617f41b1eb9c154b2905f7bd6" 727 | "checksum openssl-probe 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "77af24da69f9d9341038eba93a073b1fdaaa1b788221b00a69bce9e762cb32de" 728 | "checksum openssl-sys 0.9.35 (registry+https://github.com/rust-lang/crates.io-index)" = "912f301a749394e1025d9dcddef6106ddee9252620e6d0a0e5f8d0681de9b129" 729 | "checksum peeking_take_while 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099" 730 | "checksum percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "31010dd2e1ac33d5b46a5b413495239882813e0369f8ed8a5e266f173602f831" 731 | "checksum pkg-config 0.3.13 (registry+https://github.com/rust-lang/crates.io-index)" = "104630aa1c83213cbc76db0703630fcb0421dac3585063be4ce9a8a2feeaa745" 732 | "checksum proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)" = "4d317f9caece796be1980837fd5cb3dfec5613ebdb04ad0956deea83ce168915" 733 | "checksum quick-error 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9274b940887ce9addde99c4eee6b5c44cc494b182b97e73dc8ffdcb3397fd3f0" 734 | "checksum quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)" = "6ce23b6b870e8f94f81fb0a363d65d86675884b34a09043c81e5562f11c1f8e1" 735 | "checksum redox_syscall 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)" = "c214e91d3ecf43e9a4e41e578973adeb14b474f2bee858742d127af75a0112b1" 736 | "checksum redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7e891cfe48e9100a70a3b6eb652fef28920c117d366339687bd5576160db0f76" 737 | "checksum regex 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3d8c9f33201f46669484bacc312b00e7541bed6aaf296dffe2bb4e0ac6b8ce2a" 738 | "checksum regex-syntax 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)" = "dcfd8681eebe297b81d98498869d4aae052137651ad7b96822f09ceb690d0a96" 739 | "checksum rustc-demangle 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "bcfe5b13211b4d78e5c2cadfebd7769197d95c639c35a50057eb4c05de811395" 740 | "checksum scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "94258f53601af11e6a49f722422f6e3425c52b06245a5cf9bc09908b174f5e27" 741 | "checksum strsim 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bb4f380125926a99e52bc279241539c018323fab05ad6368b56f93d9369ff550" 742 | "checksum syn 0.14.8 (registry+https://github.com/rust-lang/crates.io-index)" = "b7bfcbb0c068d0f642a0ffbd5c604965a360a61f99e8add013cef23a838614f3" 743 | "checksum syn 0.15.44 (registry+https://github.com/rust-lang/crates.io-index)" = "9ca4b3b69a77cbe1ffc9e198781b7acb0c7365a883670e8f1c1bc66fba79a5c5" 744 | "checksum synstructure 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "85bb9b7550d063ea184027c9b8c20ac167cd36d3e06b3a40bceb9d746dc1a7b7" 745 | "checksum termcolor 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "4096add70612622289f2fdcdbd5086dc81c1e2675e6ae58d6c4f62a16c6d7f2f" 746 | "checksum termion 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "689a3bdfaab439fd92bc87df5c4c78417d3cbe537487274e9b0b2dce76e92096" 747 | "checksum textwrap 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "307686869c93e71f94da64286f9a9524c0f308a9e1c87a583de8e9c9039ad3f6" 748 | "checksum thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c6b53e329000edc2b34dbe8545fd20e55a333362d0a321909685a19bd28c3f1b" 749 | "checksum ucd-util 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "fd2be2d6639d0f8fe6cdda291ad456e23629558d466e2789d2c3e9892bda285d" 750 | "checksum unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "49f2bd0c6468a8230e1db229cff8029217cf623c767ea5d60bfbd42729ea54d5" 751 | "checksum unicode-normalization 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "6a0180bc61fc5a987082bfa111f4cc95c4caff7f9799f3e46df09163a937aa25" 752 | "checksum unicode-width 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "882386231c45df4700b275c7ff55b6f3698780a650026380e72dabe76fa46526" 753 | "checksum unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc" 754 | "checksum url 1.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2a321979c09843d272956e73700d12c4e7d3d92b2ee112b31548aef0d4efc5a6" 755 | "checksum utf8-ranges 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "662fab6525a98beff2921d7f61a39e7d59e0b425ebc7d0d9e66d316e55124122" 756 | "checksum vcpkg 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "a51475940ea5ed2f7ba8e7b867c42d6cb7f06fafb9c1673ed8e768c675c771cc" 757 | "checksum vec_map 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "05c78687fb1a80548ae3250346c3db86a80a7cdd77bda190189f2d0a0987c81a" 758 | "checksum version_check 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "7716c242968ee87e5542f8021178248f267f295a5c4803beae8b8b7fd9bc6051" 759 | "checksum which 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "e84a603e7e0b1ce1aa1ee2b109c7be00155ce52df5081590d1ffb93f4f515cb2" 760 | "checksum winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "773ef9dcc5f24b7d850d0ff101e542ff24c3b090a9768e03ff889fdef41f00fd" 761 | "checksum winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" 762 | "checksum winapi-util 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7168bab6e1daee33b4557efd0e95d5ca70a03706d39fa5f3fe7a236f584b03c9" 763 | "checksum winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" 764 | "checksum wincolor 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "561ed901ae465d6185fa7864d63fbd5720d0ef718366c9a4dc83cf6170d7e9ba" 765 | -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "magit-libgit2" 3 | version = "0.1.0" 4 | edition = "2018" 5 | authors = ["Nguyễn Tuấn Anh "] 6 | publish = false 7 | 8 | [lib] 9 | crate-type = ["cdylib"] 10 | 11 | [dependencies] 12 | emacs = { version = "0.11.0" } 13 | git2 = "0.6" 14 | 15 | [dev-dependencies] 16 | emacs-rs-module = { version = "0.11.0" } 17 | -------------------------------------------------------------------------------- /README.org: -------------------------------------------------------------------------------- 1 | * Experimental libgit2 support for magit 2 | *Note*: Do not use this, unless you are interested in Rust. Magit is getting its [[https://github.com/magit/libegit2][own libgit2 binding]] through C. 3 | 4 | ** Installation 5 | Install Rust tool chain. 6 | Build the dylib: 7 | #+begin_src shell 8 | cargo build 9 | cd target/debug 10 | ln -s libmagit_libgit2.dylib magit-libgit2.so 11 | #+end_src 12 | Load it in Emacs: 13 | #+begin_src lisp 14 | (add-to-list 'load-path "/path/to/magit-libgit2/target/debug") 15 | (require 'magit-libgit2) 16 | (add-to-list 'load-path "/path/to/magit-libgit2/elisp") 17 | (require 'magit-libgit2-x) 18 | #+end_src 19 | 20 | ** Development 21 | #+begin_src bash 22 | cargo install cargo-watch 23 | #+end_src 24 | 25 | *** Interactive development 26 | In Emacs: 27 | #+begin_src lisp 28 | (server-start) 29 | #+end_src 30 | 31 | Recompile and reload the module every time the code changes: 32 | #+begin_src bash 33 | cargo watch -x build -s ./bin/load.sh 34 | #+end_src 35 | 36 | Note: Don't add =/path/to/magit-libgit2/target/debug= to =load-path=. Don't use Emacs's default loading mechanism. 37 | 38 | *** Continuous testing 39 | #+begin_src bash 40 | cargo watch -x build -s ./bin/test.sh 41 | #+end_src 42 | -------------------------------------------------------------------------------- /bin/load.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # (Re)load the dynamic module into a running Emacs instance. 4 | 5 | system=`uname` 6 | if [[ $system == "Linux" ]]; then 7 | ext="so" 8 | elif [[ $system == "Darwin" ]]; then 9 | ext="dylib" 10 | else 11 | echo "Unsupported system: $system" 12 | exit 1 13 | fi 14 | 15 | here=`cd $(dirname $BASH_SOURCE); pwd` 16 | root=`cd $here/..; pwd` 17 | RS_MODULE=$(find $root -iname "*emacs_rs_module*.$ext" | head -n 1) 18 | MODULE=$root/target/debug/libmagit_libgit2.$ext 19 | MODULE_X=$root/elisp/magit-libgit2-x.el 20 | 21 | read -r -d '' expr < (length args) 1) 15 | (apply orig args) 16 | (let ((arg (nth 0 args))) 17 | (if (string-prefix-p "--" arg) 18 | (apply orig args) ;not rev 19 | (magit-libgit2/rev-parse default-directory arg))))) 20 | 21 | (advice-add 'magit-rev-parse :around #'magit-rev-parse--libgit2) 22 | 23 | (provide 'magit-libgit2-x) 24 | ;;; magit-libgit2-x ends here 25 | -------------------------------------------------------------------------------- /src/lib.rs: -------------------------------------------------------------------------------- 1 | use emacs::{defun, Env, Result}; 2 | use git2::Repository; 3 | 4 | emacs::plugin_is_GPL_compatible!(); 5 | 6 | #[emacs::module(separator = "/")] 7 | fn init(_: &Env) -> Result<()> { 8 | Ok(()) 9 | } 10 | 11 | /// Parse the given rev using libgit2. 12 | #[defun] 13 | fn rev_parse(path: String, spec: String) -> Result { 14 | let repo = Repository::discover(&path)?; 15 | let obj = repo.revparse_single(&spec)?; 16 | Ok(obj.id().to_string()) 17 | } 18 | --------------------------------------------------------------------------------