Source

chicken-git / git.wiki

Full commit
   1
   2
   3
   4
   5
   6
   7
   8
   9
  10
  11
  12
  13
  14
  15
  16
  17
  18
  19
  20
  21
  22
  23
  24
  25
  26
  27
  28
  29
  30
  31
  32
  33
  34
  35
  36
  37
  38
  39
  40
  41
  42
  43
  44
  45
  46
  47
  48
  49
  50
  51
  52
  53
  54
  55
  56
  57
  58
  59
  60
  61
  62
  63
  64
  65
  66
  67
  68
  69
  70
  71
  72
  73
  74
  75
  76
  77
  78
  79
  80
  81
  82
  83
  84
  85
  86
  87
  88
  89
  90
  91
  92
  93
  94
  95
  96
  97
  98
  99
 100
 101
 102
 103
 104
 105
 106
 107
 108
 109
 110
 111
 112
 113
 114
 115
 116
 117
 118
 119
 120
 121
 122
 123
 124
 125
 126
 127
 128
 129
 130
 131
 132
 133
 134
 135
 136
 137
 138
 139
 140
 141
 142
 143
 144
 145
 146
 147
 148
 149
 150
 151
 152
 153
 154
 155
 156
 157
 158
 159
 160
 161
 162
 163
 164
 165
 166
 167
 168
 169
 170
 171
 172
 173
 174
 175
 176
 177
 178
 179
 180
 181
 182
 183
 184
 185
 186
 187
 188
 189
 190
 191
 192
 193
 194
 195
 196
 197
 198
 199
 200
 201
 202
 203
 204
 205
 206
 207
 208
 209
 210
 211
 212
 213
 214
 215
 216
 217
 218
 219
 220
 221
 222
 223
 224
 225
 226
 227
 228
 229
 230
 231
 232
 233
 234
 235
 236
 237
 238
 239
 240
 241
 242
 243
 244
 245
 246
 247
 248
 249
 250
 251
 252
 253
 254
 255
 256
 257
 258
 259
 260
 261
 262
 263
 264
 265
 266
 267
 268
 269
 270
 271
 272
 273
 274
 275
 276
 277
 278
 279
 280
 281
 282
 283
 284
 285
 286
 287
 288
 289
 290
 291
 292
 293
 294
 295
 296
 297
 298
 299
 300
 301
 302
 303
 304
 305
 306
 307
 308
 309
 310
 311
 312
 313
 314
 315
 316
 317
 318
 319
 320
 321
 322
 323
 324
 325
 326
 327
 328
 329
 330
 331
 332
 333
 334
 335
 336
 337
 338
 339
 340
 341
 342
 343
 344
 345
 346
 347
 348
 349
 350
 351
 352
 353
 354
 355
 356
 357
 358
 359
 360
 361
 362
 363
 364
 365
 366
 367
 368
 369
 370
 371
 372
 373
 374
 375
 376
 377
 378
 379
 380
 381
 382
 383
 384
 385
 386
 387
 388
 389
 390
 391
 392
 393
 394
 395
 396
 397
 398
 399
 400
 401
 402
 403
 404
 405
 406
 407
 408
 409
 410
 411
 412
 413
 414
 415
 416
 417
 418
 419
 420
 421
 422
 423
 424
 425
 426
 427
 428
 429
 430
 431
 432
 433
 434
 435
 436
 437
 438
 439
 440
 441
 442
 443
 444
 445
 446
 447
 448
 449
 450
 451
 452
 453
 454
 455
 456
 457
 458
 459
 460
 461
 462
 463
 464
 465
 466
 467
 468
 469
 470
 471
 472
 473
 474
 475
 476
 477
 478
 479
 480
 481
 482
 483
 484
 485
 486
 487
 488
 489
 490
 491
 492
 493
 494
 495
 496
 497
 498
 499
 500
 501
 502
 503
 504
 505
 506
 507
 508
 509
 510
 511
 512
 513
 514
 515
 516
 517
 518
 519
 520
 521
 522
 523
 524
 525
 526
 527
 528
 529
 530
 531
 532
 533
 534
 535
 536
 537
 538
 539
 540
 541
 542
 543
 544
 545
 546
 547
 548
 549
 550
 551
 552
 553
 554
 555
 556
 557
 558
 559
 560
 561
 562
 563
 564
 565
 566
 567
 568
 569
 570
 571
 572
 573
 574
 575
 576
 577
 578
 579
 580
 581
 582
 583
 584
 585
 586
 587
 588
 589
 590
 591
 592
 593
 594
 595
 596
 597
 598
 599
 600
 601
 602
 603
 604
 605
 606
 607
 608
 609
 610
 611
 612
 613
 614
 615
 616
 617
 618
 619
 620
 621
 622
 623
 624
 625
 626
 627
 628
 629
 630
 631
 632
 633
 634
 635
 636
 637
 638
 639
 640
 641
 642
 643
 644
 645
 646
 647
 648
 649
 650
 651
 652
 653
 654
 655
 656
 657
 658
 659
 660
 661
 662
 663
 664
 665
 666
 667
 668
 669
 670
 671
 672
 673
 674
 675
 676
 677
 678
 679
 680
 681
 682
 683
 684
 685
 686
 687
 688
 689
 690
 691
 692
 693
 694
 695
 696
 697
 698
 699
 700
 701
 702
 703
 704
 705
 706
 707
 708
 709
 710
 711
 712
 713
 714
 715
 716
 717
 718
 719
 720
 721
 722
 723
 724
 725
 726
 727
 728
 729
 730
 731
 732
 733
 734
 735
 736
 737
 738
 739
 740
 741
 742
 743
 744
 745
 746
 747
 748
 749
 750
 751
 752
 753
 754
 755
 756
 757
 758
 759
 760
 761
 762
 763
 764
 765
 766
 767
 768
 769
 770
 771
 772
 773
 774
 775
 776
 777
 778
 779
 780
 781
 782
 783
 784
 785
 786
 787
 788
 789
 790
 791
 792
 793
 794
 795
 796
 797
 798
 799
 800
 801
 802
 803
 804
 805
 806
 807
 808
 809
 810
 811
 812
 813
 814
 815
 816
 817
 818
 819
 820
 821
 822
 823
 824
 825
 826
 827
 828
 829
 830
 831
 832
 833
 834
 835
 836
 837
 838
 839
 840
 841
 842
 843
 844
 845
 846
 847
 848
 849
 850
 851
 852
 853
 854
 855
 856
 857
 858
 859
 860
 861
 862
 863
 864
 865
 866
 867
 868
 869
 870
 871
 872
 873
 874
 875
 876
 877
 878
 879
 880
 881
 882
 883
 884
 885
 886
 887
 888
 889
 890
 891
 892
 893
 894
 895
 896
 897
 898
 899
 900
 901
 902
 903
 904
 905
 906
 907
 908
 909
 910
 911
 912
 913
 914
 915
 916
 917
 918
 919
 920
 921
 922
 923
 924
 925
 926
 927
 928
 929
 930
 931
 932
 933
 934
 935
 936
 937
 938
 939
 940
 941
 942
 943
 944
 945
 946
 947
 948
 949
 950
 951
 952
 953
 954
 955
 956
 957
 958
 959
 960
 961
 962
 963
 964
 965
 966
 967
 968
 969
 970
 971
 972
 973
 974
 975
 976
 977
 978
 979
 980
 981
 982
 983
 984
 985
 986
 987
 988
 989
 990
 991
 992
 993
 994
 995
 996
 997
 998
 999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
[[tags: egg]]

== git

[[toc:]]

=== Description

Bindings to the [[http://libgit2.github.com|libgit2]] library.

This library requires libgit2 0.20.0 and Chicken 4.7 or newer.

The source for this egg is available at [[https://bitbucket.org/evhan/chicken-git]].

=== Documentation

{{git}} provides an interface for reading & manipulating git repositories.
The library is split into two modules, {{git}} and {{git-lolevel}}:

* {{git-lolevel}} is essentially just the libgit2 API, thinly wrapped. Most of
  the function signatures remain the same, with a few exceptions: 

** Structures & pointers that would go on the stack are allocated
automatically.

** Return values are checked where appropriate, signaling an exception of type
{{git}} when negative.

** Pointer arrays are converted to rest arguments.

* {{git}} is a higher-level interface around {{git-lolevel}}, providing
  record types for each libgit2 structure.

The following documentation applies to the {{git}} module.

=== Usage

  (use git) ; or...
  (use git-lolevel)

It's not recommended to mix the two without prefixing one or the other's
imports, as the two libraries share many identifiers.

=== API

==== Repository

<record>repository</record>
<procedure>(repository? obj) => boolean</procedure>

A {{repository}} corresponds to an on-disk Git repository.

<procedure>(create-repository [path [bare]]) => repository</procedure>

Creates & returns a new repository at the given {{path}}, or the value of
{{current-directory}} if no path is given. If {{bare}} is given and not {{#f}},
the repository will be created without a working directory. An error is
signaled if the path is invalid or the repository cannot be created.

<procedure>(repository-open [path]) => repository</procedure>

Opens the Git repository indicated by {{path}}, or the value of
{{current-directory}} if no {{path}} is given. {{path}} may point to a bare
repository, a working directory containing a ".git" directory, or a ".git"
directory directly.

<procedure>(repository-path repository) => string</procedure>

Returns the absolute path to the given {{repository}}'s Git directory,
either the topmost directory in the project (if the repository is bare)
or the ".git" subdirectory.

<procedure>(repository-working-directory repository) => string</procedure>

Returns the absolute path to the given {{repository}}'s working directory,
or {{#f}} if the repository is bare.

<procedure>(repository-ref repository ref) => object</procedure>

Looks up a Git object in the given {{repository}}. {{ref}} may be a SHA1 string,
{{oid}}, {{reference}}, {{blob}}, {{commit}}, {{tag}} or {{tree}}. The returned
object will be of type {{blob}}, {{commit}}, {{tag}} or {{tree}}, or {{#f}} if
no object matching the given {{ref}} is found.

<procedure>(repository-empty? repository) => boolean</procedure>
<procedure>(repository-bare? repositoy) => boolean</procedure>

Returns a boolean indicating whether the given {{repository}} is empty
(contains no commits) or bare (an exposed git directory without a working
directory).

<procedure>(repository-head-orphan? repositoy) => boolean</procedure>
<procedure>(repository-head-detached? repositoy) => boolean</procedure>

Returns a boolean indicating whether the given repository's {{HEAD}} (a
symbolic reference) is orphaned (unreferenced under the refs namespace)
or detached (refering to a commit rather than a branch).

==== OID

<record>oid</record>
<procedure>(oid? obj) => boolean</procedure>

An {{oid}} is a unique reference to a Git object, corresponding to a
40-character SHA1 object name.

<procedure>(string->oid string) => oid</procedure>

Creates an {{oid}} from the given string, which should be a 40-character SHA1
hash. An error is signaled if the string is not a valid hash.

<procedure>(oid->string oid [length]) => string</procedure>

Returns the string representation of the given {{oid}}. The optional integer
{{length}} specifies the length of the returned string, up to 40 characters.

<procedure>(oid->path oid) => string</procedure>

Returns the string representation of the given {{oid}} in the form "xx/...",
where "xx" is the first two characters of the SHA1 and "..." is the remainder.

<procedure>(oid=? oid1 oid2) => boolean</procedure>

Indicates whether the two {{oid}}s are the equivalent.

==== Revspec

<procedure>(parse-revision-specification string) => (values object object)</procedure>

Attempts to parse a string as a Git revision specification, returning
two values:

* If {{string}} specifies a range of revisions, the start & end
  {{commit}} objects.
* If {{string}} specifies a single revision, the {{commit}} object and
  {{#f}}.
* If {{string}} is invalid or fails to match a revision, {{#f}} for both
  values.

For more information about specifying revisions, see
[[http://git-scm.com/docs/git-rev-parse.html#_specifying_revisions]].

==== Reference

<record>reference</record>
<procedure>(reference? obj) => boolean</procedure>

A {{reference}} is a direct or indirect pointer to a Git commit object. A
repository's {{HEAD}} is a common example: it is a symbolic reference,
referring to the immediate reference {{"refs/heads/master"}}, which in turn
points at a {{commit}}.

<procedure>(reference repository ref) => reference</procedure>

Returns the {{reference}} specified by the given string {{ref}} from the
{{repository}}. {{ref}} must be a string referring to a valid reference, such
as {{HEAD}}, {{"ref/heads/master"}}, or {{"refs/tags/v0.1.0"}}. An error is
signalled if the reference doesn't exists.

<procedure>(reference-name reference) => string</procedure>

Returns the name of the given {{reference}}.

<procedure>(reference-type reference) => symbol</procedure>

Returns the type symbol of the given {{reference}}, which will be either
{{oid}} or {{symbolic}}.

<procedure>(reference-remote? reference) => boolean</procedure>
<procedure>(reference-branch? reference) => boolean</procedure>
<procedure>(reference-tag? reference) => boolean</procedure>

These procedures return boolean values indicating whether the given
reference is a {{remote}}, {{branch}}, or {{tag}}-type reference,
respectively.

<procedure>(references-fold kons knil repository [glob]) => object</procedure>

Folds over the given {{repository}}'s references in unspecified order.

An optional {{glob}} pattern string may be used to filter the references
returned. If given, it will be matched in "glob" style where a {{#\?}}
matches any letter, a {{#\*}} matches any sequence of letters, and
square brackets match a range of characters (such as "[0-9]" for
digits). If no {{glob}} is given, all references will be provided to
{{kons}}.

<procedure>(references repository [type]) => (list-of reference)</procedure>

Returns a list of all references in the given {{repository}}. A type
symbol may be given to filter the references, as in {{references-fold}}.
The order of the resulting list is unspecified.

<procedure>(repository-head repository) => reference</procedure>

Returns a reference to this repository's HEAD (resolved to an OID), of
{{#f}} if it doesn't exist.

<procedure>(reference-resolve reference) => reference</procedure>

Recursively dereferences the given (possibly symbolic) {{reference}},
returning a new non-symbolic {{reference}} pointing refering directly to
an {{oid}}.

<procedure>(reference-target reference) => oid</procedure>

Returns the {{oid}} of the object which the given {{reference}} refers.
Symbolic references are peeled until a non-symbolic reference is found,
as with {{reference-resolve}}.

<procedure>(reference-rename reference name [force]) => reference</procedure>
<procedure>(reference-target-set! reference target) => void</procedure>

{{reference-rename}} changes the name of the given {{reference}} to the
string {{name}} and returns the newly-updated {{reference}}. If
{{force}} is given and nonfalse, any previously-existing {{reference}}
of the given {{name}} will be overwritten.

{{reference-target-set!}} updates a {{reference}} to refer to the given
{{target}}. If {{reference}} is an immediate reference (referring to an object
ID), {{target}} must be an {{oid}}, {{commit}}, or SHA1 string. If
{{reference}} is symbolic, {{target}} must be a {{reference}} or reference
name. It is an error to assign a symbolic reference an OID target and
vice-versa.

On success, the on-disk repository is updated immediately.

<procedure>(create-reference repository #!key name target [symbolic] [force]) => reference</procedure>

Creates & returns a new reference in the given {{repository}} for the specified
{{name}} and {{target}}. If {{symbolic}} is given and not {{#f}}, the created
reference will be so, and {{target}} must be a reference name or {{reference}}.
Otherwise, {{target}} must be a SHA1 string, {{oid}}, {{commit}} or
{{reference}} to a {{commit}}. If a reference of the given {{name}} exists and
{{force}} is not given or {{#f}}, an error is signalled. Otherwise, creation
is forced and the old reference will be overwritten.

On success, the on-disk repository is updated immediately.

<procedure>(reference-delete reference) => void</procedure>

Deletes the given {{reference}} from its repository.

On success, the on-disk repository is updated immediately.

==== Branch

<procedure>(create-branch repository name target [force]) => reference</procedure>

Creates a new branch in the given {{repository}} of the given {{name}} and
{{target}} and returns a {{reference}} to the new branch. {{target}} must be a
{{commit}} or {{tag}} belonging to the repository. If a branch of the given
{{name}} exists and {{force}} is not given or {{#f}}, an error is signalled.
Otherwise, creation is forced and the old branch is be overwritten.

On success, the on-disk repository is updated immediately.

<procedure>(branches-fold kons knil repository [type]) => object</procedure>

Folds over the given {{repository}}'s branches.

A {{type}} symbol may be given, either {{local}}, {{remote}}, or
{{all}}, to specify what type of branches should be listed; by default,
{{all}} is used.

<procedure>(branches repository [type]) => (list-of branch)</procedure>

Returns a list {{reference}} objects for each branch in the given
{{repository}}. A type symbol may be given to filter the branches, as in
{{branches-fold}}. The order of the resulting list is unspecified.

<procedure>(branch-name reference) => string</procedure>

Returns the name of the given branch {{reference}}. This is similar to
{{reference-name}}, but the leading reference namespace (e.g.
"refs/heads") is omitted.

<procedure>(branch-rename reference name [force]) => reference</procedure>

Renames the given branch {{reference}} to {{name}}, which should be a
string. If {{force}} is given and not false, any existing branch with
the given name will be overwritten. A new, renamed {{reference}} is
returned.

On success, the on-disk repository is updated immediately.

<procedure>(branch-delete reference) => void</procedure>

Deletes the given branch {{reference}} from its repository.

On success, the on-disk repository is updated immediately.

==== Generic Procedures

These procedures can be used on any objects of the four main Git object
types: {{commit}}, {{tree}}, {{tag}} and {{blob*}}.

<procedure>(object-id object) => oid</procedure>

Returns the {{oid}} of the given object, which must be a {{commit}},
{{tree}}, {{tag}} or {{blob}}.

<procedure>(object-sha object [length]) => string</procedure>

Returns the SHA1 identifier corresponding to the given object, which may be a
{{commit}}, {{tree}}, {{tag}} {{blob}}, {{reference}}, {{oid}} or {{string}}.

<procedure>(object-type object) => symbol</procedure>

Returns a symbol specifying the type of the given object, which must be
a {{commit}}, {{tree}}, {{tag}} or {{blob}}. {{#f}} is returned if the
object's type cannot be determined.

<procedure>(object=? object1 object2) => boolean</procedure>

Indicates whether the two Git objects represent the same thing (judging
by their respective {{oid}}s). Each object should be of type {{commit}},
{{tree}}, {{tag}} or {{blob}}.

==== Blob

<record>blob</record>
<procedure>(blob? obj) => boolean</procedure>

A {{blob}} corresponds to Git's Blob object type. It represents a chunk
of data, generally a file.

Beware name collisions with CHICKEN's built-in {{blob}} data type.

<procedure>(blob repository ref) => blob</procedure>

Returns the {{blob}} specified by the given {{ref}} from the repository.
{{ref}} may be a SHA1 string, {{oid}}, or {{blob}}. An error is signaled if
no such {{blob}} exists.

<procedure>(blob-id commit) => oid</procedure>

Returns the {{oid}} of the given {{blob}}.

<procedure>(blob-content blob) => blob</procedure>

Returns a blob (of the CHICKEN built-in type) of the contents of the
given {{blob}} (of the Git object type).

<procedure>(blob-length blob) => int</procedure>

Returns the size in bytes of the given {{blob}}.

<procedure>(blob-binary? blob) => boolean</procedure>

Indicates whether the given {{blob}} is (likely to be) a binary chunk
or not.

<procedure>(create-blob repository source) => blob</procedure>

Creates a new {{blob}} in the given {{repository}}.

{{source}} is the data source for the {{blob}}, and may be a blob (of
the CHICKEN built-in type) or a pathname string indicating a file on the
local disk or, if such a file isn't present, a file relative to the
repository's working directory.

On success, the on-disk repository is updated immediately.

==== Commit

<record>commit</record>
<procedure>(commit? obj) => boolean</procedure>

A {{commit}} corresponds to Git's commit object type.

<procedure>(commit repository ref) => commit</procedure>

Returns the {{commit}} specified by the given {{ref}} from the repository.
{{ref}} may be a SHA1 string, {{oid}}, {{reference}} or {{commit}}. An error
is signaled if no such {{commit}} exists.

<procedure>(commits-fold kons knil repository #!key [initial] [hide] [sort]) => object</procedure>

Folds over the given {{repository}}'s commits. If an {{initial}}
{{commit}} or SHA1 is given, only commits that are ancestors of that
revision will be returned. If a list of revisions to {{hide}} is given,
they and their ancestors will be ignored. If a {{sort}} order is
specified, commits will be collected in the given order; this sort order
must be one of the symbols {{none}}, {{topo}}, {{time}} or {{reverse}},
or a list of such symbols.

<procedure>(commits repository #!rest args) => (list-of commit)</procedure>

Returns a list of the {{commit}}s in the given {{repository}}. {{args}}
follows the {{#!key}} arguments specification for {{commits-fold}}. The
order of the resulting list is opposite that of a call to
{{commits-fold}} with the same arguments.

<procedure>(commit-id commit) => oid</procedure>

Returns the {{oid}} for the given {{commit}}.

<procedure>(commit-time commit) => int</procedure>
<procedure>(commit-time-offset commit) => int</procedure>

{{commit-time}} and {{commit-time-offset}} return the timestamp of the given
{{commit}} and its UTC offset in minutes, respectively.

<procedure>(commit-message commit) => string</procedure>
<procedure>(commit-message-encoding commit) => string</procedure>

Returns the full commit message or message encoding for the given
{{commit}}.

<procedure>(commit-tree commit) => tree</procedure>
<procedure>(commit-tree-id commit) => oid</procedure>

Return the {{tree}} associated with the given {{commit}} and its {{oid}},
respectively.

<procedure>(commit-author commit) => signature</procedure>
<procedure>(commit-committer commit) => signature</procedure>

{{commit-author}} and {{commit-committer}} return the given {{commit}}'s
respective {{signature}}s.

<procedure>(commit-parentcount commit) => int</procedure>
<procedure>(commit-parent commit [n]) => commit</procedure>
<procedure>(commit-parents commit) => (list-of commit)</procedure>
<procedure>(commit-ancestor commit [n]) => commit</procedure>

{{commit-parentcount}} returns the number of parents of the given
{{commit}}.

{{commit-parent}} returns the {{n}}th parent of the given {{commit}}, or
the first parent if no {{n}} is given. If the {{commit}} has no parent,
{{#f}} is returned.

{{commit-parents}} returns the possibly-empty list of all parents of the
given {{commit}}. The order of this list is unspecified.

{{commit-ancestor}} returns the {{n}}th ancestor of the given commit, or
{{#f}} is no such ancestor exists. {{n}} defaults to {{1}}, meaning the
{{commit}}'s first parent (making {{(commit-ancestor c 1)}} equivalent
to {{(commit-parent c)}}).

<procedure>(create-commit repository #!key message author [committer] [tree] [parents] [reference]) => commit</procedure>

Creates & returns a new commit in the given {{repository}}. The string
{{message}} will be used as the commit's message and {{tree}} will be
the file tree of the commit. If no {{tree}} is given, the current state
of the repository's {{index}} is used. {{parents}} may be be a (possibly
empty) list of commits to be used as this commit's ancestors. {{author}}
and {{committer}} should be signatures; if {{committer}} is not given,
{{author}} will be used for both. {{reference}}, if given and not
{{#f}}, should be the {{reference}} or name of a {{reference}} that will
be updated to point to the newly-created commit.

Note that if no {{reference}} is given, the commit will be created in
Git's database but will not be reflected in any of the repository's
branches. To update the the working branch with the new commit, for
example, use {{"HEAD"}}.

On success, the on-disk repository is updated immediately.

<procedure>(merge-base repository commit1 commit2) => commit</procedure>

Returns the nearest common ancestor for the given commits. {{commit1}} and
{{commit2}} may be {{commit}}s, commit {{oid}}s, or SHA1 hashes.

==== Tag

<record>tag</record>
<procedure>(tag? obj) => boolean</procedure>

A {{tag}} corresponds to Git's Tag object type, which is a way to mark a
specific object as special in some way.

<procedure>(tag repository ref) => tag</procedure>

Creates & returns the {{tag}} specified by the given {{ref}} from the
repository. {{ref}} may be a SHA1 string, {{oid}}, or {{tag}}. An error is
signaled if no such {{tag}} exists.

<procedure>(tags-fold kons knil repository) => object</procedure>

Folds over the given repository's {{tag}}s in unspecified order.

<procedure>(tags repository) => (list-of tag)</procedure>

Returns a list of all tags in the given {{repository}}. The order of
the resulting list is unspecified.

<procedure>(tag-id tag) => oid</procedure>

Returns the {{oid}} for the given {{tag}}.

<procedure>(tag-type tag) => symbol</procedure>

Returns the object type symbol of the target of the given {{tag}}, which will
be one of {{commit}}, {{tree}}, {{blob}}, or {{tag}}.

<procedure>(tag-name tag) => string</procedure>
<procedure>(tag-message tag) => string</procedure>

Return the name or message of the given {{tag}}.

<procedure>(tag-tagger tag) => signature</procedure>

Returns the {{signature}} of the {{tag}}'s creator.

<procedure>(tag-peel tag) => object</procedure>

Recursively dereferences the given {{tag}} until a non-tag object to
which it refers is found (and returned).

<procedure>(tag-target tag) => object</procedure>
<procedure>(tag-peel tag) => object</procedure>

{{tag-target}} returns the object referred to by {{tag}}, which will be of type
{{commit}}, {{tree}}, {{blob}} or {{tag}}.

Returns the object immediately referred to by {{tag}}, which will be of
type {{commit}}, {{tree}}, {{blob}} or {{tag}}.

<procedure>(tag-delete tag) => void</procedure>

Destroys the given {{tag}}.

On success, the on-disk repository is updated immediately.

<procedure>(create-tag repository #!key target name message tagger [force]) => tag</procedure>

Creates & returns a new tag in the given {{repository}} for the specified
{{name}}, {{message}} and {{target}}. {{name}} and {{message}} must be strings,
{{tagger}} must be a {{signature}},and {{target}} must be a {{commit}},
{{tree}} or {{blob}}. If a tag of the given {{name}} exists and {{force}} is
not given or {{#f}}, an error is signalled.  Otherwise, creation is forced and
the old tag will be overwritten.

On success, the on-disk repository is updated immediately.

==== Tree

<record>tree</record>
<procedure>(tree? obj) => boolean</procedure>

A {{tree}} corresponds to Git's Tree object type, which represents a directory
tree.

<procedure>(tree repository ref) => tree</procedure>

Returns the {{tree}} specified by the given {{ref}} from the repository. {{ref}}
may be a SHA1 string, {{oid}}, or {{tree}}. An error is signaled if no such
{{tree}} exists.

<procedure>(tree-id tree) => oid</procedure>

Returns the {{oid}} for the given {{tree}}.

<procedure>(tree-entrycount tree) => int</procedure>

Returns the number of entries in the given {{tree}}. This count does not
include entries of contained directories.

<procedure>(tree-ref tree key) => tree-entry</procedure>

Returns a {{tree-entry}} object for the given {{key}} from the tree, or
{{#f}} if no such tree entry is found. {{key}} may be a zero-based
integer index or a pathname string relative to the repository's working
directory.

<procedure>(tree-fold kons knil tree) => object</procedure>

Folds over each path and accompanying {{tree-entry}} in the given
{{tree}} in unspecified order.

Note that {{kons}} should be a function of three arguments; the path to
the current {{tree-entry}} (a string, relative to the repository's working
directory), the current {{tree-entry}}, and the current state of the
fold.

<procedure>(tree-entries tree) => (list-of (pair string tree-entry))</procedure>

Returns an alist of all {{tree-entry}} objects in the given {{tree}},
whose keys are pathname strings indicating each {{tree-entry}}'s
location in the tree and whose values are the {{tree-entry}} objects
themselves. The order of the resulting list is unspecified.

<procedure>(create-tree repository [index]) => tree</procedure>

Creates and returns a new {{tree}} object from the state of the given
{{index}} in the given {{repository}}.

If {{index}} is not given, a fresh {{index}} for the repository is used.
This means the resulting {{tree}} will be identical to that of the
repository's {{HEAD}}.

On success, the new value is written immediately to disk.

==== Tree Entry

<record>tree-entry</record>
<procedure>(tree-entry? obj) => boolean</procedure>

A {{tree-entry}} represents a single node in a {{tree}} object.

<procedure>(tree-entry-id tree-entry) => oid</procedure>

Returns the {{oid}} of the given {{tree-entry}}.

<procedure>(tree-entry-name tree-entry) => string</procedure>

Returns the name of the given {{tree-entry}}.

<procedure>(tree-entry-attributes tree-entry) => int</procedure>

Returns the Unix file attributes of the given {{tree-entry}}.

<procedure>(tree-entry-type tree-entry) => symbol</procedure>

Returns the object type symbol, either {{tree}} or {{blob}}, of the given
{{tree-entry}}.

<procedure>(tree-entry->object [repository] tree-entry) => object</procedure>

Returns an object of type {{tree}} or {{blob}} from the given {{tree-entry}}
and {{repository}}, which must be the owner of the {{tree-entry}}.

If no {{repository}} is given, {{tree-entry->object}} will attempt to
determine the owning repository from the {{tree-entry}}. This is only
possible if the {{tree-entry}} belongs to a {{tree}}; if it belongs to a
{{tree-builder}}, instead, an error will be signaled.

==== Tree Builder

<record>tree-builder</record>
<procedure>(tree-builder? obj) => boolean</procedure>

A tree builder provides a way to construct {{tree}} objects in memory and write
them to a repository, without using an index as an intermediary.

<procedure>(make-tree-builder [tree]) => tree-builder</procedure>

Creates a new {{tree-builder}}. If a {{tree}} is given, it is used as the
constructed tree's initial state. Otherwise, it must be populated manually
using {{tree-builder-insert}}.

<procedure>(tree-builder-insert tree-builder object name attributes) => tree-entry</procedure>

Inserts {{object}} into the {{tree-builder}}'s tree under the given filename
{{name}}. The inserted object must be a {{tree}} or {{blob}}, and will have
the given {{attributes}} (an integer file mode).

<procedure>(tree-builder-ref tree-builder path) => tree-entry</procedure>

Returns the {{tree-entry}} from the given {{tree-builder}} at {{path}}, which
should be a filename string. If the requested file doesn't exist, {{#f}} is
returned.

<procedure>(tree-builder-remove tree-builder path) => void</procedure>

Removes the object at the given {{path}} from the {{tree-builder}}'s tree.

<procedure>(tree-builder-write repository tree-builder) => tree</procedure>

Writes the {{tree-builder}}'s current state to the given {{repository}},
modifying the on-disk repository on success. The resulting {{tree}} is
returned.

==== Diff

<record>diff</record>
<procedure>(diff? obj) => boolean</procedure>

A {{diff}} is the cumulative difference between two Git {{tree}}s (or
{{tree}}-like objects). It consists of a number of {{diff-delta}}s, each
of which represents the difference in a single file.

<procedure>(diff repository [object1 [object2]]) => diff</procedure>

Returns a {{diff}} between two objects in the {{repository}}.

{{diff}}'s behavior is as follows, given the following arguments:

* {{()}}: diff the repository's index to its working directory
* {{(index)}}: diff the given index to the repository's working directory
* {{(tree)}}: diff the given tree to the repository's working directory
* {{(tree tree)}}: diff the given trees
* {{(tree index)}}: diff the given tree to the given index

<procedure>(diff-fold kons knil diff) => object</procedure>

Folds over the given {{diff}}'s {{diff-delta}}s in unspecified order.

<procedure>(diff-deltas repository [object1 [object2]]) => (list-of diff-delta)</procedure>

Returns a list of {{diff-deltas}} for the {{diff}} between two objects
in the given {{repository}}. This is equivalent to calling {{(diff
repository object1 object2)}}, then immediately building a list from the
resulting {{diff}} record with {{diff-fold}}.

<record>diff-delta</record>
<procedure>(diff-delta-path diff) => string</procedure>
<procedure>(diff-delta-status diff) => symbol</procedure>
<procedure>(diff-delta-old-file diff) => diff-file</procedure>
<procedure>(diff-delta-new-file diff) => diff-file</procedure>
<record>diff-file</record>
<procedure>(diff-file? obj) => boolean</procedure>
<procedure>(diff-file-id diff-file) => oid</procedure>
<procedure>(diff-file-path diff-file) => string</procedure>
<procedure>(diff-file-size diff-file) => integer</procedure>
<procedure>(diff-file-mode diff-file) => integer</procedure>

A {{diff-delta}} is the difference in a single file between two Git {{tree}}s.
Each diff has a path, a status, a pair of {{diff-file}}s for the old and
new files (retrieved by {{diff-old-file}} and {{diff-new-file}},
respectively), and a list of {{diff-hunk}}s representing individual
changes.

Each {{diff-file}} has an {{id}}, {{path}}, {{size}} and {{mode}} (Unix
file attributes).

<procedure>(diff-status diff) => symbol</procedure>

Returns a symbol representing the status of a {{diff}}, which will be
one of the following symbols, or a list of them if the {{diff}}'s file
is in multiple statuses:

    modified
    added
    deleted
    modified
    renamed
    copied
    ignored
    untracked

<procedure>(diff-patch diff n) => patch</procedure>

Returns a {{patch}} for the {{n}}th {{diff-delta}} in the given
{{diff}}.

<procedure>(diff-patches diff) => patch</procedure>

Returns a list of {{patch}}es for all {{diff-delta}}s in the given
{{diff}}.

<procedure>(diff->string diff) => string</procedure>

Returns a string representation of the given {{diff}} as a patch.

This is equivalent to concatenating the string representations of each
{{patch}} given by {{diff-patches}}.

<procedure>(diff-old-file diff) => diff-file</procedure>
<procedure>(diff-new-file diff) => diff-file</procedure>

Returns the {{diff-file}} object for the old and new file of the given
{{diff}}, respectively. If the file is added or deleted, {{#f}} will be
returned for the diff's old or new file, respectively.

<procedure>(diff-hunks diff) => (list-of diff-hunk)</procedure>

Returns the list of {{diff-hunk}}s in the given {{diff}}.

<record>diff-hunk</record>
<procedure>(diff-hunk? obj) => boolean</procedure>
<procedure>(diff-hunk-header diff) => string</procedure>
<procedure>(diff-hunk-old-lines diff) => integer</procedure>
<procedure>(diff-hunk-old-start diff) => integer</procedure>
<procedure>(diff-hunk-new-lines diff) => integer</procedure>
<procedure>(diff-hunk-new-start diff) => integer</procedure>

A {{diff-hunk}} represents a group of changes in a diff, with some
surrounding context. Each has a header describing the change, line
counts and start offsets for the old and new versions of the hunk, and a
list of {{diff-line}}s representing each added or deleted range of bytes
in the group of changes.

<procedure>(diff-hunk-lines diff) => (list-of diff-line)</procedure>

<record>diff-line</record>
<procedure>(diff-line? obj) => boolean</procedure>
<procedure>(diff-line-origin diff) => char</procedure>
<procedure>(diff-line-content diff) => string</procedure>
<procedure>(diff-line-num-lines diff) => integer</procedure>
<procedure>(diff-line-old-lineno diff) => integer</procedure>
<procedure>(diff-line-new-lineno diff) => integer</procedure>

A {{diff-line}} is a range of bytes in a {{diff-hunk}} and represents
either an addition, a deletion, or a range that is present in both the
old and new versions of the hunk but is included for context. Which of
these a given {{diff-line}} corresponds to is indicated by its
{{diff-line-origin}}, one of {{#\+}}, {{#\-}} or {{#\space}}.

==== Patch

<record>patch</record>
<procedure>(patch? obj) => boolean</procedure>

A {{patch}} is a textual representation of a {{diff-delta}}.

<procedure>(patch->string patch) => string</procedure>

Returns the string representation of the given {{patch}}.

<procedure>(patch-size patch) => integer</procedure>

Returns the total number of bytes in the patch, including hunk and line
headers and context lines.

<procedure>(patch-stats patch) => (vector-of integer integer integer)</procedure>

Returns a three-element vector containing the number of lines of
context, number of lines added, and number of lines deleted in the
patch.

==== Status

<procedure>(file-status repository path) => symbol</procedure>

Returns the status of the file specified by {{path}} in the given
{{repository}}.

This status will be one of the following symbols, or a list of them if
the file is in multiple statuses:

    current
    index/new
    index/modified
    index/deleted
    worktree/new
    worktree/modified
    worktree/deleted
    ignored

<procedure>(file-statuses-fold kons knil repository) => object</procedure>

Folds over each path and the corresponding file's status in the given
{{repository}}'s working directory in unspecified order.

Note that {{kons}} should be a function of three arguments; the pathname
of the current file (a string, relative to the repository's working
directory), the current status symbol, and the current state of the
fold.

<procedure>(file-statuses repository) => (list-of (pair string symbol))</procedure>

Returns an alist of all file statuses in the given {{repository}}, whose
keys are pathnames to each file and whose values are the status symbols
of those files. The order of the resulting list is unspecified.

<procedure>(file-ignored? repository path) => boolean</procedure>

Returns a boolean indicating whether the given {{path}} in {{repository}} is
ignored by Git or not.

==== Note

<record>note</record>
<procedure>(note? obj) => boolean</procedure>

A {{note}} is a type of reference, stored under the {{refs/notes}}
namespace. It's used to associate some data (accessible via
{{note-message}}) with an object.

<procedure>(note-message note) => string</procedure>
<procedure>(note-id note) => oid</procedure>

{{note-message}} and {{note-id}} return the string content and {{oid}}
of the given {{note}}, respectively.

<procedure>(note repository object [reference]) => note</procedure>

Returns the {{note}} associated with the given {{object}} in the
{{repository}}. {{reference}} may be a string specifying an alternative
notes reference namespace, which defaults to {{"refs/notes/commits"}}.
An error is signaled if no such {{note}} exists.

<procedure>(delete-note repository #!key target author [committer] [reference]) => void</procedure>

Deletes all notes for the given object {{target}} by the given
{{author}} in the {{repository}}. {{author}} and {{committer}} should be a
{{signature}}s, while {{reference}} may specify an alternative notes
reference namespace, which defaults to {{"refs/notes/commits"}}.

On success, the note is removed from disk immediately. An error is
signaled if no such {{note}} exists.

<procedure>(create-note repository #!key message target reference author [committer] [force]) => note</procedure>

Creates & returns a new {{note}} in the given {{repository}} with the
specified {{message}} and {{target}} object. {{author}} and
{{committer}} should be {{signature}}s, while {{reference}} may specify
an alternative notes reference namespace, which defaults to
{{"refs/notes/commits"}}. If {{force}} is given and not {{#f}}, an
existing note for the same {{target}} and {{author}}/{{committer}} will
be overwritten; otherwise, an error will be signaled if such a {{note}}
already exists.

On success, the on-disk repository is updated immediately.

<procedure>(notes-fold kons knil repository [reference]) => object</procedure>

Folds over the given {{repository}}'s notes in unspecified order.

{{reference}} may specify an alternative notes reference namespace,
which defaults to {{"refs/notes/commits"}}.

<procedure>(notes repository [reference]) => (list-of note)</procedure>

Returns a list of all notes in the given {{repository}}. The order of
the resulting list is unspecified.

{{reference}} may specify an alternative notes reference namespace,
which defaults to {{"refs/notes/commits"}}.

==== Index

<record>index</record>
<procedure>(index? obj) => boolean</procedure>

An {{index}} represents the on-disk state of Git's working tree. Changes made
to a given {{index}} exist only in memory until written to disk using
{{index-write}}.

<procedure>(index-open repository-or-path) => index</procedure>

It {{repository-or-path}} is a {{repository}}, {{index-open}} returns
the repository's index. If it's a string, {{index-open}} creates and
returns the index at the given path, signaling an error if such an index
doesn't exist. It is not possible to open the index of a bare
repository, and doing so will result in an exception.

<procedure>(index-entrycount index) => int</procedure>

Returns the total number of index entries entries of the given
{{index}}, respectively. This is essentially a count of all files
tracked by Git in a given repository.

<procedure>(index-read index) => void</procedure>

Updates the given {{index}} to reflect the current state of the on-disk
repository.

<procedure>(index-write index) => void</procedure>

Writes the state of the given {{index}} from memory onto disk, modifying
the repository on success.

<procedure>(index-clear index) => void</procedure>

Removes all enries from a given {{index}}.

<procedure>(index-add index path [stage]) => void</procedure>

Adds a given {{path}}, which must refer to a file relative to the index's
repository, to the {{index}}. If an integer {{stage}} is given, it will be used
as the staging number for the changes.

<procedure>(index-remove index ref) => void</procedure>

Removes an entry from the given {{index}}. {{ref}} may be a file path string or
an zero-based integer index. If no entry is removed, {{#f}} is returned.

<procedure>(index-find index path) => int</procedure>

Returns the zero-based integer index of the file specified by {{path}} in the
given {{index}}, signaling an error if it doesn't exist.

<procedure>(index-ref index key [type]) => index-entry</procedure>

Returns the {{index-entry}} from the {{index}} for the given {{key}}, which may
be an zero-based integer index or a pathname string, or {{#f}} if no such entry
exists. If a type symbol is given, either {{merged}} (the default behavior) or
{{unmerged}}, the search will be limited to such entries.

==== Index Entry

<record>index-entry</record>
<procedure>(index-entry? obj) => boolean</procedure>

An {{index-entry}} represents a tracked file in Git's working directory,
belonging to an {{index}}.

<procedure>(index-entry-id index-entry) => oid</procedure>

Returns the {{oid}} referring to the given {{index-entry}}.

<procedure>(index-entry-path index-entry) => string</procedure>

Returns the file path of the given {{index-entry}} relative to the owning
repository's working directory.

<procedure>(index-entry-ctime index-entry) => int</procedure>
<procedure>(index-entry-mtime index-entry) => int</procedure>
<procedure>(index-entry-dev index-entry) => int</procedure>
<procedure>(index-entry-ino index-entry) => int</procedure>
<procedure>(index-entry-size index-entry) => int</procedure>
<procedure>(index-entry-stage index-entry) => int</procedure>
<procedure>(index-entry-uid index-entry) => int</procedure>
<procedure>(index-entry-gid index-entry) => int</procedure>
<procedure>(index-entry-mode index-entry) => int</procedure>
<procedure>(index-entry-flags index-entry) => int</procedure>
<procedure>(index-entry-extended index-entry) => int</procedure>

These methods return the file attributes for the given {{index-entry}} as it
exists in its in-memory {{index}}.

==== ODB

<record>odb</record>
<procedure>(odb? obj) => boolean</procedure>

An {{odb}} offers a direct interface to Git's internal object database.

<procedure>(odb-open repository-or-path) => odb</procedure>

It {{repository-or-path}} is a {{repository}}, returns the repository's
object database. If it is a string, creates and returns the object
database at the given path, signaling an error if no such database
exists.

<procedure>(odb-has-object? odb ref) => boolean</procedure>

Determines if the given {{odb}} contains the given object {{ref}}, which should
be a SHA1 string, {{oid}} or Git object of type {{commit}}, {{blob}}, {{tree}}
or {{tag}}.

<procedure>(odb-read odb ref) => odb-object</procedure>

Reads the given object {{ref}} from the database, signaling an error if it
doesn't exist. {{ref}} should be a SHA1 string, {{oid}} or Git object of type
{{commit}}, {{blob}}, {{tree}} or {{tag}}.

<procedure>(odb-write odb data [type]) => oid</procedure>

Writes a given data {{blob}} to the {{odb}}, returning an {{oid}} referring to
the newly-created object. The type of the stored data can be specified by an
optional {{type}} symbol, which defaults to {{blob}}.

<procedure>(odb-hash odb data [type]) => oid</procedure>

Returns an {{oid}} reference for the given data {{blob}} as though it had been
stored to the given {{odb}} but without writing it to disk. The type of the
hashed data can be specified by an optional {{type}} symbol, which defaults to
{{blob}}.

==== ODB Object

<record>odb-object</record>
<procedure>(odb-object? obj) => boolean</procedure>

An {{odb-object}} is a reference to a blob of data in a Git object database.

<procedure>(odb-object-id odb-object) => oid</procedure>

Returns the {{oid}} for the given {{odb-object}}.

<procedure>(odb-object-size odb-object) => int</procedure>

Returns the size of the {{odb-object}}'s data in bytes.

<procedure>(odb-object-type odb-object) => symbol</procedure>

Returns the object type symbol of the given {{odb-object}}.

<procedure>(odb-object-data odb-object) => blob</procedure>

Returns a blob consisting of the {{odb-object}}'s data.

==== Signature

<record>signature</record>
<procedure>(signature? obj) => boolean</procedure>

A signature is a record of the name, email, time and UTC offset of a given Git
object.

<procedure>(make-signature name email [time [offset]]) => signature</procedure>

Returns a new {{signature}} for the given name and email strings. If a
timestamp {{time}} and integer {{offset}} are given, they will be used as the
signature time; otherwise, the current time will be used.

Unlike the {{create-*}} functions, no representation of this signature is
created in the repository; it exists only in memory until associated with a
{{commit}} or {{tag}}.

<procedure>(signature-name signature) => string</procedure>
<procedure>(signature-email signature) => string</procedure>

{{signature-name}} and {{signature-email}} return strings for the
given {{signature}}'s respective fields.

<procedure>(signature-time signature) => int</procedure>
<procedure>(signature-time-offset signature) => int</procedure>

{{signature-time}} and {{signature-time-offset}} return the timestamp of the
given {{signature}} and its UTC offset in minutes, respectively.

==== Checkout

<procedure>(checkout repository [object]) => void</procedure>

{{checkout}} updates files in the working directory and index of the
given {{repository}} to match the state of {{object}}.

If {{object}} is an {{index}}, the {{repository}}'s working directory
will be updated to match the its state.

If {{object}} is a {{commit}}, {{tag}} or {{tree}}, the {{repository}}'s
working directory and index will both be updated to reflect its state.

If {{object}} is omitted or {{#f}}, the {{repository}}'s working
directory and index will both be updated to match the state of the
repository's {{HEAD}}.

Note that {{checkout}} will silently delete untracked files and
overwrite changes to tracked files in the repository's working
directory.

==== Clone

<procedure>(clone url path) => void</procedure>

Clones the remote Git repository specified by {{url}} into the local
pathname {{path}}.

On success, the branch indicated by the {{HEAD}} reference of the remote
repository is checked out as a normal (i.e. non-bare) Git working
directory.

An error is signaled if the clone fails for any reason.

==== Config

<record>config</record>
<procedure>(config? obj) => boolean</procedure>

A {{config}} represents a Git configuration file, associated with either a
repository, the current user, or the system-wide Git installation.

<procedure>(config-path [type]) => string</procedure>

Returns the path to a Git configuration file, if one exists. {{type}}
may be a symbol specifying the type of path to search, either {{user}},
{{system}} or {{xdg}}, to request the path to the configuration for
the current user, the system-wide Git installation, or the configuration
file path specified by the XDG standard (".config/git/config"),
respectively. {{type}} defaults to {{user}}. An error is signalled if
no configuration file is found at the requested location.

<procedure>(config-open [source]) => config</procedure>

Reads the Git configuration file indicated by {{source}}, which may be a
{{repository}}, path, or symbol as expected by {{config-path}}. An
error is signalled if no configuration file is found at the requested location.

<procedure>(config-get config name [type]) => object</procedure>

Returns the value of the property {{name}} in the given {{config}}
object. The value is returned as a string, unless an alternative return
type is specified by the given symbol {{type}}, which should be
{{string}}, {{symbol}}, {{number}} or {{boolean}}. An error is
signaled if the requested property doesn't exist, or if it cannot be
converted to the specified return type.

<procedure>(config-set! config name value) => object</procedure>

Sets the value of the property {{name}} in the given {{config}} object to the
given {{value}}.

On success, the new value is written immediately to disk.

<procedure>(config-unset! config name) => void</procedure>

Deletes the property {{name}} from the given {{config}} object.

On success, the change is written immediately to disk.

=== History

* 0.0.25 - libgit2 0.20.0 expanded diff API
* 0.0.24 - libgit2 0.20.0
* 0.0.23 - libgit2 0.19.0 object owner tracking
* 0.0.22 - libgit2 0.19.0 note, clone & revparse bindings
* 0.0.21 - libgit2 0.19.0 fix for repository-ref on 32-bit platforms
* 0.0.20 - libgit2 0.19.0
* 0.0.19 - libgit2 0.18.0 reference & branch API updates
* 0.0.18 - libgit2 0.18.0

=== Author

Evan Hanson

=== License

Copyright (c) 2013-2014, Evan Hanson, 3-Clause BSD License