File: reference.html

package info (click to toggle)
python-git 2.1.1-2~bpo8%2B1
  • links: PTS, VCS
  • area: main
  • in suites: jessie-backports
  • size: 6,076 kB
  • sloc: python: 11,502; makefile: 106
file content (7988 lines) | stat: -rw-r--r-- 461,436 bytes parent folder | download | duplicates (2)
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
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
4927
4928
4929
4930
4931
4932
4933
4934
4935
4936
4937
4938
4939
4940
4941
4942
4943
4944
4945
4946
4947
4948
4949
4950
4951
4952
4953
4954
4955
4956
4957
4958
4959
4960
4961
4962
4963
4964
4965
4966
4967
4968
4969
4970
4971
4972
4973
4974
4975
4976
4977
4978
4979
4980
4981
4982
4983
4984
4985
4986
4987
4988
4989
4990
4991
4992
4993
4994
4995
4996
4997
4998
4999
5000
5001
5002
5003
5004
5005
5006
5007
5008
5009
5010
5011
5012
5013
5014
5015
5016
5017
5018
5019
5020
5021
5022
5023
5024
5025
5026
5027
5028
5029
5030
5031
5032
5033
5034
5035
5036
5037
5038
5039
5040
5041
5042
5043
5044
5045
5046
5047
5048
5049
5050
5051
5052
5053
5054
5055
5056
5057
5058
5059
5060
5061
5062
5063
5064
5065
5066
5067
5068
5069
5070
5071
5072
5073
5074
5075
5076
5077
5078
5079
5080
5081
5082
5083
5084
5085
5086
5087
5088
5089
5090
5091
5092
5093
5094
5095
5096
5097
5098
5099
5100
5101
5102
5103
5104
5105
5106
5107
5108
5109
5110
5111
5112
5113
5114
5115
5116
5117
5118
5119
5120
5121
5122
5123
5124
5125
5126
5127
5128
5129
5130
5131
5132
5133
5134
5135
5136
5137
5138
5139
5140
5141
5142
5143
5144
5145
5146
5147
5148
5149
5150
5151
5152
5153
5154
5155
5156
5157
5158
5159
5160
5161
5162
5163
5164
5165
5166
5167
5168
5169
5170
5171
5172
5173
5174
5175
5176
5177
5178
5179
5180
5181
5182
5183
5184
5185
5186
5187
5188
5189
5190
5191
5192
5193
5194
5195
5196
5197
5198
5199
5200
5201
5202
5203
5204
5205
5206
5207
5208
5209
5210
5211
5212
5213
5214
5215
5216
5217
5218
5219
5220
5221
5222
5223
5224
5225
5226
5227
5228
5229
5230
5231
5232
5233
5234
5235
5236
5237
5238
5239
5240
5241
5242
5243
5244
5245
5246
5247
5248
5249
5250
5251
5252
5253
5254
5255
5256
5257
5258
5259
5260
5261
5262
5263
5264
5265
5266
5267
5268
5269
5270
5271
5272
5273
5274
5275
5276
5277
5278
5279
5280
5281
5282
5283
5284
5285
5286
5287
5288
5289
5290
5291
5292
5293
5294
5295
5296
5297
5298
5299
5300
5301
5302
5303
5304
5305
5306
5307
5308
5309
5310
5311
5312
5313
5314
5315
5316
5317
5318
5319
5320
5321
5322
5323
5324
5325
5326
5327
5328
5329
5330
5331
5332
5333
5334
5335
5336
5337
5338
5339
5340
5341
5342
5343
5344
5345
5346
5347
5348
5349
5350
5351
5352
5353
5354
5355
5356
5357
5358
5359
5360
5361
5362
5363
5364
5365
5366
5367
5368
5369
5370
5371
5372
5373
5374
5375
5376
5377
5378
5379
5380
5381
5382
5383
5384
5385
5386
5387
5388
5389
5390
5391
5392
5393
5394
5395
5396
5397
5398
5399
5400
5401
5402
5403
5404
5405
5406
5407
5408
5409
5410
5411
5412
5413
5414
5415
5416
5417
5418
5419
5420
5421
5422
5423
5424
5425
5426
5427
5428
5429
5430
5431
5432
5433
5434
5435
5436
5437
5438
5439
5440
5441
5442
5443
5444
5445
5446
5447
5448
5449
5450
5451
5452
5453
5454
5455
5456
5457
5458
5459
5460
5461
5462
5463
5464
5465
5466
5467
5468
5469
5470
5471
5472
5473
5474
5475
5476
5477
5478
5479
5480
5481
5482
5483
5484
5485
5486
5487
5488
5489
5490
5491
5492
5493
5494
5495
5496
5497
5498
5499
5500
5501
5502
5503
5504
5505
5506
5507
5508
5509
5510
5511
5512
5513
5514
5515
5516
5517
5518
5519
5520
5521
5522
5523
5524
5525
5526
5527
5528
5529
5530
5531
5532
5533
5534
5535
5536
5537
5538
5539
5540
5541
5542
5543
5544
5545
5546
5547
5548
5549
5550
5551
5552
5553
5554
5555
5556
5557
5558
5559
5560
5561
5562
5563
5564
5565
5566
5567
5568
5569
5570
5571
5572
5573
5574
5575
5576
5577
5578
5579
5580
5581
5582
5583
5584
5585
5586
5587
5588
5589
5590
5591
5592
5593
5594
5595
5596
5597
5598
5599
5600
5601
5602
5603
5604
5605
5606
5607
5608
5609
5610
5611
5612
5613
5614
5615
5616
5617
5618
5619
5620
5621
5622
5623
5624
5625
5626
5627
5628
5629
5630
5631
5632
5633
5634
5635
5636
5637
5638
5639
5640
5641
5642
5643
5644
5645
5646
5647
5648
5649
5650
5651
5652
5653
5654
5655
5656
5657
5658
5659
5660
5661
5662
5663
5664
5665
5666
5667
5668
5669
5670
5671
5672
5673
5674
5675
5676
5677
5678
5679
5680
5681
5682
5683
5684
5685
5686
5687
5688
5689
5690
5691
5692
5693
5694
5695
5696
5697
5698
5699
5700
5701
5702
5703
5704
5705
5706
5707
5708
5709
5710
5711
5712
5713
5714
5715
5716
5717
5718
5719
5720
5721
5722
5723
5724
5725
5726
5727
5728
5729
5730
5731
5732
5733
5734
5735
5736
5737
5738
5739
5740
5741
5742
5743
5744
5745
5746
5747
5748
5749
5750
5751
5752
5753
5754
5755
5756
5757
5758
5759
5760
5761
5762
5763
5764
5765
5766
5767
5768
5769
5770
5771
5772
5773
5774
5775
5776
5777
5778
5779
5780
5781
5782
5783
5784
5785
5786
5787
5788
5789
5790
5791
5792
5793
5794
5795
5796
5797
5798
5799
5800
5801
5802
5803
5804
5805
5806
5807
5808
5809
5810
5811
5812
5813
5814
5815
5816
5817
5818
5819
5820
5821
5822
5823
5824
5825
5826
5827
5828
5829
5830
5831
5832
5833
5834
5835
5836
5837
5838
5839
5840
5841
5842
5843
5844
5845
5846
5847
5848
5849
5850
5851
5852
5853
5854
5855
5856
5857
5858
5859
5860
5861
5862
5863
5864
5865
5866
5867
5868
5869
5870
5871
5872
5873
5874
5875
5876
5877
5878
5879
5880
5881
5882
5883
5884
5885
5886
5887
5888
5889
5890
5891
5892
5893
5894
5895
5896
5897
5898
5899
5900
5901
5902
5903
5904
5905
5906
5907
5908
5909
5910
5911
5912
5913
5914
5915
5916
5917
5918
5919
5920
5921
5922
5923
5924
5925
5926
5927
5928
5929
5930
5931
5932
5933
5934
5935
5936
5937
5938
5939
5940
5941
5942
5943
5944
5945
5946
5947
5948
5949
5950
5951
5952
5953
5954
5955
5956
5957
5958
5959
5960
5961
5962
5963
5964
5965
5966
5967
5968
5969
5970
5971
5972
5973
5974
5975
5976
5977
5978
5979
5980
5981
5982
5983
5984
5985
5986
5987
5988
5989
5990
5991
5992
5993
5994
5995
5996
5997
5998
5999
6000
6001
6002
6003
6004
6005
6006
6007
6008
6009
6010
6011
6012
6013
6014
6015
6016
6017
6018
6019
6020
6021
6022
6023
6024
6025
6026
6027
6028
6029
6030
6031
6032
6033
6034
6035
6036
6037
6038
6039
6040
6041
6042
6043
6044
6045
6046
6047
6048
6049
6050
6051
6052
6053
6054
6055
6056
6057
6058
6059
6060
6061
6062
6063
6064
6065
6066
6067
6068
6069
6070
6071
6072
6073
6074
6075
6076
6077
6078
6079
6080
6081
6082
6083
6084
6085
6086
6087
6088
6089
6090
6091
6092
6093
6094
6095
6096
6097
6098
6099
6100
6101
6102
6103
6104
6105
6106
6107
6108
6109
6110
6111
6112
6113
6114
6115
6116
6117
6118
6119
6120
6121
6122
6123
6124
6125
6126
6127
6128
6129
6130
6131
6132
6133
6134
6135
6136
6137
6138
6139
6140
6141
6142
6143
6144
6145
6146
6147
6148
6149
6150
6151
6152
6153
6154
6155
6156
6157
6158
6159
6160
6161
6162
6163
6164
6165
6166
6167
6168
6169
6170
6171
6172
6173
6174
6175
6176
6177
6178
6179
6180
6181
6182
6183
6184
6185
6186
6187
6188
6189
6190
6191
6192
6193
6194
6195
6196
6197
6198
6199
6200
6201
6202
6203
6204
6205
6206
6207
6208
6209
6210
6211
6212
6213
6214
6215
6216
6217
6218
6219
6220
6221
6222
6223
6224
6225
6226
6227
6228
6229
6230
6231
6232
6233
6234
6235
6236
6237
6238
6239
6240
6241
6242
6243
6244
6245
6246
6247
6248
6249
6250
6251
6252
6253
6254
6255
6256
6257
6258
6259
6260
6261
6262
6263
6264
6265
6266
6267
6268
6269
6270
6271
6272
6273
6274
6275
6276
6277
6278
6279
6280
6281
6282
6283
6284
6285
6286
6287
6288
6289
6290
6291
6292
6293
6294
6295
6296
6297
6298
6299
6300
6301
6302
6303
6304
6305
6306
6307
6308
6309
6310
6311
6312
6313
6314
6315
6316
6317
6318
6319
6320
6321
6322
6323
6324
6325
6326
6327
6328
6329
6330
6331
6332
6333
6334
6335
6336
6337
6338
6339
6340
6341
6342
6343
6344
6345
6346
6347
6348
6349
6350
6351
6352
6353
6354
6355
6356
6357
6358
6359
6360
6361
6362
6363
6364
6365
6366
6367
6368
6369
6370
6371
6372
6373
6374
6375
6376
6377
6378
6379
6380
6381
6382
6383
6384
6385
6386
6387
6388
6389
6390
6391
6392
6393
6394
6395
6396
6397
6398
6399
6400
6401
6402
6403
6404
6405
6406
6407
6408
6409
6410
6411
6412
6413
6414
6415
6416
6417
6418
6419
6420
6421
6422
6423
6424
6425
6426
6427
6428
6429
6430
6431
6432
6433
6434
6435
6436
6437
6438
6439
6440
6441
6442
6443
6444
6445
6446
6447
6448
6449
6450
6451
6452
6453
6454
6455
6456
6457
6458
6459
6460
6461
6462
6463
6464
6465
6466
6467
6468
6469
6470
6471
6472
6473
6474
6475
6476
6477
6478
6479
6480
6481
6482
6483
6484
6485
6486
6487
6488
6489
6490
6491
6492
6493
6494
6495
6496
6497
6498
6499
6500
6501
6502
6503
6504
6505
6506
6507
6508
6509
6510
6511
6512
6513
6514
6515
6516
6517
6518
6519
6520
6521
6522
6523
6524
6525
6526
6527
6528
6529
6530
6531
6532
6533
6534
6535
6536
6537
6538
6539
6540
6541
6542
6543
6544
6545
6546
6547
6548
6549
6550
6551
6552
6553
6554
6555
6556
6557
6558
6559
6560
6561
6562
6563
6564
6565
6566
6567
6568
6569
6570
6571
6572
6573
6574
6575
6576
6577
6578
6579
6580
6581
6582
6583
6584
6585
6586
6587
6588
6589
6590
6591
6592
6593
6594
6595
6596
6597
6598
6599
6600
6601
6602
6603
6604
6605
6606
6607
6608
6609
6610
6611
6612
6613
6614
6615
6616
6617
6618
6619
6620
6621
6622
6623
6624
6625
6626
6627
6628
6629
6630
6631
6632
6633
6634
6635
6636
6637
6638
6639
6640
6641
6642
6643
6644
6645
6646
6647
6648
6649
6650
6651
6652
6653
6654
6655
6656
6657
6658
6659
6660
6661
6662
6663
6664
6665
6666
6667
6668
6669
6670
6671
6672
6673
6674
6675
6676
6677
6678
6679
6680
6681
6682
6683
6684
6685
6686
6687
6688
6689
6690
6691
6692
6693
6694
6695
6696
6697
6698
6699
6700
6701
6702
6703
6704
6705
6706
6707
6708
6709
6710
6711
6712
6713
6714
6715
6716
6717
6718
6719
6720
6721
6722
6723
6724
6725
6726
6727
6728
6729
6730
6731
6732
6733
6734
6735
6736
6737
6738
6739
6740
6741
6742
6743
6744
6745
6746
6747
6748
6749
6750
6751
6752
6753
6754
6755
6756
6757
6758
6759
6760
6761
6762
6763
6764
6765
6766
6767
6768
6769
6770
6771
6772
6773
6774
6775
6776
6777
6778
6779
6780
6781
6782
6783
6784
6785
6786
6787
6788
6789
6790
6791
6792
6793
6794
6795
6796
6797
6798
6799
6800
6801
6802
6803
6804
6805
6806
6807
6808
6809
6810
6811
6812
6813
6814
6815
6816
6817
6818
6819
6820
6821
6822
6823
6824
6825
6826
6827
6828
6829
6830
6831
6832
6833
6834
6835
6836
6837
6838
6839
6840
6841
6842
6843
6844
6845
6846
6847
6848
6849
6850
6851
6852
6853
6854
6855
6856
6857
6858
6859
6860
6861
6862
6863
6864
6865
6866
6867
6868
6869
6870
6871
6872
6873
6874
6875
6876
6877
6878
6879
6880
6881
6882
6883
6884
6885
6886
6887
6888
6889
6890
6891
6892
6893
6894
6895
6896
6897
6898
6899
6900
6901
6902
6903
6904
6905
6906
6907
6908
6909
6910
6911
6912
6913
6914
6915
6916
6917
6918
6919
6920
6921
6922
6923
6924
6925
6926
6927
6928
6929
6930
6931
6932
6933
6934
6935
6936
6937
6938
6939
6940
6941
6942
6943
6944
6945
6946
6947
6948
6949
6950
6951
6952
6953
6954
6955
6956
6957
6958
6959
6960
6961
6962
6963
6964
6965
6966
6967
6968
6969
6970
6971
6972
6973
6974
6975
6976
6977
6978
6979
6980
6981
6982
6983
6984
6985
6986
6987
6988
6989
6990
6991
6992
6993
6994
6995
6996
6997
6998
6999
7000
7001
7002
7003
7004
7005
7006
7007
7008
7009
7010
7011
7012
7013
7014
7015
7016
7017
7018
7019
7020
7021
7022
7023
7024
7025
7026
7027
7028
7029
7030
7031
7032
7033
7034
7035
7036
7037
7038
7039
7040
7041
7042
7043
7044
7045
7046
7047
7048
7049
7050
7051
7052
7053
7054
7055
7056
7057
7058
7059
7060
7061
7062
7063
7064
7065
7066
7067
7068
7069
7070
7071
7072
7073
7074
7075
7076
7077
7078
7079
7080
7081
7082
7083
7084
7085
7086
7087
7088
7089
7090
7091
7092
7093
7094
7095
7096
7097
7098
7099
7100
7101
7102
7103
7104
7105
7106
7107
7108
7109
7110
7111
7112
7113
7114
7115
7116
7117
7118
7119
7120
7121
7122
7123
7124
7125
7126
7127
7128
7129
7130
7131
7132
7133
7134
7135
7136
7137
7138
7139
7140
7141
7142
7143
7144
7145
7146
7147
7148
7149
7150
7151
7152
7153
7154
7155
7156
7157
7158
7159
7160
7161
7162
7163
7164
7165
7166
7167
7168
7169
7170
7171
7172
7173
7174
7175
7176
7177
7178
7179
7180
7181
7182
7183
7184
7185
7186
7187
7188
7189
7190
7191
7192
7193
7194
7195
7196
7197
7198
7199
7200
7201
7202
7203
7204
7205
7206
7207
7208
7209
7210
7211
7212
7213
7214
7215
7216
7217
7218
7219
7220
7221
7222
7223
7224
7225
7226
7227
7228
7229
7230
7231
7232
7233
7234
7235
7236
7237
7238
7239
7240
7241
7242
7243
7244
7245
7246
7247
7248
7249
7250
7251
7252
7253
7254
7255
7256
7257
7258
7259
7260
7261
7262
7263
7264
7265
7266
7267
7268
7269
7270
7271
7272
7273
7274
7275
7276
7277
7278
7279
7280
7281
7282
7283
7284
7285
7286
7287
7288
7289
7290
7291
7292
7293
7294
7295
7296
7297
7298
7299
7300
7301
7302
7303
7304
7305
7306
7307
7308
7309
7310
7311
7312
7313
7314
7315
7316
7317
7318
7319
7320
7321
7322
7323
7324
7325
7326
7327
7328
7329
7330
7331
7332
7333
7334
7335
7336
7337
7338
7339
7340
7341
7342
7343
7344
7345
7346
7347
7348
7349
7350
7351
7352
7353
7354
7355
7356
7357
7358
7359
7360
7361
7362
7363
7364
7365
7366
7367
7368
7369
7370
7371
7372
7373
7374
7375
7376
7377
7378
7379
7380
7381
7382
7383
7384
7385
7386
7387
7388
7389
7390
7391
7392
7393
7394
7395
7396
7397
7398
7399
7400
7401
7402
7403
7404
7405
7406
7407
7408
7409
7410
7411
7412
7413
7414
7415
7416
7417
7418
7419
7420
7421
7422
7423
7424
7425
7426
7427
7428
7429
7430
7431
7432
7433
7434
7435
7436
7437
7438
7439
7440
7441
7442
7443
7444
7445
7446
7447
7448
7449
7450
7451
7452
7453
7454
7455
7456
7457
7458
7459
7460
7461
7462
7463
7464
7465
7466
7467
7468
7469
7470
7471
7472
7473
7474
7475
7476
7477
7478
7479
7480
7481
7482
7483
7484
7485
7486
7487
7488
7489
7490
7491
7492
7493
7494
7495
7496
7497
7498
7499
7500
7501
7502
7503
7504
7505
7506
7507
7508
7509
7510
7511
7512
7513
7514
7515
7516
7517
7518
7519
7520
7521
7522
7523
7524
7525
7526
7527
7528
7529
7530
7531
7532
7533
7534
7535
7536
7537
7538
7539
7540
7541
7542
7543
7544
7545
7546
7547
7548
7549
7550
7551
7552
7553
7554
7555
7556
7557
7558
7559
7560
7561
7562
7563
7564
7565
7566
7567
7568
7569
7570
7571
7572
7573
7574
7575
7576
7577
7578
7579
7580
7581
7582
7583
7584
7585
7586
7587
7588
7589
7590
7591
7592
7593
7594
7595
7596
7597
7598
7599
7600
7601
7602
7603
7604
7605
7606
7607
7608
7609
7610
7611
7612
7613
7614
7615
7616
7617
7618
7619
7620
7621
7622
7623
7624
7625
7626
7627
7628
7629
7630
7631
7632
7633
7634
7635
7636
7637
7638
7639
7640
7641
7642
7643
7644
7645
7646
7647
7648
7649
7650
7651
7652
7653
7654
7655
7656
7657
7658
7659
7660
7661
7662
7663
7664
7665
7666
7667
7668
7669
7670
7671
7672
7673
7674
7675
7676
7677
7678
7679
7680
7681
7682
7683
7684
7685
7686
7687
7688
7689
7690
7691
7692
7693
7694
7695
7696
7697
7698
7699
7700
7701
7702
7703
7704
7705
7706
7707
7708
7709
7710
7711
7712
7713
7714
7715
7716
7717
7718
7719
7720
7721
7722
7723
7724
7725
7726
7727
7728
7729
7730
7731
7732
7733
7734
7735
7736
7737
7738
7739
7740
7741
7742
7743
7744
7745
7746
7747
7748
7749
7750
7751
7752
7753
7754
7755
7756
7757
7758
7759
7760
7761
7762
7763
7764
7765
7766
7767
7768
7769
7770
7771
7772
7773
7774
7775
7776
7777
7778
7779
7780
7781
7782
7783
7784
7785
7786
7787
7788
7789
7790
7791
7792
7793
7794
7795
7796
7797
7798
7799
7800
7801
7802
7803
7804
7805
7806
7807
7808
7809
7810
7811
7812
7813
7814
7815
7816
7817
7818
7819
7820
7821
7822
7823
7824
7825
7826
7827
7828
7829
7830
7831
7832
7833
7834
7835
7836
7837
7838
7839
7840
7841
7842
7843
7844
7845
7846
7847
7848
7849
7850
7851
7852
7853
7854
7855
7856
7857
7858
7859
7860
7861
7862
7863
7864
7865
7866
7867
7868
7869
7870
7871
7872
7873
7874
7875
7876
7877
7878
7879
7880
7881
7882
7883
7884
7885
7886
7887
7888
7889
7890
7891
7892
7893
7894
7895
7896
7897
7898
7899
7900
7901
7902
7903
7904
7905
7906
7907
7908
7909
7910
7911
7912
7913
7914
7915
7916
7917
7918
7919
7920
7921
7922
7923
7924
7925
7926
7927
7928
7929
7930
7931
7932
7933
7934
7935
7936
7937
7938
7939
7940
7941
7942
7943
7944
7945
7946
7947
7948
7949
7950
7951
7952
7953
7954
7955
7956
7957
7958
7959
7960
7961
7962
7963
7964
7965
7966
7967
7968
7969
7970
7971
7972
7973
7974
7975
7976
7977
7978
7979
7980
7981
7982
7983
7984
7985
7986
7987
7988
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    
    <title>API Reference &mdash; GitPython 2.0.9dev0 documentation</title>
    
    <link rel="stylesheet" href="_static/default.css" type="text/css" />
    <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
    
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    './',
        VERSION:     '2.0.9dev0',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true
      };
    </script>
    <script type="text/javascript" src="_static/jquery.js"></script>
    <script type="text/javascript" src="_static/underscore.js"></script>
    <script type="text/javascript" src="_static/doctools.js"></script>
    <link rel="top" title="GitPython 2.0.9dev0 documentation" href="index.html" />
    <link rel="next" title="Roadmap" href="roadmap.html" />
    <link rel="prev" title="GitPython Tutorial" href="tutorial.html" />
   
  
  <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9" />

  </head>
  <body role="document">  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body" role="main">
            
  <div class="section" id="api-reference">
<span id="api-reference-toplevel"></span><h1>API Reference<a class="headerlink" href="#api-reference" title="Permalink to this headline">¶</a></h1>
<div class="section" id="module-git.objects.base">
<span id="objects-base"></span><h2>Objects.Base<a class="headerlink" href="#module-git.objects.base" title="Permalink to this headline">¶</a></h2>
<dl class="class">
<dt id="git.objects.base.Object">
<em class="property">class </em><code class="descclassname">git.objects.base.</code><code class="descname">Object</code><span class="sig-paren">(</span><em>repo</em>, <em>binsha</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.base.Object" title="Permalink to this definition">¶</a></dt>
<dd><p>Implements an Object which may be Blobs, Trees, Commits and Tags</p>
<dl class="attribute">
<dt id="git.objects.base.Object.NULL_BIN_SHA">
<code class="descname">NULL_BIN_SHA</code><em class="property"> = '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'</em><a class="headerlink" href="#git.objects.base.Object.NULL_BIN_SHA" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.objects.base.Object.NULL_HEX_SHA">
<code class="descname">NULL_HEX_SHA</code><em class="property"> = '0000000000000000000000000000000000000000'</em><a class="headerlink" href="#git.objects.base.Object.NULL_HEX_SHA" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.objects.base.Object.TYPES">
<code class="descname">TYPES</code><em class="property"> = ('blob', 'tree', 'commit', 'tag')</em><a class="headerlink" href="#git.objects.base.Object.TYPES" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="git.objects.base.Object.__eq__">
<code class="descname">__eq__</code><span class="sig-paren">(</span><em>other</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.base.Object.__eq__" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">True if the objects have the same SHA1</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="git.objects.base.Object.__hash__">
<code class="descname">__hash__</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.base.Object.__hash__" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Hash of our id allowing objects to be used in dicts and sets</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="git.objects.base.Object.__init__">
<code class="descname">__init__</code><span class="sig-paren">(</span><em>repo</em>, <em>binsha</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.base.Object.__init__" title="Permalink to this definition">¶</a></dt>
<dd><p>Initialize an object by identifying it by its binary sha.
All keyword arguments will be set on demand if None.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>repo</strong> &#8211; repository this object is located in</li>
<li><strong>binsha</strong> &#8211; 20 byte SHA1</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="attribute">
<dt id="git.objects.base.Object.__module__">
<code class="descname">__module__</code><em class="property"> = 'git.objects.base'</em><a class="headerlink" href="#git.objects.base.Object.__module__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="git.objects.base.Object.__ne__">
<code class="descname">__ne__</code><span class="sig-paren">(</span><em>other</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.base.Object.__ne__" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">True if the objects do not have the same SHA1</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="git.objects.base.Object.__repr__">
<code class="descname">__repr__</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.base.Object.__repr__" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">string with pythonic representation of our object</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="attribute">
<dt id="git.objects.base.Object.__slots__">
<code class="descname">__slots__</code><em class="property"> = ('repo', 'binsha', 'size')</em><a class="headerlink" href="#git.objects.base.Object.__slots__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="git.objects.base.Object.__str__">
<code class="descname">__str__</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.base.Object.__str__" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">string of our SHA1 as understood by all git commands</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="attribute">
<dt id="git.objects.base.Object.binsha">
<code class="descname">binsha</code><a class="headerlink" href="#git.objects.base.Object.binsha" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.objects.base.Object.data_stream">
<code class="descname">data_stream</code><a class="headerlink" href="#git.objects.base.Object.data_stream" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">File Object compatible stream to the uncompressed raw data of the object</td>
</tr>
<tr class="field-even field"><th class="field-name">Note:</th><td class="field-body">returned streams must be read in order</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="attribute">
<dt id="git.objects.base.Object.hexsha">
<code class="descname">hexsha</code><a class="headerlink" href="#git.objects.base.Object.hexsha" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">40 byte hex version of our 20 byte binary sha</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="classmethod">
<dt id="git.objects.base.Object.new">
<em class="property">classmethod </em><code class="descname">new</code><span class="sig-paren">(</span><em>repo</em>, <em>id</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.base.Object.new" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">New Object instance of a type appropriate to the object type behind
id. The id of the newly created object will be a binsha even though
the input id may have been a Reference or Rev-Spec</td>
</tr>
<tr class="field-even field"><th class="field-name">Parameters:</th><td class="field-body"><strong>id</strong> &#8211; reference, rev-spec, or hexsha</td>
</tr>
<tr class="field-odd field"><th class="field-name">Note:</th><td class="field-body">This cannot be a __new__ method as it would always call __init__
with the input id which is not necessarily a binsha.</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="classmethod">
<dt id="git.objects.base.Object.new_from_sha">
<em class="property">classmethod </em><code class="descname">new_from_sha</code><span class="sig-paren">(</span><em>repo</em>, <em>sha1</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.base.Object.new_from_sha" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">new object instance of a type appropriate to represent the given
binary sha1</td>
</tr>
<tr class="field-even field"><th class="field-name">Parameters:</th><td class="field-body"><strong>sha1</strong> &#8211; 20 byte binary sha1</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="attribute">
<dt id="git.objects.base.Object.repo">
<code class="descname">repo</code><a class="headerlink" href="#git.objects.base.Object.repo" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.objects.base.Object.size">
<code class="descname">size</code><a class="headerlink" href="#git.objects.base.Object.size" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="git.objects.base.Object.stream_data">
<code class="descname">stream_data</code><span class="sig-paren">(</span><em>ostream</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.base.Object.stream_data" title="Permalink to this definition">¶</a></dt>
<dd><p>Writes our data directly to the given output stream
:param ostream: File object compatible stream object.
:return: self</p>
</dd></dl>

<dl class="attribute">
<dt id="git.objects.base.Object.type">
<code class="descname">type</code><em class="property"> = None</em><a class="headerlink" href="#git.objects.base.Object.type" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="class">
<dt id="git.objects.base.IndexObject">
<em class="property">class </em><code class="descclassname">git.objects.base.</code><code class="descname">IndexObject</code><span class="sig-paren">(</span><em>repo</em>, <em>binsha</em>, <em>mode=None</em>, <em>path=None</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.base.IndexObject" title="Permalink to this definition">¶</a></dt>
<dd><p>Base for all objects that can be part of the index file , namely Tree, Blob and
SubModule objects</p>
<dl class="method">
<dt id="git.objects.base.IndexObject.__hash__">
<code class="descname">__hash__</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.base.IndexObject.__hash__" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Hash of our path as index items are uniquely identifyable by path, not
by their data !</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="git.objects.base.IndexObject.__init__">
<code class="descname">__init__</code><span class="sig-paren">(</span><em>repo</em>, <em>binsha</em>, <em>mode=None</em>, <em>path=None</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.base.IndexObject.__init__" title="Permalink to this definition">¶</a></dt>
<dd><p>Initialize a newly instanced IndexObject</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>repo</strong> &#8211; is the Repo we are located in</li>
<li><strong>binsha</strong> &#8211; 20 byte sha1</li>
<li><strong>mode</strong> &#8211; is the stat compatible file mode as int, use the stat module
to evaluate the infomration</li>
<li><strong>path</strong> &#8211; is the path to the file in the file system, relative to the git repository root, i.e.
file.ext or folder/other.ext</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Note:</th><td class="field-body"><p class="first last">Path may not be set of the index object has been created directly as it cannot
be retrieved without knowing the parent tree.</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="attribute">
<dt id="git.objects.base.IndexObject.__module__">
<code class="descname">__module__</code><em class="property"> = 'git.objects.base'</em><a class="headerlink" href="#git.objects.base.IndexObject.__module__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.objects.base.IndexObject.__slots__">
<code class="descname">__slots__</code><em class="property"> = ('path', 'mode')</em><a class="headerlink" href="#git.objects.base.IndexObject.__slots__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.objects.base.IndexObject.abspath">
<code class="descname">abspath</code><a class="headerlink" href="#git.objects.base.IndexObject.abspath" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Absolute path to this index object in the file system ( as opposed to the
.path field which is a path relative to the git repository ).<p>The returned path will be native to the system and contains &#8216;&#8217; on windows.</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="attribute">
<dt id="git.objects.base.IndexObject.mode">
<code class="descname">mode</code><a class="headerlink" href="#git.objects.base.IndexObject.mode" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.objects.base.IndexObject.name">
<code class="descname">name</code><a class="headerlink" href="#git.objects.base.IndexObject.name" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Name portion of the path, effectively being the basename</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="attribute">
<dt id="git.objects.base.IndexObject.path">
<code class="descname">path</code><a class="headerlink" href="#git.objects.base.IndexObject.path" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

</div>
<div class="section" id="module-git.objects.blob">
<span id="objects-blob"></span><h2>Objects.Blob<a class="headerlink" href="#module-git.objects.blob" title="Permalink to this headline">¶</a></h2>
<dl class="class">
<dt id="git.objects.blob.Blob">
<em class="property">class </em><code class="descclassname">git.objects.blob.</code><code class="descname">Blob</code><span class="sig-paren">(</span><em>repo</em>, <em>binsha</em>, <em>mode=None</em>, <em>path=None</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.blob.Blob" title="Permalink to this definition">¶</a></dt>
<dd><p>A Blob encapsulates a git blob object</p>
<dl class="attribute">
<dt id="git.objects.blob.Blob.DEFAULT_MIME_TYPE">
<code class="descname">DEFAULT_MIME_TYPE</code><em class="property"> = 'text/plain'</em><a class="headerlink" href="#git.objects.blob.Blob.DEFAULT_MIME_TYPE" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.objects.blob.Blob.__module__">
<code class="descname">__module__</code><em class="property"> = 'git.objects.blob'</em><a class="headerlink" href="#git.objects.blob.Blob.__module__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.objects.blob.Blob.__slots__">
<code class="descname">__slots__</code><em class="property"> = ()</em><a class="headerlink" href="#git.objects.blob.Blob.__slots__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.objects.blob.Blob.executable_mode">
<code class="descname">executable_mode</code><em class="property"> = 33261</em><a class="headerlink" href="#git.objects.blob.Blob.executable_mode" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.objects.blob.Blob.file_mode">
<code class="descname">file_mode</code><em class="property"> = 33188</em><a class="headerlink" href="#git.objects.blob.Blob.file_mode" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.objects.blob.Blob.link_mode">
<code class="descname">link_mode</code><em class="property"> = 40960</em><a class="headerlink" href="#git.objects.blob.Blob.link_mode" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.objects.blob.Blob.mime_type">
<code class="descname">mime_type</code><a class="headerlink" href="#git.objects.blob.Blob.mime_type" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">String describing the mime type of this file (based on the filename)</td>
</tr>
<tr class="field-even field"><th class="field-name">Note:</th><td class="field-body">Defaults to &#8216;text/plain&#8217; in case the actual file type is unknown.</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="attribute">
<dt id="git.objects.blob.Blob.type">
<code class="descname">type</code><em class="property"> = 'blob'</em><a class="headerlink" href="#git.objects.blob.Blob.type" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

</div>
<div class="section" id="module-git.objects.commit">
<span id="objects-commit"></span><h2>Objects.Commit<a class="headerlink" href="#module-git.objects.commit" title="Permalink to this headline">¶</a></h2>
<dl class="class">
<dt id="git.objects.commit.Commit">
<em class="property">class </em><code class="descclassname">git.objects.commit.</code><code class="descname">Commit</code><span class="sig-paren">(</span><em>repo</em>, <em>binsha</em>, <em>tree=None</em>, <em>author=None</em>, <em>authored_date=None</em>, <em>author_tz_offset=None</em>, <em>committer=None</em>, <em>committed_date=None</em>, <em>committer_tz_offset=None</em>, <em>message=None</em>, <em>parents=None</em>, <em>encoding=None</em>, <em>gpgsig=None</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.commit.Commit" title="Permalink to this definition">¶</a></dt>
<dd><p>Wraps a git Commit object.</p>
<p>This class will act lazily on some of its attributes and will query the
value on demand only if it involves calling the git binary.</p>
<dl class="method">
<dt id="git.objects.commit.Commit.__init__">
<code class="descname">__init__</code><span class="sig-paren">(</span><em>repo</em>, <em>binsha</em>, <em>tree=None</em>, <em>author=None</em>, <em>authored_date=None</em>, <em>author_tz_offset=None</em>, <em>committer=None</em>, <em>committed_date=None</em>, <em>committer_tz_offset=None</em>, <em>message=None</em>, <em>parents=None</em>, <em>encoding=None</em>, <em>gpgsig=None</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.commit.Commit.__init__" title="Permalink to this definition">¶</a></dt>
<dd><p>Instantiate a new Commit. All keyword arguments taking None as default will
be implicitly set on first query.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>binsha</strong> &#8211; 20 byte sha1</li>
<li><strong>parents</strong> &#8211; tuple( Commit, ... )
is a tuple of commit ids or actual Commits</li>
<li><strong>tree</strong> &#8211; Tree
Tree object</li>
<li><strong>author</strong> &#8211; Actor
is the author string ( will be implicitly converted into an Actor object )</li>
<li><strong>authored_date</strong> &#8211; int_seconds_since_epoch
is the authored DateTime - use time.gmtime() to convert it into a
different format</li>
<li><strong>author_tz_offset</strong> &#8211; int_seconds_west_of_utc
is the timezone that the authored_date is in</li>
<li><strong>committer</strong> &#8211; Actor
is the committer string</li>
<li><strong>committed_date</strong> &#8211; int_seconds_since_epoch
is the committed DateTime - use time.gmtime() to convert it into a
different format</li>
<li><strong>committer_tz_offset</strong> &#8211; int_seconds_west_of_utc
is the timezone that the authored_date is in</li>
<li><strong>message</strong> &#8211; string
is the commit message</li>
<li><strong>encoding</strong> &#8211; string
encoding of the message, defaults to UTF-8</li>
<li><strong>parents</strong> &#8211; List or tuple of Commit objects which are our parent(s) in the commit
dependency graph</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">git.Commit</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Note:</th><td class="field-body"><p class="first last">Timezone information is in the same format and in the same sign
as what time.altzone returns. The sign is inverted compared to git&#8217;s
UTC timezone.</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="attribute">
<dt id="git.objects.commit.Commit.__module__">
<code class="descname">__module__</code><em class="property"> = 'git.objects.commit'</em><a class="headerlink" href="#git.objects.commit.Commit.__module__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.objects.commit.Commit.__slots__">
<code class="descname">__slots__</code><em class="property"> = ('tree', 'author', 'authored_date', 'author_tz_offset', 'committer', 'committed_date', 'committer_tz_offset', 'message', 'parents', 'encoding', 'gpgsig')</em><a class="headerlink" href="#git.objects.commit.Commit.__slots__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.objects.commit.Commit.author">
<code class="descname">author</code><a class="headerlink" href="#git.objects.commit.Commit.author" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.objects.commit.Commit.author_tz_offset">
<code class="descname">author_tz_offset</code><a class="headerlink" href="#git.objects.commit.Commit.author_tz_offset" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.objects.commit.Commit.authored_date">
<code class="descname">authored_date</code><a class="headerlink" href="#git.objects.commit.Commit.authored_date" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.objects.commit.Commit.authored_datetime">
<code class="descname">authored_datetime</code><a class="headerlink" href="#git.objects.commit.Commit.authored_datetime" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.objects.commit.Commit.committed_date">
<code class="descname">committed_date</code><a class="headerlink" href="#git.objects.commit.Commit.committed_date" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.objects.commit.Commit.committed_datetime">
<code class="descname">committed_datetime</code><a class="headerlink" href="#git.objects.commit.Commit.committed_datetime" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.objects.commit.Commit.committer">
<code class="descname">committer</code><a class="headerlink" href="#git.objects.commit.Commit.committer" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.objects.commit.Commit.committer_tz_offset">
<code class="descname">committer_tz_offset</code><a class="headerlink" href="#git.objects.commit.Commit.committer_tz_offset" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.objects.commit.Commit.conf_encoding">
<code class="descname">conf_encoding</code><em class="property"> = 'i18n.commitencoding'</em><a class="headerlink" href="#git.objects.commit.Commit.conf_encoding" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="git.objects.commit.Commit.count">
<code class="descname">count</code><span class="sig-paren">(</span><em>paths=''</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.commit.Commit.count" title="Permalink to this definition">¶</a></dt>
<dd><p>Count the number of commits reachable from this commit</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>paths</strong> &#8211; is an optinal path or a list of paths restricting the return value
to commits actually containing the paths</li>
<li><strong>kwargs</strong> &#8211; Additional options to be passed to git-rev-list. They must not alter
the ouput style of the command, or parsing will yield incorrect results</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">int defining the number of reachable commits</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="classmethod">
<dt id="git.objects.commit.Commit.create_from_tree">
<em class="property">classmethod </em><code class="descname">create_from_tree</code><span class="sig-paren">(</span><em>repo</em>, <em>tree</em>, <em>message</em>, <em>parent_commits=None</em>, <em>head=False</em>, <em>author=None</em>, <em>committer=None</em>, <em>author_date=None</em>, <em>commit_date=None</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.commit.Commit.create_from_tree" title="Permalink to this definition">¶</a></dt>
<dd><p>Commit the given tree, creating a commit object.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>repo</strong> &#8211; Repo object the commit should be part of</li>
<li><strong>tree</strong> &#8211; Tree object or hex or bin sha
the tree of the new commit</li>
<li><strong>message</strong> &#8211; Commit message. It may be an empty string if no message is provided.
It will be converted to a string in any case.</li>
<li><strong>parent_commits</strong> &#8211; Optional Commit objects to use as parents for the new commit.
If empty list, the commit will have no parents at all and become
a root commit.
If None , the current head commit will be the parent of the
new commit object</li>
<li><strong>head</strong> &#8211; If True, the HEAD will be advanced to the new commit automatically.
Else the HEAD will remain pointing on the previous commit. This could
lead to undesired results when diffing files.</li>
<li><strong>author</strong> &#8211; The name of the author, optional. If unset, the repository
configuration is used to obtain this value.</li>
<li><strong>committer</strong> &#8211; The name of the committer, optional. If unset, the
repository configuration is used to obtain this value.</li>
<li><strong>author_date</strong> &#8211; The timestamp for the author field</li>
<li><strong>commit_date</strong> &#8211; The timestamp for the committer field</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">Commit object representing the new commit</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Note:</th><td class="field-body"><p class="first last">Additional information about the committer and Author are taken from the
environment or from the git configuration, see git-commit-tree for
more information</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="attribute">
<dt id="git.objects.commit.Commit.default_encoding">
<code class="descname">default_encoding</code><em class="property"> = 'UTF-8'</em><a class="headerlink" href="#git.objects.commit.Commit.default_encoding" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.objects.commit.Commit.encoding">
<code class="descname">encoding</code><a class="headerlink" href="#git.objects.commit.Commit.encoding" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.objects.commit.Commit.env_author_date">
<code class="descname">env_author_date</code><em class="property"> = 'GIT_AUTHOR_DATE'</em><a class="headerlink" href="#git.objects.commit.Commit.env_author_date" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.objects.commit.Commit.env_committer_date">
<code class="descname">env_committer_date</code><em class="property"> = 'GIT_COMMITTER_DATE'</em><a class="headerlink" href="#git.objects.commit.Commit.env_committer_date" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.objects.commit.Commit.gpgsig">
<code class="descname">gpgsig</code><a class="headerlink" href="#git.objects.commit.Commit.gpgsig" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="classmethod">
<dt id="git.objects.commit.Commit.iter_items">
<em class="property">classmethod </em><code class="descname">iter_items</code><span class="sig-paren">(</span><em>repo</em>, <em>rev</em>, <em>paths=''</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.commit.Commit.iter_items" title="Permalink to this definition">¶</a></dt>
<dd><p>Find all commits matching the given criteria.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>repo</strong> &#8211; is the Repo</li>
<li><strong>rev</strong> &#8211; revision specifier, see git-rev-parse for viable options</li>
<li><strong>paths</strong> &#8211; is an optinal path or list of paths, if set only Commits that include the path
or paths will be considered</li>
<li><strong>kwargs</strong> &#8211; optional keyword arguments to git rev-list where
<code class="docutils literal"><span class="pre">max_count</span></code> is the maximum number of commits to fetch
<code class="docutils literal"><span class="pre">skip</span></code> is the number of commits to skip
<code class="docutils literal"><span class="pre">since</span></code> all commits since i.e. &#8216;1970-01-01&#8217;</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">iterator yielding Commit items</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="git.objects.commit.Commit.iter_parents">
<code class="descname">iter_parents</code><span class="sig-paren">(</span><em>paths=''</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.commit.Commit.iter_parents" title="Permalink to this definition">¶</a></dt>
<dd><p>Iterate _all_ parents of this commit.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>paths</strong> &#8211; Optional path or list of paths limiting the Commits to those that
contain at least one of the paths</li>
<li><strong>kwargs</strong> &#8211; All arguments allowed by git-rev-list</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">Iterator yielding Commit objects which are parents of self</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="attribute">
<dt id="git.objects.commit.Commit.message">
<code class="descname">message</code><a class="headerlink" href="#git.objects.commit.Commit.message" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.objects.commit.Commit.name_rev">
<code class="descname">name_rev</code><a class="headerlink" href="#git.objects.commit.Commit.name_rev" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">String describing the commits hex sha based on the closest Reference.
Mostly useful for UI purposes</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="attribute">
<dt id="git.objects.commit.Commit.parents">
<code class="descname">parents</code><a class="headerlink" href="#git.objects.commit.Commit.parents" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.objects.commit.Commit.stats">
<code class="descname">stats</code><a class="headerlink" href="#git.objects.commit.Commit.stats" title="Permalink to this definition">¶</a></dt>
<dd><p>Create a git stat from changes between this commit and its first parent
or from all changes done if this is the very first commit.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">git.Stats</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="attribute">
<dt id="git.objects.commit.Commit.summary">
<code class="descname">summary</code><a class="headerlink" href="#git.objects.commit.Commit.summary" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">First line of the commit message</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="attribute">
<dt id="git.objects.commit.Commit.tree">
<code class="descname">tree</code><a class="headerlink" href="#git.objects.commit.Commit.tree" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.objects.commit.Commit.type">
<code class="descname">type</code><em class="property"> = 'commit'</em><a class="headerlink" href="#git.objects.commit.Commit.type" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

</div>
<div class="section" id="module-git.objects.tag">
<span id="objects-tag"></span><h2>Objects.Tag<a class="headerlink" href="#module-git.objects.tag" title="Permalink to this headline">¶</a></h2>
<p>Module containing all object based types.</p>
<dl class="class">
<dt id="git.objects.tag.TagObject">
<em class="property">class </em><code class="descclassname">git.objects.tag.</code><code class="descname">TagObject</code><span class="sig-paren">(</span><em>repo</em>, <em>binsha</em>, <em>object=None</em>, <em>tag=None</em>, <em>tagger=None</em>, <em>tagged_date=None</em>, <em>tagger_tz_offset=None</em>, <em>message=None</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.tag.TagObject" title="Permalink to this definition">¶</a></dt>
<dd><p>Non-Lightweight tag carrying additional information about an object we are pointing to.</p>
<dl class="method">
<dt id="git.objects.tag.TagObject.__init__">
<code class="descname">__init__</code><span class="sig-paren">(</span><em>repo</em>, <em>binsha</em>, <em>object=None</em>, <em>tag=None</em>, <em>tagger=None</em>, <em>tagged_date=None</em>, <em>tagger_tz_offset=None</em>, <em>message=None</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.tag.TagObject.__init__" title="Permalink to this definition">¶</a></dt>
<dd><p>Initialize a tag object with additional data</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>repo</strong> &#8211; repository this object is located in</li>
<li><strong>binsha</strong> &#8211; 20 byte SHA1</li>
<li><strong>object</strong> &#8211; Object instance of object we are pointing to</li>
<li><strong>tag</strong> &#8211; name of this tag</li>
<li><strong>tagger</strong> &#8211; Actor identifying the tagger</li>
<li><strong>tagged_date</strong> &#8211; int_seconds_since_epoch
is the DateTime of the tag creation - use time.gmtime to convert
it into a different format</li>
<li><strong>tagged_tz_offset</strong> &#8211; int_seconds_west_of_utc is the timezone that the
authored_date is in, in a format similar to time.altzone</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="attribute">
<dt id="git.objects.tag.TagObject.__module__">
<code class="descname">__module__</code><em class="property"> = 'git.objects.tag'</em><a class="headerlink" href="#git.objects.tag.TagObject.__module__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.objects.tag.TagObject.__slots__">
<code class="descname">__slots__</code><em class="property"> = ('object', 'tag', 'tagger', 'tagged_date', 'tagger_tz_offset', 'message')</em><a class="headerlink" href="#git.objects.tag.TagObject.__slots__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.objects.tag.TagObject.message">
<code class="descname">message</code><a class="headerlink" href="#git.objects.tag.TagObject.message" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.objects.tag.TagObject.object">
<code class="descname">object</code><a class="headerlink" href="#git.objects.tag.TagObject.object" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.objects.tag.TagObject.tag">
<code class="descname">tag</code><a class="headerlink" href="#git.objects.tag.TagObject.tag" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.objects.tag.TagObject.tagged_date">
<code class="descname">tagged_date</code><a class="headerlink" href="#git.objects.tag.TagObject.tagged_date" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.objects.tag.TagObject.tagger">
<code class="descname">tagger</code><a class="headerlink" href="#git.objects.tag.TagObject.tagger" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.objects.tag.TagObject.tagger_tz_offset">
<code class="descname">tagger_tz_offset</code><a class="headerlink" href="#git.objects.tag.TagObject.tagger_tz_offset" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.objects.tag.TagObject.type">
<code class="descname">type</code><em class="property"> = 'tag'</em><a class="headerlink" href="#git.objects.tag.TagObject.type" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

</div>
<div class="section" id="module-git.objects.tree">
<span id="objects-tree"></span><h2>Objects.Tree<a class="headerlink" href="#module-git.objects.tree" title="Permalink to this headline">¶</a></h2>
<dl class="class">
<dt id="git.objects.tree.TreeModifier">
<em class="property">class </em><code class="descclassname">git.objects.tree.</code><code class="descname">TreeModifier</code><span class="sig-paren">(</span><em>cache</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.tree.TreeModifier" title="Permalink to this definition">¶</a></dt>
<dd><p>A utility class providing methods to alter the underlying cache in a list-like fashion.</p>
<p>Once all adjustments are complete, the _cache, which really is a refernce to
the cache of a tree, will be sorted. Assuring it will be in a serializable state</p>
<dl class="method">
<dt id="git.objects.tree.TreeModifier.__delitem__">
<code class="descname">__delitem__</code><span class="sig-paren">(</span><em>name</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.tree.TreeModifier.__delitem__" title="Permalink to this definition">¶</a></dt>
<dd><p>Deletes an item with the given name if it exists</p>
</dd></dl>

<dl class="method">
<dt id="git.objects.tree.TreeModifier.__init__">
<code class="descname">__init__</code><span class="sig-paren">(</span><em>cache</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.tree.TreeModifier.__init__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.objects.tree.TreeModifier.__module__">
<code class="descname">__module__</code><em class="property"> = 'git.objects.tree'</em><a class="headerlink" href="#git.objects.tree.TreeModifier.__module__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.objects.tree.TreeModifier.__slots__">
<code class="descname">__slots__</code><em class="property"> = '_cache'</em><a class="headerlink" href="#git.objects.tree.TreeModifier.__slots__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="git.objects.tree.TreeModifier.add">
<code class="descname">add</code><span class="sig-paren">(</span><em>sha</em>, <em>mode</em>, <em>name</em>, <em>force=False</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.tree.TreeModifier.add" title="Permalink to this definition">¶</a></dt>
<dd><p>Add the given item to the tree. If an item with the given name already
exists, nothing will be done, but a ValueError will be raised if the
sha and mode of the existing item do not match the one you add, unless
force is True</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>sha</strong> &#8211; The 20 or 40 byte sha of the item to add</li>
<li><strong>mode</strong> &#8211; int representing the stat compatible mode of the item</li>
<li><strong>force</strong> &#8211; If True, an item with your name and information will overwrite
any existing item with the same name, no matter which information it has</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">self</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="git.objects.tree.TreeModifier.add_unchecked">
<code class="descname">add_unchecked</code><span class="sig-paren">(</span><em>binsha</em>, <em>mode</em>, <em>name</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.tree.TreeModifier.add_unchecked" title="Permalink to this definition">¶</a></dt>
<dd><p>Add the given item to the tree, its correctness is assumed, which
puts the caller into responsibility to assure the input is correct.
For more information on the parameters, see <code class="docutils literal"><span class="pre">add</span></code>
:param binsha: 20 byte binary sha</p>
</dd></dl>

<dl class="method">
<dt id="git.objects.tree.TreeModifier.set_done">
<code class="descname">set_done</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.tree.TreeModifier.set_done" title="Permalink to this definition">¶</a></dt>
<dd><p>Call this method once you are done modifying the tree information.
It may be called several times, but be aware that each call will cause
a sort operation
:return self:</p>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="git.objects.tree.Tree">
<em class="property">class </em><code class="descclassname">git.objects.tree.</code><code class="descname">Tree</code><span class="sig-paren">(</span><em>repo</em>, <em>binsha</em>, <em>mode=16384</em>, <em>path=None</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.tree.Tree" title="Permalink to this definition">¶</a></dt>
<dd><p>Tree objects represent an ordered list of Blobs and other Trees.</p>
<p><code class="docutils literal"><span class="pre">Tree</span> <span class="pre">as</span> <span class="pre">a</span> <span class="pre">list</span></code>:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">Access</span> <span class="n">a</span> <span class="n">specific</span> <span class="n">blob</span> <span class="n">using</span> <span class="n">the</span>
<span class="n">tree</span><span class="p">[</span><span class="s1">&#39;filename&#39;</span><span class="p">]</span> <span class="n">notation</span><span class="o">.</span>

<span class="n">You</span> <span class="n">may</span> <span class="k">as</span> <span class="n">well</span> <span class="n">access</span> <span class="n">by</span> <span class="n">index</span>
<span class="n">blob</span> <span class="o">=</span> <span class="n">tree</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span>
</pre></div>
</div>
<dl class="method">
<dt id="git.objects.tree.Tree.__contains__">
<code class="descname">__contains__</code><span class="sig-paren">(</span><em>item</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.tree.Tree.__contains__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="git.objects.tree.Tree.__div__">
<code class="descname">__div__</code><span class="sig-paren">(</span><em>file</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.tree.Tree.__div__" title="Permalink to this definition">¶</a></dt>
<dd><p>For PY2 only</p>
</dd></dl>

<dl class="method">
<dt id="git.objects.tree.Tree.__getitem__">
<code class="descname">__getitem__</code><span class="sig-paren">(</span><em>item</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.tree.Tree.__getitem__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="git.objects.tree.Tree.__getslice__">
<code class="descname">__getslice__</code><span class="sig-paren">(</span><em>i</em>, <em>j</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.tree.Tree.__getslice__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="git.objects.tree.Tree.__init__">
<code class="descname">__init__</code><span class="sig-paren">(</span><em>repo</em>, <em>binsha</em>, <em>mode=16384</em>, <em>path=None</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.tree.Tree.__init__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="git.objects.tree.Tree.__iter__">
<code class="descname">__iter__</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.tree.Tree.__iter__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="git.objects.tree.Tree.__len__">
<code class="descname">__len__</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.tree.Tree.__len__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.objects.tree.Tree.__module__">
<code class="descname">__module__</code><em class="property"> = 'git.objects.tree'</em><a class="headerlink" href="#git.objects.tree.Tree.__module__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="git.objects.tree.Tree.__reversed__">
<code class="descname">__reversed__</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.tree.Tree.__reversed__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.objects.tree.Tree.__slots__">
<code class="descname">__slots__</code><em class="property"> = '_cache'</em><a class="headerlink" href="#git.objects.tree.Tree.__slots__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="git.objects.tree.Tree.__truediv__">
<code class="descname">__truediv__</code><span class="sig-paren">(</span><em>file</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.tree.Tree.__truediv__" title="Permalink to this definition">¶</a></dt>
<dd><p>For PY3 only</p>
</dd></dl>

<dl class="attribute">
<dt id="git.objects.tree.Tree.blob_id">
<code class="descname">blob_id</code><em class="property"> = 8</em><a class="headerlink" href="#git.objects.tree.Tree.blob_id" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.objects.tree.Tree.blobs">
<code class="descname">blobs</code><a class="headerlink" href="#git.objects.tree.Tree.blobs" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">list(Blob, ...) list of blobs directly below this tree</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="attribute">
<dt id="git.objects.tree.Tree.cache">
<code class="descname">cache</code><a class="headerlink" href="#git.objects.tree.Tree.cache" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">An object allowing to modify the internal cache. This can be used
to change the tree&#8217;s contents. When done, make sure you call <code class="docutils literal"><span class="pre">set_done</span></code>
on the tree modifier, or serialization behaviour will be incorrect.
See the <code class="docutils literal"><span class="pre">TreeModifier</span></code> for more information on how to alter the cache</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="attribute">
<dt id="git.objects.tree.Tree.commit_id">
<code class="descname">commit_id</code><em class="property"> = 14</em><a class="headerlink" href="#git.objects.tree.Tree.commit_id" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="git.objects.tree.Tree.join">
<code class="descname">join</code><span class="sig-paren">(</span><em>file</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.tree.Tree.join" title="Permalink to this definition">¶</a></dt>
<dd><p>Find the named object in this tree&#8217;s contents
:return: <code class="docutils literal"><span class="pre">git.Blob</span></code> or <code class="docutils literal"><span class="pre">git.Tree</span></code> or <code class="docutils literal"><span class="pre">git.Submodule</span></code></p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Raises:</th><td class="field-body"><strong>KeyError</strong> &#8211; if given file or tree does not exist in tree</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="attribute">
<dt id="git.objects.tree.Tree.symlink_id">
<code class="descname">symlink_id</code><em class="property"> = 10</em><a class="headerlink" href="#git.objects.tree.Tree.symlink_id" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="git.objects.tree.Tree.traverse">
<code class="descname">traverse</code><span class="sig-paren">(</span><em>predicate=&lt;function &lt;lambda&gt;&gt;</em>, <em>prune=&lt;function &lt;lambda&gt;&gt;</em>, <em>depth=-1</em>, <em>branch_first=True</em>, <em>visit_once=False</em>, <em>ignore_self=1</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.tree.Tree.traverse" title="Permalink to this definition">¶</a></dt>
<dd><p>For documentation, see util.Traversable.traverse
Trees are set to visit_once = False to gain more performance in the traversal</p>
</dd></dl>

<dl class="attribute">
<dt id="git.objects.tree.Tree.tree_id">
<code class="descname">tree_id</code><em class="property"> = 4</em><a class="headerlink" href="#git.objects.tree.Tree.tree_id" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.objects.tree.Tree.trees">
<code class="descname">trees</code><a class="headerlink" href="#git.objects.tree.Tree.trees" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">list(Tree, ...) list of trees directly below this tree</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="attribute">
<dt id="git.objects.tree.Tree.type">
<code class="descname">type</code><em class="property"> = 'tree'</em><a class="headerlink" href="#git.objects.tree.Tree.type" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

</div>
<div class="section" id="module-git.objects.fun">
<span id="objects-functions"></span><h2>Objects.Functions<a class="headerlink" href="#module-git.objects.fun" title="Permalink to this headline">¶</a></h2>
<p>Module with functions which are supposed to be as fast as possible</p>
<dl class="function">
<dt id="git.objects.fun.tree_to_stream">
<code class="descclassname">git.objects.fun.</code><code class="descname">tree_to_stream</code><span class="sig-paren">(</span><em>entries</em>, <em>write</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.fun.tree_to_stream" title="Permalink to this definition">¶</a></dt>
<dd><p>Write the give list of entries into a stream using its write method
:param entries: <strong>sorted</strong> list of tuples with (binsha, mode, name)
:param write: write method which takes a data string</p>
</dd></dl>

<dl class="function">
<dt id="git.objects.fun.tree_entries_from_data">
<code class="descclassname">git.objects.fun.</code><code class="descname">tree_entries_from_data</code><span class="sig-paren">(</span><em>data</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.fun.tree_entries_from_data" title="Permalink to this definition">¶</a></dt>
<dd><p>Reads the binary representation of a tree and returns tuples of Tree items
:param data: data block with tree data (as bytes)
:return: list(tuple(binsha, mode, tree_relative_path), ...)</p>
</dd></dl>

<dl class="function">
<dt id="git.objects.fun.traverse_trees_recursive">
<code class="descclassname">git.objects.fun.</code><code class="descname">traverse_trees_recursive</code><span class="sig-paren">(</span><em>odb</em>, <em>tree_shas</em>, <em>path_prefix</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.fun.traverse_trees_recursive" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">list with entries according to the given binary tree-shas.
The result is encoded in a list
of n tuple|None per blob/commit, (n == len(tree_shas)), where
* [0] == 20 byte sha
* [1] == mode as int
* [2] == path relative to working tree root
The entry tuple is None if the respective blob/commit did not
exist in the given tree.</p>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>tree_shas</strong> &#8211; iterable of shas pointing to trees. All trees must
be on the same level. A tree-sha may be None in which case None</li>
<li><strong>path_prefix</strong> &#8211; a prefix to be added to the returned paths on this level,
set it &#8216;&#8217; for the first iteration</li>
</ul>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Note:</th><td class="field-body"><p class="first last">The ordering of the returned items will be partially lost</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="function">
<dt id="git.objects.fun.traverse_tree_recursive">
<code class="descclassname">git.objects.fun.</code><code class="descname">traverse_tree_recursive</code><span class="sig-paren">(</span><em>odb</em>, <em>tree_sha</em>, <em>path_prefix</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.fun.traverse_tree_recursive" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">list of entries of the tree pointed to by the binary tree_sha. An entry
has the following format:
* [0] 20 byte sha
* [1] mode as int
* [2] path relative to the repository</td>
</tr>
<tr class="field-even field"><th class="field-name">Parameters:</th><td class="field-body"><strong>path_prefix</strong> &#8211; prefix to prepend to the front of all returned paths</td>
</tr>
</tbody>
</table>
</dd></dl>

</div>
<div class="section" id="module-git.objects.submodule.base">
<span id="objects-submodule-base"></span><h2>Objects.Submodule.base<a class="headerlink" href="#module-git.objects.submodule.base" title="Permalink to this headline">¶</a></h2>
<dl class="class">
<dt id="git.objects.submodule.base.Submodule">
<em class="property">class </em><code class="descclassname">git.objects.submodule.base.</code><code class="descname">Submodule</code><span class="sig-paren">(</span><em>repo</em>, <em>binsha</em>, <em>mode=None</em>, <em>path=None</em>, <em>name=None</em>, <em>parent_commit=None</em>, <em>url=None</em>, <em>branch_path=None</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.submodule.base.Submodule" title="Permalink to this definition">¶</a></dt>
<dd><p>Implements access to a git submodule. They are special in that their sha
represents a commit in the submodule&#8217;s repository which is to be checked out
at the path of this instance.
The submodule type does not have a string type associated with it, as it exists
solely as a marker in the tree and index.</p>
<p>All methods work in bare and non-bare repositories.</p>
<dl class="method">
<dt id="git.objects.submodule.base.Submodule.__eq__">
<code class="descname">__eq__</code><span class="sig-paren">(</span><em>other</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.submodule.base.Submodule.__eq__" title="Permalink to this definition">¶</a></dt>
<dd><p>Compare with another submodule</p>
</dd></dl>

<dl class="method">
<dt id="git.objects.submodule.base.Submodule.__hash__">
<code class="descname">__hash__</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.submodule.base.Submodule.__hash__" title="Permalink to this definition">¶</a></dt>
<dd><p>Hash this instance using its logical id, not the sha</p>
</dd></dl>

<dl class="method">
<dt id="git.objects.submodule.base.Submodule.__init__">
<code class="descname">__init__</code><span class="sig-paren">(</span><em>repo</em>, <em>binsha</em>, <em>mode=None</em>, <em>path=None</em>, <em>name=None</em>, <em>parent_commit=None</em>, <em>url=None</em>, <em>branch_path=None</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.submodule.base.Submodule.__init__" title="Permalink to this definition">¶</a></dt>
<dd><p>Initialize this instance with its attributes. We only document the ones
that differ from <code class="docutils literal"><span class="pre">IndexObject</span></code></p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>repo</strong> &#8211; Our parent repository</li>
<li><strong>binsha</strong> &#8211; binary sha referring to a commit in the remote repository, see url parameter</li>
<li><strong>parent_commit</strong> &#8211; see set_parent_commit()</li>
<li><strong>url</strong> &#8211; The url to the remote repository which is the submodule</li>
<li><strong>branch_path</strong> &#8211; full (relative) path to ref to checkout when cloning the remote repository</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="attribute">
<dt id="git.objects.submodule.base.Submodule.__module__">
<code class="descname">__module__</code><em class="property"> = 'git.objects.submodule.base'</em><a class="headerlink" href="#git.objects.submodule.base.Submodule.__module__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="git.objects.submodule.base.Submodule.__ne__">
<code class="descname">__ne__</code><span class="sig-paren">(</span><em>other</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.submodule.base.Submodule.__ne__" title="Permalink to this definition">¶</a></dt>
<dd><p>Compare with another submodule for inequality</p>
</dd></dl>

<dl class="method">
<dt id="git.objects.submodule.base.Submodule.__repr__">
<code class="descname">__repr__</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.submodule.base.Submodule.__repr__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.objects.submodule.base.Submodule.__slots__">
<code class="descname">__slots__</code><em class="property"> = ('_parent_commit', '_url', '_branch_path', '_name', '__weakref__')</em><a class="headerlink" href="#git.objects.submodule.base.Submodule.__slots__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="git.objects.submodule.base.Submodule.__str__">
<code class="descname">__str__</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.submodule.base.Submodule.__str__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.objects.submodule.base.Submodule.__weakref__">
<code class="descname">__weakref__</code><a class="headerlink" href="#git.objects.submodule.base.Submodule.__weakref__" title="Permalink to this definition">¶</a></dt>
<dd><p>list of weak references to the object (if defined)</p>
</dd></dl>

<dl class="classmethod">
<dt id="git.objects.submodule.base.Submodule.add">
<em class="property">classmethod </em><code class="descname">add</code><span class="sig-paren">(</span><em>repo</em>, <em>name</em>, <em>path</em>, <em>url=None</em>, <em>branch=None</em>, <em>no_checkout=False</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.submodule.base.Submodule.add" title="Permalink to this definition">¶</a></dt>
<dd><p>Add a new submodule to the given repository. This will alter the index
as well as the .gitmodules file, but will not create a new commit.
If the submodule already exists, no matter if the configuration differs
from the one provided, the existing submodule will be returned.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>repo</strong> &#8211; Repository instance which should receive the submodule</li>
<li><strong>name</strong> &#8211; The name/identifier for the submodule</li>
<li><strong>path</strong> &#8211; repository-relative or absolute path at which the submodule
should be located
It will be created as required during the repository initialization.</li>
<li><strong>url</strong> &#8211; git-clone compatible URL, see git-clone reference for more information
If None, the repository is assumed to exist, and the url of the first
remote is taken instead. This is useful if you want to make an existing
repository a submodule of anotherone.</li>
<li><strong>branch</strong> &#8211; name of branch at which the submodule should (later) be checked out.
The given branch must exist in the remote repository, and will be checked
out locally as a tracking branch.
It will only be written into the configuration if it not None, which is
when the checked out branch will be the one the remote HEAD pointed to.
The result you get in these situation is somewhat fuzzy, and it is recommended
to specify at least &#8216;master&#8217; here.
Examples are &#8216;master&#8217; or &#8216;feature/new&#8217;</li>
<li><strong>no_checkout</strong> &#8211; if True, and if the repository has to be cloned manually,
no checkout will be performed</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The newly created submodule instance</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Note:</th><td class="field-body"><p class="first last">works atomically, such that no change will be done if the repository
update fails for instance</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="attribute">
<dt id="git.objects.submodule.base.Submodule.branch">
<code class="descname">branch</code><a class="headerlink" href="#git.objects.submodule.base.Submodule.branch" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">The branch instance that we are to checkout</td>
</tr>
<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><strong>InvalidGitRepositoryError</strong> &#8211; if our module is not yet checked out</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="attribute">
<dt id="git.objects.submodule.base.Submodule.branch_name">
<code class="descname">branch_name</code><a class="headerlink" href="#git.objects.submodule.base.Submodule.branch_name" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">the name of the branch, which is the shortest possible branch name</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="attribute">
<dt id="git.objects.submodule.base.Submodule.branch_path">
<code class="descname">branch_path</code><a class="headerlink" href="#git.objects.submodule.base.Submodule.branch_path" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">full (relative) path as string to the branch we would checkout
from the remote and track</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="git.objects.submodule.base.Submodule.children">
<code class="descname">children</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.submodule.base.Submodule.children" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">IterableList(Submodule, ...) an iterable list of submodules instances
which are children of this submodule or 0 if the submodule is not checked out</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="git.objects.submodule.base.Submodule.config_reader">
<code class="descname">config_reader</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.submodule.base.Submodule.config_reader" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">ConfigReader instance which allows you to qurey the configuration values
of this submodule, as provided by the .gitmodules file</td>
</tr>
<tr class="field-even field"><th class="field-name">Note:</th><td class="field-body">The config reader will actually read the data directly from the repository
and thus does not need nor care about your working tree.</td>
</tr>
<tr class="field-odd field"><th class="field-name">Note:</th><td class="field-body">Should be cached by the caller and only kept as long as needed</td>
</tr>
<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><strong>IOError</strong> &#8211; If the .gitmodules file/blob could not be read</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="git.objects.submodule.base.Submodule.config_writer">
<code class="descname">config_writer</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.submodule.base.Submodule.config_writer" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="git.objects.submodule.base.Submodule.exists">
<code class="descname">exists</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.submodule.base.Submodule.exists" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">True if the submodule exists, False otherwise. Please note that
a submodule may exist (in the .gitmodules file) even though its module
doesn&#8217;t exist on disk</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="classmethod">
<dt id="git.objects.submodule.base.Submodule.iter_items">
<em class="property">classmethod </em><code class="descname">iter_items</code><span class="sig-paren">(</span><em>repo</em>, <em>parent_commit='HEAD'</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.submodule.base.Submodule.iter_items" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">iterator yielding Submodule instances available in the given repository</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="attribute">
<dt id="git.objects.submodule.base.Submodule.k_default_mode">
<code class="descname">k_default_mode</code><em class="property"> = 57344</em><a class="headerlink" href="#git.objects.submodule.base.Submodule.k_default_mode" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.objects.submodule.base.Submodule.k_head_default">
<code class="descname">k_head_default</code><em class="property"> = 'master'</em><a class="headerlink" href="#git.objects.submodule.base.Submodule.k_head_default" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.objects.submodule.base.Submodule.k_head_option">
<code class="descname">k_head_option</code><em class="property"> = 'branch'</em><a class="headerlink" href="#git.objects.submodule.base.Submodule.k_head_option" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.objects.submodule.base.Submodule.k_modules_file">
<code class="descname">k_modules_file</code><em class="property"> = '.gitmodules'</em><a class="headerlink" href="#git.objects.submodule.base.Submodule.k_modules_file" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="git.objects.submodule.base.Submodule.module">
<code class="descname">module</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.submodule.base.Submodule.module" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="git.objects.submodule.base.Submodule.module_exists">
<code class="descname">module_exists</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.submodule.base.Submodule.module_exists" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">True if our module exists and is a valid git repository. See module() method</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="git.objects.submodule.base.Submodule.move">
<code class="descname">move</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.submodule.base.Submodule.move" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.objects.submodule.base.Submodule.name">
<code class="descname">name</code><a class="headerlink" href="#git.objects.submodule.base.Submodule.name" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">The name of this submodule. It is used to identify it within the
.gitmodules file.</td>
</tr>
<tr class="field-even field"><th class="field-name">Note:</th><td class="field-body">by default, the name is the path at which to find the submodule, but
in git-python it should be a unique identifier similar to the identifiers
used for remotes, which allows to change the path of the submodule
easily</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="attribute">
<dt id="git.objects.submodule.base.Submodule.parent_commit">
<code class="descname">parent_commit</code><a class="headerlink" href="#git.objects.submodule.base.Submodule.parent_commit" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Commit instance with the tree containing the .gitmodules file</td>
</tr>
<tr class="field-even field"><th class="field-name">Note:</th><td class="field-body">will always point to the current head&#8217;s commit if it was not set explicitly</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="git.objects.submodule.base.Submodule.remove">
<code class="descname">remove</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.submodule.base.Submodule.remove" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="git.objects.submodule.base.Submodule.rename">
<code class="descname">rename</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.submodule.base.Submodule.rename" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="git.objects.submodule.base.Submodule.set_parent_commit">
<code class="descname">set_parent_commit</code><span class="sig-paren">(</span><em>commit</em>, <em>check=True</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.submodule.base.Submodule.set_parent_commit" title="Permalink to this definition">¶</a></dt>
<dd><p>Set this instance to use the given commit whose tree is supposed to
contain the .gitmodules blob.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>commit</strong> &#8211; Commit&#8217;ish reference pointing at the root_tree, or None to always point to the
most recent commit</li>
<li><strong>check</strong> &#8211; if True, relatively expensive checks will be performed to verify
validity of the submodule.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><ul class="first simple">
<li><strong>ValueError</strong> &#8211; if the commit&#8217;s tree didn&#8217;t contain the .gitmodules blob.</li>
<li><strong>ValueError</strong> &#8211; if the parent commit didn&#8217;t store this submodule under the current path</li>
</ul>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">self</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="attribute">
<dt id="git.objects.submodule.base.Submodule.type">
<code class="descname">type</code><em class="property"> = 'submodule'</em><a class="headerlink" href="#git.objects.submodule.base.Submodule.type" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="git.objects.submodule.base.Submodule.update">
<code class="descname">update</code><span class="sig-paren">(</span><em>recursive=False</em>, <em>init=True</em>, <em>to_latest_revision=False</em>, <em>progress=None</em>, <em>dry_run=False</em>, <em>force=False</em>, <em>keep_going=False</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.submodule.base.Submodule.update" title="Permalink to this definition">¶</a></dt>
<dd><p>Update the repository of this submodule to point to the checkout
we point at with the binsha of this instance.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>recursive</strong> &#8211; if True, we will operate recursively and update child-
modules as well.</li>
<li><strong>init</strong> &#8211; if True, the module repository will be cloned into place if necessary</li>
<li><strong>to_latest_revision</strong> &#8211; if True, the submodule&#8217;s sha will be ignored during checkout.
Instead, the remote will be fetched, and the local tracking branch updated.
This only works if we have a local tracking branch, which is the case
if the remote repository had a master branch, or of the &#8216;branch&#8217; option
was specified for this submodule and the branch existed remotely</li>
<li><strong>progress</strong> &#8211; UpdateProgress instance or None if no progress should be shown</li>
<li><strong>dry_run</strong> &#8211; if True, the operation will only be simulated, but not performed.
All performed operations are read-only</li>
<li><strong>force</strong> &#8211; If True, we may reset heads even if the repository in question is dirty. Additinoally we will be allowed
to set a tracking branch which is ahead of its remote branch back into the past or the location of the
remote branch. This will essentially &#8216;forget&#8217; commits.
If False, local tracking branches that are in the future of their respective remote branches will simply
not be moved.</li>
<li><strong>keep_going</strong> &#8211; if True, we will ignore but log all errors, and keep going recursively.
Unless dry_run is set as well, keep_going could cause subsequent/inherited errors you wouldn&#8217;t see
otherwise.
In conjunction with dry_run, it can be useful to anticipate all errors when updating submodules</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Note:</th><td class="field-body"><p class="first">does nothing in bare repositories</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Note:</th><td class="field-body"><p class="first">method is definitely not atomic if recurisve is True</p>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">self</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="attribute">
<dt id="git.objects.submodule.base.Submodule.url">
<code class="descname">url</code><a class="headerlink" href="#git.objects.submodule.base.Submodule.url" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">The url to the repository which our module-repository refers to</td>
</tr>
</tbody>
</table>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="git.objects.submodule.base.UpdateProgress">
<em class="property">class </em><code class="descclassname">git.objects.submodule.base.</code><code class="descname">UpdateProgress</code><a class="headerlink" href="#git.objects.submodule.base.UpdateProgress" title="Permalink to this definition">¶</a></dt>
<dd><p>Class providing detailed progress information to the caller who should
derive from it and implement the <code class="docutils literal"><span class="pre">update(...)</span></code> message</p>
<dl class="attribute">
<dt id="git.objects.submodule.base.UpdateProgress.CLONE">
<code class="descname">CLONE</code><em class="property"> = 512</em><a class="headerlink" href="#git.objects.submodule.base.UpdateProgress.CLONE" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.objects.submodule.base.UpdateProgress.FETCH">
<code class="descname">FETCH</code><em class="property"> = 1024</em><a class="headerlink" href="#git.objects.submodule.base.UpdateProgress.FETCH" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.objects.submodule.base.UpdateProgress.UPDWKTREE">
<code class="descname">UPDWKTREE</code><em class="property"> = 2048</em><a class="headerlink" href="#git.objects.submodule.base.UpdateProgress.UPDWKTREE" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.objects.submodule.base.UpdateProgress.__module__">
<code class="descname">__module__</code><em class="property"> = 'git.objects.submodule.base'</em><a class="headerlink" href="#git.objects.submodule.base.UpdateProgress.__module__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.objects.submodule.base.UpdateProgress.__slots__">
<code class="descname">__slots__</code><em class="property"> = ()</em><a class="headerlink" href="#git.objects.submodule.base.UpdateProgress.__slots__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.objects.submodule.base.UpdateProgress.x">
<code class="descname">x</code><em class="property"> = 11</em><a class="headerlink" href="#git.objects.submodule.base.UpdateProgress.x" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

</div>
<div class="section" id="module-git.objects.submodule.root">
<span id="objects-submodule-root"></span><h2>Objects.Submodule.root<a class="headerlink" href="#module-git.objects.submodule.root" title="Permalink to this headline">¶</a></h2>
<dl class="class">
<dt id="git.objects.submodule.root.RootModule">
<em class="property">class </em><code class="descclassname">git.objects.submodule.root.</code><code class="descname">RootModule</code><span class="sig-paren">(</span><em>repo</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.submodule.root.RootModule" title="Permalink to this definition">¶</a></dt>
<dd><p>A (virtual) Root of all submodules in the given repository. It can be used
to more easily traverse all submodules of the master repository</p>
<dl class="method">
<dt id="git.objects.submodule.root.RootModule.__init__">
<code class="descname">__init__</code><span class="sig-paren">(</span><em>repo</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.submodule.root.RootModule.__init__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.objects.submodule.root.RootModule.__module__">
<code class="descname">__module__</code><em class="property"> = 'git.objects.submodule.root'</em><a class="headerlink" href="#git.objects.submodule.root.RootModule.__module__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.objects.submodule.root.RootModule.__slots__">
<code class="descname">__slots__</code><em class="property"> = ()</em><a class="headerlink" href="#git.objects.submodule.root.RootModule.__slots__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.objects.submodule.root.RootModule.k_root_name">
<code class="descname">k_root_name</code><em class="property"> = '__ROOT__'</em><a class="headerlink" href="#git.objects.submodule.root.RootModule.k_root_name" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="git.objects.submodule.root.RootModule.module">
<code class="descname">module</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.submodule.root.RootModule.module" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">the actual repository containing the submodules</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="git.objects.submodule.root.RootModule.update">
<code class="descname">update</code><span class="sig-paren">(</span><em>previous_commit=None</em>, <em>recursive=True</em>, <em>force_remove=False</em>, <em>init=True</em>, <em>to_latest_revision=False</em>, <em>progress=None</em>, <em>dry_run=False</em>, <em>force_reset=False</em>, <em>keep_going=False</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.submodule.root.RootModule.update" title="Permalink to this definition">¶</a></dt>
<dd><p>Update the submodules of this repository to the current HEAD commit.
This method behaves smartly by determining changes of the path of a submodules
repository, next to changes to the to-be-checked-out commit or the branch to be
checked out. This works if the submodules ID does not change.
Additionally it will detect addition and removal of submodules, which will be handled
gracefully.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>previous_commit</strong> &#8211; If set to a commit&#8217;ish, the commit we should use
as the previous commit the HEAD pointed to before it was set to the commit it points to now.
If None, it defaults to <a class="reference external" href="mailto:HEAD&#37;&#52;&#48;{1">HEAD<span>&#64;</span>{1</a>} otherwise</li>
<li><strong>recursive</strong> &#8211; if True, the children of submodules will be updated as well
using the same technique</li>
<li><strong>force_remove</strong> &#8211; If submodules have been deleted, they will be forcibly removed.
Otherwise the update may fail if a submodule&#8217;s repository cannot be deleted as
changes have been made to it (see Submodule.update() for more information)</li>
<li><strong>init</strong> &#8211; If we encounter a new module which would need to be initialized, then do it.</li>
<li><strong>to_latest_revision</strong> &#8211; If True, instead of checking out the revision pointed to
by this submodule&#8217;s sha, the checked out tracking branch will be merged with the
latest remote branch fetched from the repository&#8217;s origin.
Unless force_reset is specified, a local tracking branch will never be reset into its past, therefore
the remote branch must be in the future for this to have an effect.</li>
<li><strong>force_reset</strong> &#8211; if True, submodules may checkout or reset their branch even if the repository has
pending changes that would be overwritten, or if the local tracking branch is in the future of the
remote tracking branch and would be reset into its past.</li>
<li><strong>progress</strong> &#8211; RootUpdateProgress instance or None if no progress should be sent</li>
<li><strong>dry_run</strong> &#8211; if True, operations will not actually be performed. Progress messages
will change accordingly to indicate the WOULD DO state of the operation.</li>
<li><strong>keep_going</strong> &#8211; if True, we will ignore but log all errors, and keep going recursively.
Unless dry_run is set as well, keep_going could cause subsequent/inherited errors you wouldn&#8217;t see
otherwise.
In conjunction with dry_run, it can be useful to anticipate all errors when updating submodules</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">self</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="git.objects.submodule.root.RootUpdateProgress">
<em class="property">class </em><code class="descclassname">git.objects.submodule.root.</code><code class="descname">RootUpdateProgress</code><a class="headerlink" href="#git.objects.submodule.root.RootUpdateProgress" title="Permalink to this definition">¶</a></dt>
<dd><p>Utility class which adds more opcodes to the UpdateProgress</p>
<dl class="attribute">
<dt id="git.objects.submodule.root.RootUpdateProgress.BRANCHCHANGE">
<code class="descname">BRANCHCHANGE</code><em class="property"> = 16384</em><a class="headerlink" href="#git.objects.submodule.root.RootUpdateProgress.BRANCHCHANGE" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.objects.submodule.root.RootUpdateProgress.PATHCHANGE">
<code class="descname">PATHCHANGE</code><em class="property"> = 8192</em><a class="headerlink" href="#git.objects.submodule.root.RootUpdateProgress.PATHCHANGE" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.objects.submodule.root.RootUpdateProgress.REMOVE">
<code class="descname">REMOVE</code><em class="property"> = 4096</em><a class="headerlink" href="#git.objects.submodule.root.RootUpdateProgress.REMOVE" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.objects.submodule.root.RootUpdateProgress.URLCHANGE">
<code class="descname">URLCHANGE</code><em class="property"> = 32768</em><a class="headerlink" href="#git.objects.submodule.root.RootUpdateProgress.URLCHANGE" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.objects.submodule.root.RootUpdateProgress.__module__">
<code class="descname">__module__</code><em class="property"> = 'git.objects.submodule.root'</em><a class="headerlink" href="#git.objects.submodule.root.RootUpdateProgress.__module__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.objects.submodule.root.RootUpdateProgress.__slots__">
<code class="descname">__slots__</code><em class="property"> = ()</em><a class="headerlink" href="#git.objects.submodule.root.RootUpdateProgress.__slots__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.objects.submodule.root.RootUpdateProgress.x">
<code class="descname">x</code><em class="property"> = 15</em><a class="headerlink" href="#git.objects.submodule.root.RootUpdateProgress.x" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

</div>
<div class="section" id="module-git.objects.submodule.util">
<span id="objects-submodule-util"></span><h2>Objects.Submodule.util<a class="headerlink" href="#module-git.objects.submodule.util" title="Permalink to this headline">¶</a></h2>
<dl class="function">
<dt id="git.objects.submodule.util.sm_section">
<code class="descclassname">git.objects.submodule.util.</code><code class="descname">sm_section</code><span class="sig-paren">(</span><em>name</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.submodule.util.sm_section" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">section title used in .gitmodules configuration file</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="function">
<dt id="git.objects.submodule.util.sm_name">
<code class="descclassname">git.objects.submodule.util.</code><code class="descname">sm_name</code><span class="sig-paren">(</span><em>section</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.submodule.util.sm_name" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">name of the submodule as parsed from the section name</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="function">
<dt id="git.objects.submodule.util.mkhead">
<code class="descclassname">git.objects.submodule.util.</code><code class="descname">mkhead</code><span class="sig-paren">(</span><em>repo</em>, <em>path</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.submodule.util.mkhead" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">New branch/head instance</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="function">
<dt id="git.objects.submodule.util.find_first_remote_branch">
<code class="descclassname">git.objects.submodule.util.</code><code class="descname">find_first_remote_branch</code><span class="sig-paren">(</span><em>remotes</em>, <em>branch_name</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.submodule.util.find_first_remote_branch" title="Permalink to this definition">¶</a></dt>
<dd><p>Find the remote branch matching the name of the given branch or raise InvalidGitRepositoryError</p>
</dd></dl>

<dl class="class">
<dt id="git.objects.submodule.util.SubmoduleConfigParser">
<em class="property">class </em><code class="descclassname">git.objects.submodule.util.</code><code class="descname">SubmoduleConfigParser</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.submodule.util.SubmoduleConfigParser" title="Permalink to this definition">¶</a></dt>
<dd><p>Catches calls to _write, and updates the .gitmodules blob in the index
with the new data, if we have written into a stream. Otherwise it will
add the local file to the index to make it correspond with the working tree.
Additionally, the cache must be cleared</p>
<p>Please note that no mutating method will work in bare mode</p>
<dl class="attribute">
<dt id="git.objects.submodule.util.SubmoduleConfigParser.__abstractmethods__">
<code class="descname">__abstractmethods__</code><em class="property"> = frozenset([])</em><a class="headerlink" href="#git.objects.submodule.util.SubmoduleConfigParser.__abstractmethods__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="git.objects.submodule.util.SubmoduleConfigParser.__init__">
<code class="descname">__init__</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.submodule.util.SubmoduleConfigParser.__init__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.objects.submodule.util.SubmoduleConfigParser.__module__">
<code class="descname">__module__</code><em class="property"> = 'git.objects.submodule.util'</em><a class="headerlink" href="#git.objects.submodule.util.SubmoduleConfigParser.__module__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="git.objects.submodule.util.SubmoduleConfigParser.flush_to_index">
<code class="descname">flush_to_index</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.submodule.util.SubmoduleConfigParser.flush_to_index" title="Permalink to this definition">¶</a></dt>
<dd><p>Flush changes in our configuration file to the index</p>
</dd></dl>

<dl class="method">
<dt id="git.objects.submodule.util.SubmoduleConfigParser.set_submodule">
<code class="descname">set_submodule</code><span class="sig-paren">(</span><em>submodule</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.submodule.util.SubmoduleConfigParser.set_submodule" title="Permalink to this definition">¶</a></dt>
<dd><p>Set this instance&#8217;s submodule. It must be called before
the first write operation begins</p>
</dd></dl>

<dl class="method">
<dt id="git.objects.submodule.util.SubmoduleConfigParser.write">
<code class="descname">write</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.submodule.util.SubmoduleConfigParser.write" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

</div>
<div class="section" id="module-git.objects.util">
<span id="objects-util"></span><h2>Objects.Util<a class="headerlink" href="#module-git.objects.util" title="Permalink to this headline">¶</a></h2>
<p>Module for general utility functions</p>
<dl class="function">
<dt id="git.objects.util.get_object_type_by_name">
<code class="descclassname">git.objects.util.</code><code class="descname">get_object_type_by_name</code><span class="sig-paren">(</span><em>object_type_name</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.util.get_object_type_by_name" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">type suitable to handle the given object type name.
Use the type to create new instances.</td>
</tr>
<tr class="field-even field"><th class="field-name">Parameters:</th><td class="field-body"><strong>object_type_name</strong> &#8211; Member of TYPES</td>
</tr>
<tr class="field-odd field"><th class="field-name">Raises:</th><td class="field-body"><strong>ValueError</strong> &#8211; In case object_type_name is unknown</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="function">
<dt id="git.objects.util.parse_date">
<code class="descclassname">git.objects.util.</code><code class="descname">parse_date</code><span class="sig-paren">(</span><em>string_date</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.util.parse_date" title="Permalink to this definition">¶</a></dt>
<dd><p>Parse the given date as one of the following</p>
<blockquote>
<div><ul>
<li><p class="first">Git internal format: timestamp offset</p>
</li>
<li><p class="first">RFC 2822: Thu, 07 Apr 2005 22:13:13 +0200.</p>
</li>
<li><dl class="first docutils">
<dt>ISO 8601 2005-04-07T22:13:13</dt>
<dd><p class="first last">The T can be a space as well</p>
</dd>
</dl>
</li>
</ul>
</div></blockquote>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Tuple(int(timestamp_UTC), int(offset)), both in seconds since epoch</td>
</tr>
<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><strong>ValueError</strong> &#8211; If the format could not be understood</td>
</tr>
<tr class="field-odd field"><th class="field-name">Note:</th><td class="field-body">Date can also be YYYY.MM.DD, MM/DD/YYYY and DD.MM.YYYY.</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="function">
<dt id="git.objects.util.parse_actor_and_date">
<code class="descclassname">git.objects.util.</code><code class="descname">parse_actor_and_date</code><span class="sig-paren">(</span><em>line</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.util.parse_actor_and_date" title="Permalink to this definition">¶</a></dt>
<dd><p>Parse out the actor (author or committer) info from a line like:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">author</span> <span class="n">Tom</span> <span class="n">Preston</span><span class="o">-</span><span class="n">Werner</span> <span class="o">&lt;</span><span class="n">tom</span><span class="nd">@mojombo</span><span class="o">.</span><span class="n">com</span><span class="o">&gt;</span> <span class="mi">1191999972</span> <span class="o">-</span><span class="mi">0700</span>
</pre></div>
</div>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">[Actor, int_seconds_since_epoch, int_timezone_offset]</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="class">
<dt id="git.objects.util.ProcessStreamAdapter">
<em class="property">class </em><code class="descclassname">git.objects.util.</code><code class="descname">ProcessStreamAdapter</code><span class="sig-paren">(</span><em>process</em>, <em>stream_name</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.util.ProcessStreamAdapter" title="Permalink to this definition">¶</a></dt>
<dd><p>Class wireing all calls to the contained Process instance.</p>
<p>Use this type to hide the underlying process to provide access only to a specified
stream. The process is usually wrapped into an AutoInterrupt class to kill
it if the instance goes out of scope.</p>
<dl class="method">
<dt id="git.objects.util.ProcessStreamAdapter.__getattr__">
<code class="descname">__getattr__</code><span class="sig-paren">(</span><em>attr</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.util.ProcessStreamAdapter.__getattr__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="git.objects.util.ProcessStreamAdapter.__init__">
<code class="descname">__init__</code><span class="sig-paren">(</span><em>process</em>, <em>stream_name</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.util.ProcessStreamAdapter.__init__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.objects.util.ProcessStreamAdapter.__module__">
<code class="descname">__module__</code><em class="property"> = 'git.objects.util'</em><a class="headerlink" href="#git.objects.util.ProcessStreamAdapter.__module__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.objects.util.ProcessStreamAdapter.__slots__">
<code class="descname">__slots__</code><em class="property"> = ('_proc', '_stream')</em><a class="headerlink" href="#git.objects.util.ProcessStreamAdapter.__slots__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="class">
<dt id="git.objects.util.Traversable">
<em class="property">class </em><code class="descclassname">git.objects.util.</code><code class="descname">Traversable</code><a class="headerlink" href="#git.objects.util.Traversable" title="Permalink to this definition">¶</a></dt>
<dd><p>Simple interface to perform depth-first or breadth-first traversals
into one direction.
Subclasses only need to implement one function.
Instances of the Subclass must be hashable</p>
<dl class="attribute">
<dt id="git.objects.util.Traversable.__module__">
<code class="descname">__module__</code><em class="property"> = 'git.objects.util'</em><a class="headerlink" href="#git.objects.util.Traversable.__module__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.objects.util.Traversable.__slots__">
<code class="descname">__slots__</code><em class="property"> = ()</em><a class="headerlink" href="#git.objects.util.Traversable.__slots__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="git.objects.util.Traversable.list_traverse">
<code class="descname">list_traverse</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.util.Traversable.list_traverse" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">IterableList with the results of the traversal as produced by
traverse()</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="git.objects.util.Traversable.traverse">
<code class="descname">traverse</code><span class="sig-paren">(</span><em>predicate=&lt;function &lt;lambda&gt;&gt;</em>, <em>prune=&lt;function &lt;lambda&gt;&gt;</em>, <em>depth=-1</em>, <em>branch_first=True</em>, <em>visit_once=True</em>, <em>ignore_self=1</em>, <em>as_edge=False</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.util.Traversable.traverse" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">iterator yieling of items found when traversing self</p>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>predicate</strong> &#8211; f(i,d) returns False if item i at depth d should not be included in the result</li>
<li><strong>prune</strong> &#8211; f(i,d) return True if the search should stop at item i at depth d.
Item i will not be returned.</li>
<li><strong>depth</strong> &#8211; define at which level the iteration should not go deeper
if -1, there is no limit
if 0, you would effectively only get self, the root of the iteration
i.e. if 1, you would only get the first level of predessessors/successors</li>
<li><strong>branch_first</strong> &#8211; if True, items will be returned branch first, otherwise depth first</li>
<li><strong>visit_once</strong> &#8211; if True, items will only be returned once, although they might be encountered
several times. Loops are prevented that way.</li>
<li><strong>ignore_self</strong> &#8211; if True, self will be ignored and automatically pruned from
the result. Otherwise it will be the first item to be returned.
If as_edge is True, the source of the first edge is None</li>
<li><strong>as_edge</strong> &#8211; if True, return a pair of items, first being the source, second the
destinatination, i.e. tuple(src, dest) with the edge spanning from
source to destination</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>

</dd></dl>

<dl class="function">
<dt id="git.objects.util.altz_to_utctz_str">
<code class="descclassname">git.objects.util.</code><code class="descname">altz_to_utctz_str</code><span class="sig-paren">(</span><em>altz</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.util.altz_to_utctz_str" title="Permalink to this definition">¶</a></dt>
<dd><p>As above, but inverses the operation, returning a string that can be used
in commit objects</p>
</dd></dl>

<dl class="function">
<dt id="git.objects.util.utctz_to_altz">
<code class="descclassname">git.objects.util.</code><code class="descname">utctz_to_altz</code><span class="sig-paren">(</span><em>utctz</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.util.utctz_to_altz" title="Permalink to this definition">¶</a></dt>
<dd><p>we convert utctz to the timezone in seconds, it is the format time.altzone
returns. Git stores it as UTC timezone which has the opposite sign as well,
which explains the -1 * ( that was made explicit here )
:param utctz: git utc timezone string, i.e. +0200</p>
</dd></dl>

<dl class="function">
<dt id="git.objects.util.verify_utctz">
<code class="descclassname">git.objects.util.</code><code class="descname">verify_utctz</code><span class="sig-paren">(</span><em>offset</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.util.verify_utctz" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Raises:</th><td class="field-body"><strong>ValueError</strong> &#8211; if offset is incorrect</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">offset</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="class">
<dt id="git.objects.util.Actor">
<em class="property">class </em><code class="descclassname">git.objects.util.</code><code class="descname">Actor</code><span class="sig-paren">(</span><em>name</em>, <em>email</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.util.Actor" title="Permalink to this definition">¶</a></dt>
<dd><p>Actors hold information about a person acting on the repository. They
can be committers and authors or anything with a name and an email as
mentioned in the git log entries.</p>
<dl class="method">
<dt id="git.objects.util.Actor.__eq__">
<code class="descname">__eq__</code><span class="sig-paren">(</span><em>other</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.util.Actor.__eq__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="git.objects.util.Actor.__hash__">
<code class="descname">__hash__</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.util.Actor.__hash__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="git.objects.util.Actor.__init__">
<code class="descname">__init__</code><span class="sig-paren">(</span><em>name</em>, <em>email</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.util.Actor.__init__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.objects.util.Actor.__module__">
<code class="descname">__module__</code><em class="property"> = 'git.util'</em><a class="headerlink" href="#git.objects.util.Actor.__module__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="git.objects.util.Actor.__ne__">
<code class="descname">__ne__</code><span class="sig-paren">(</span><em>other</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.util.Actor.__ne__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="git.objects.util.Actor.__repr__">
<code class="descname">__repr__</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.util.Actor.__repr__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.objects.util.Actor.__slots__">
<code class="descname">__slots__</code><em class="property"> = ('name', 'email')</em><a class="headerlink" href="#git.objects.util.Actor.__slots__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="git.objects.util.Actor.__str__">
<code class="descname">__str__</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.util.Actor.__str__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="classmethod">
<dt id="git.objects.util.Actor.author">
<em class="property">classmethod </em><code class="descname">author</code><span class="sig-paren">(</span><em>config_reader=None</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.util.Actor.author" title="Permalink to this definition">¶</a></dt>
<dd><p>Same as committer(), but defines the main author. It may be specified in the environment,
but defaults to the committer</p>
</dd></dl>

<dl class="classmethod">
<dt id="git.objects.util.Actor.committer">
<em class="property">classmethod </em><code class="descname">committer</code><span class="sig-paren">(</span><em>config_reader=None</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.util.Actor.committer" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Actor instance corresponding to the configured committer. It behaves
similar to the git implementation, such that the environment will override
configuration values of config_reader. If no value is set at all, it will be
generated</td>
</tr>
<tr class="field-even field"><th class="field-name">Parameters:</th><td class="field-body"><strong>config_reader</strong> &#8211; ConfigReader to use to retrieve the values from in case
they are not set in the environment</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="attribute">
<dt id="git.objects.util.Actor.conf_email">
<code class="descname">conf_email</code><em class="property"> = 'email'</em><a class="headerlink" href="#git.objects.util.Actor.conf_email" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.objects.util.Actor.conf_name">
<code class="descname">conf_name</code><em class="property"> = 'name'</em><a class="headerlink" href="#git.objects.util.Actor.conf_name" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.objects.util.Actor.email">
<code class="descname">email</code><a class="headerlink" href="#git.objects.util.Actor.email" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.objects.util.Actor.env_author_email">
<code class="descname">env_author_email</code><em class="property"> = 'GIT_AUTHOR_EMAIL'</em><a class="headerlink" href="#git.objects.util.Actor.env_author_email" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.objects.util.Actor.env_author_name">
<code class="descname">env_author_name</code><em class="property"> = 'GIT_AUTHOR_NAME'</em><a class="headerlink" href="#git.objects.util.Actor.env_author_name" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.objects.util.Actor.env_committer_email">
<code class="descname">env_committer_email</code><em class="property"> = 'GIT_COMMITTER_EMAIL'</em><a class="headerlink" href="#git.objects.util.Actor.env_committer_email" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.objects.util.Actor.env_committer_name">
<code class="descname">env_committer_name</code><em class="property"> = 'GIT_COMMITTER_NAME'</em><a class="headerlink" href="#git.objects.util.Actor.env_committer_name" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.objects.util.Actor.name">
<code class="descname">name</code><a class="headerlink" href="#git.objects.util.Actor.name" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.objects.util.Actor.name_email_regex">
<code class="descname">name_email_regex</code><em class="property"> = &lt;_sre.SRE_Pattern object&gt;</em><a class="headerlink" href="#git.objects.util.Actor.name_email_regex" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.objects.util.Actor.name_only_regex">
<code class="descname">name_only_regex</code><em class="property"> = &lt;_sre.SRE_Pattern object&gt;</em><a class="headerlink" href="#git.objects.util.Actor.name_only_regex" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="class">
<dt id="git.objects.util.tzoffset">
<em class="property">class </em><code class="descclassname">git.objects.util.</code><code class="descname">tzoffset</code><span class="sig-paren">(</span><em>secs_west_of_utc</em>, <em>name=None</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.util.tzoffset" title="Permalink to this definition">¶</a></dt>
<dd><dl class="attribute">
<dt id="git.objects.util.tzoffset.__dict__">
<code class="descname">__dict__</code><em class="property"> = dict_proxy({'__module__': 'git.objects.util', 'dst': &lt;function dst at 0x10fe00e60&gt;, 'utcoffset': &lt;function utcoffset at 0x10fe00d70&gt;, 'tzname': &lt;function tzname at 0x10fe00de8&gt;, '__dict__': &lt;attribute '__dict__' of 'tzoffset' objects&gt;, '__weakref__': &lt;attribute '__weakref__' of 'tzoffset' objects&gt;, '__doc__': None, '__init__': &lt;function __init__ at 0x10fe00cf8&gt;})</em><a class="headerlink" href="#git.objects.util.tzoffset.__dict__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="git.objects.util.tzoffset.__init__">
<code class="descname">__init__</code><span class="sig-paren">(</span><em>secs_west_of_utc</em>, <em>name=None</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.util.tzoffset.__init__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.objects.util.tzoffset.__module__">
<code class="descname">__module__</code><em class="property"> = 'git.objects.util'</em><a class="headerlink" href="#git.objects.util.tzoffset.__module__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.objects.util.tzoffset.__weakref__">
<code class="descname">__weakref__</code><a class="headerlink" href="#git.objects.util.tzoffset.__weakref__" title="Permalink to this definition">¶</a></dt>
<dd><p>list of weak references to the object (if defined)</p>
</dd></dl>

<dl class="method">
<dt id="git.objects.util.tzoffset.dst">
<code class="descname">dst</code><span class="sig-paren">(</span><em>dt</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.util.tzoffset.dst" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="git.objects.util.tzoffset.tzname">
<code class="descname">tzname</code><span class="sig-paren">(</span><em>dt</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.util.tzoffset.tzname" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="git.objects.util.tzoffset.utcoffset">
<code class="descname">utcoffset</code><span class="sig-paren">(</span><em>dt</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.util.tzoffset.utcoffset" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

</div>
<div class="section" id="module-git.index.base">
<span id="index-base"></span><h2>Index.Base<a class="headerlink" href="#module-git.index.base" title="Permalink to this headline">¶</a></h2>
<dl class="class">
<dt id="git.index.base.IndexFile">
<em class="property">class </em><code class="descclassname">git.index.base.</code><code class="descname">IndexFile</code><span class="sig-paren">(</span><em>repo</em>, <em>file_path=None</em><span class="sig-paren">)</span><a class="headerlink" href="#git.index.base.IndexFile" title="Permalink to this definition">¶</a></dt>
<dd><p>Implements an Index that can be manipulated using a native implementation in
order to save git command function calls wherever possible.</p>
<p>It provides custom merging facilities allowing to merge without actually changing
your index or your working tree. This way you can perform own test-merges based
on the index only without having to deal with the working copy. This is useful
in case of partial working trees.</p>
<p><code class="docutils literal"><span class="pre">Entries</span></code></p>
<p>The index contains an entries dict whose keys are tuples of type IndexEntry
to facilitate access.</p>
<p>You may read the entries dict or manipulate it using IndexEntry instance, i.e.:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">index</span><span class="o">.</span><span class="n">entries</span><span class="p">[</span><span class="n">index</span><span class="o">.</span><span class="n">entry_key</span><span class="p">(</span><span class="n">index_entry_instance</span><span class="p">)]</span> <span class="o">=</span> <span class="n">index_entry_instance</span>
</pre></div>
</div>
<p>Make sure you use index.write() once you are done manipulating the index directly
before operating on it using the git command</p>
<dl class="attribute">
<dt id="git.index.base.IndexFile.S_IFGITLINK">
<code class="descname">S_IFGITLINK</code><em class="property"> = 57344</em><a class="headerlink" href="#git.index.base.IndexFile.S_IFGITLINK" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="git.index.base.IndexFile.__init__">
<code class="descname">__init__</code><span class="sig-paren">(</span><em>repo</em>, <em>file_path=None</em><span class="sig-paren">)</span><a class="headerlink" href="#git.index.base.IndexFile.__init__" title="Permalink to this definition">¶</a></dt>
<dd><p>Initialize this Index instance, optionally from the given <code class="docutils literal"><span class="pre">file_path</span></code>.
If no file_path is given, we will be created from the current index file.</p>
<p>If a stream is not given, the stream will be initialized from the current
repository&#8217;s index on demand.</p>
</dd></dl>

<dl class="attribute">
<dt id="git.index.base.IndexFile.__module__">
<code class="descname">__module__</code><em class="property"> = 'git.index.base'</em><a class="headerlink" href="#git.index.base.IndexFile.__module__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.index.base.IndexFile.__slots__">
<code class="descname">__slots__</code><em class="property"> = ('repo', 'version', 'entries', '_extension_data', '_file_path')</em><a class="headerlink" href="#git.index.base.IndexFile.__slots__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="git.index.base.IndexFile.add">
<code class="descname">add</code><span class="sig-paren">(</span><em>items</em>, <em>force=True</em>, <em>fprogress=&lt;function &lt;lambda&gt;&gt;</em>, <em>path_rewriter=None</em>, <em>write=True</em>, <em>write_extension_data=False</em><span class="sig-paren">)</span><a class="headerlink" href="#git.index.base.IndexFile.add" title="Permalink to this definition">¶</a></dt>
<dd><p>Add files from the working tree, specific blobs or BaseIndexEntries
to the index.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>items</strong> &#8211; <p>Multiple types of items are supported, types can be mixed within one call.
Different types imply a different handling. File paths may generally be
relative or absolute.</p>
<ul>
<li><dl class="first docutils">
<dt>path string</dt>
<dd>strings denote a relative or absolute path into the repository pointing to
an existing file, i.e. CHANGES, lib/myfile.ext, &#8216;/home/gitrepo/lib/myfile.ext&#8217;.<p>Absolute paths must start with working tree directory of this index&#8217;s repository
to be considered valid. For example, if it was initialized with a non-normalized path, like
<cite>/root/repo/../repo</cite>, absolute paths to be added must start with <cite>/root/repo/../repo</cite>.</p>
<p>Paths provided like this must exist. When added, they will be written
into the object database.</p>
<p>PathStrings may contain globs, such as &#8216;lib/__init__*&#8217; or can be directories
like &#8216;lib&#8217;, the latter ones will add all the files within the dirctory and
subdirectories.</p>
<p>This equals a straight git-add.</p>
<p class="last">They are added at stage 0</p>
</dd>
</dl>
</li>
<li><dl class="first docutils">
<dt>Blob or Submodule object</dt>
<dd>Blobs are added as they are assuming a valid mode is set.
The file they refer to may or may not exist in the file system, but
must be a path relative to our repository.<p>If their sha is null ( 40*0 ), their path must exist in the file system
relative to the git repository as an object will be created from
the data at the path.
The handling now very much equals the way string paths are processed, except that
the mode you have set will be kept. This allows you to create symlinks
by settings the mode respectively and writing the target of the symlink
directly into the file. This equals a default Linux-Symlink which
is not dereferenced automatically, except that it can be created on
filesystems not supporting it as well.</p>
<p>Please note that globs or directories are not allowed in Blob objects.</p>
<p class="last">They are added at stage 0</p>
</dd>
</dl>
</li>
<li><dl class="first docutils">
<dt>BaseIndexEntry or type</dt>
<dd>Handling equals the one of Blob objects, but the stage may be
explicitly set. Please note that Index Entries require binary sha&#8217;s.</dd>
</dl>
</li>
</ul>
</li>
<li><strong>force</strong> &#8211; <strong>CURRENTLY INEFFECTIVE</strong>
If True, otherwise ignored or excluded files will be
added anyway.
As opposed to the git-add command, we enable this flag by default
as the API user usually wants the item to be added even though
they might be excluded.</li>
<li><strong>fprogress</strong> &#8211; Function with signature f(path, done=False, item=item) called for each
path to be added, one time once it is about to be added where done==False
and once after it was added where done=True.
item is set to the actual item we handle, either a Path or a BaseIndexEntry
Please note that the processed path is not guaranteed to be present
in the index already as the index is currently being processed.</li>
<li><strong>path_rewriter</strong> &#8211; Function with signature (string) func(BaseIndexEntry) function returning a path
for each passed entry which is the path to be actually recorded for the
object created from entry.path. This allows you to write an index which
is not identical to the layout of the actual files on your hard-disk.
If not None and <code class="docutils literal"><span class="pre">items</span></code> contain plain paths, these paths will be
converted to Entries beforehand and passed to the path_rewriter.
Please note that entry.path is relative to the git repository.</li>
<li><strong>write</strong> &#8211; If True, the index will be written once it was altered. Otherwise
the changes only exist in memory and are not available to git commands.</li>
<li><strong>write_extension_data</strong> &#8211; If True, extension data will be written back to the index. This can lead to issues in case
it is containing the &#8216;TREE&#8217; extension, which will cause the <cite>git commit</cite> command to write an
old tree, instead of a new one representing the now changed index.
This doesn&#8217;t matter if you use <cite>IndexFile.commit()</cite>, which ignores the <cite>TREE</cite> extension altogether.
You should set it to True if you intend to use <cite>IndexFile.commit()</cite> exclusively while maintaining
support for third-party extensions. Besides that, you can usually safely ignore the built-in
extensions when using GitPython on repositories that are not handled manually at all.
All current built-in extensions are listed here:
<a class="reference external" href="http://opensource.apple.com/source/Git/Git-26/src/git-htmldocs/technical/index-format.txt">http://opensource.apple.com/source/Git/Git-26/src/git-htmldocs/technical/index-format.txt</a></li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">List(BaseIndexEntries) representing the entries just actually added.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><strong>OSError</strong> &#8211; if a supplied Path did not exist. Please note that BaseIndexEntry
Objects that do not have a null sha will be added even if their paths
do not exist.</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="git.index.base.IndexFile.checkout">
<code class="descname">checkout</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#git.index.base.IndexFile.checkout" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="git.index.base.IndexFile.commit">
<code class="descname">commit</code><span class="sig-paren">(</span><em>message</em>, <em>parent_commits=None</em>, <em>head=True</em>, <em>author=None</em>, <em>committer=None</em>, <em>author_date=None</em>, <em>commit_date=None</em>, <em>skip_hooks=False</em><span class="sig-paren">)</span><a class="headerlink" href="#git.index.base.IndexFile.commit" title="Permalink to this definition">¶</a></dt>
<dd><p>Commit the current default index file, creating a commit object.
For more information on the arguments, see tree.commit.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Note:</th><td class="field-body">If you have manually altered the .entries member of this instance,
don&#8217;t forget to write() your changes to disk beforehand.
Passing skip_hooks=True is the equivalent of using <cite>-n</cite>
or <cite>&#8211;no-verify</cite> on the command line.</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">Commit object representing the new commit</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="git.index.base.IndexFile.diff">
<code class="descname">diff</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#git.index.base.IndexFile.diff" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.index.base.IndexFile.entries">
<code class="descname">entries</code><a class="headerlink" href="#git.index.base.IndexFile.entries" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="classmethod">
<dt id="git.index.base.IndexFile.entry_key">
<em class="property">classmethod </em><code class="descname">entry_key</code><span class="sig-paren">(</span><em>*entry</em><span class="sig-paren">)</span><a class="headerlink" href="#git.index.base.IndexFile.entry_key" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="classmethod">
<dt id="git.index.base.IndexFile.from_tree">
<em class="property">classmethod </em><code class="descname">from_tree</code><span class="sig-paren">(</span><em>repo</em>, <em>*treeish</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#git.index.base.IndexFile.from_tree" title="Permalink to this definition">¶</a></dt>
<dd><p>Merge the given treeish revisions into a new index which is returned.
The original index will remain unaltered</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>repo</strong> &#8211; The repository treeish are located in.</li>
<li><strong>treeish</strong> &#8211; One, two or three Tree Objects, Commits or 40 byte hexshas. The result
changes according to the amount of trees.
If 1 Tree is given, it will just be read into a new index
If 2 Trees are given, they will be merged into a new index using a
two way merge algorithm. Tree 1 is the &#8216;current&#8217; tree, tree 2 is the &#8216;other&#8217;
one. It behaves like a fast-forward.
If 3 Trees are given, a 3-way merge will be performed with the first tree
being the common ancestor of tree 2 and tree 3. Tree 2 is the &#8216;current&#8217; tree,
tree 3 is the &#8216;other&#8217; one</li>
<li><strong>kwargs</strong> &#8211; Additional arguments passed to git-read-tree</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">New IndexFile instance. It will point to a temporary index location which
does not exist anymore. If you intend to write such a merged Index, supply
an alternate file_path to its &#8216;write&#8217; method.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Note:</th><td class="field-body"><p class="first">In the three-way merge case, &#8211;aggressive will be specified to automatically
resolve more cases in a commonly correct manner. Specify trivial=True as kwarg
to override that.</p>
<p class="last">As the underlying git-read-tree command takes into account the current index,
it will be temporarily moved out of the way to assure there are no unsuspected
interferences.</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="git.index.base.IndexFile.iter_blobs">
<code class="descname">iter_blobs</code><span class="sig-paren">(</span><em>predicate=&lt;function &lt;lambda&gt;&gt;</em><span class="sig-paren">)</span><a class="headerlink" href="#git.index.base.IndexFile.iter_blobs" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Iterator yielding tuples of Blob objects and stages, tuple(stage, Blob)</td>
</tr>
<tr class="field-even field"><th class="field-name">Parameters:</th><td class="field-body"><strong>predicate</strong> &#8211; Function(t) returning True if tuple(stage, Blob) should be yielded by the
iterator. A default filter, the BlobFilter, allows you to yield blobs
only if they match a given list of paths.</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="git.index.base.IndexFile.merge_tree">
<code class="descname">merge_tree</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#git.index.base.IndexFile.merge_tree" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="git.index.base.IndexFile.move">
<code class="descname">move</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#git.index.base.IndexFile.move" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="classmethod">
<dt id="git.index.base.IndexFile.new">
<em class="property">classmethod </em><code class="descname">new</code><span class="sig-paren">(</span><em>repo</em>, <em>*tree_sha</em><span class="sig-paren">)</span><a class="headerlink" href="#git.index.base.IndexFile.new" title="Permalink to this definition">¶</a></dt>
<dd><p>Merge the given treeish revisions into a new index which is returned.
This method behaves like git-read-tree &#8211;aggressive when doing the merge.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>repo</strong> &#8211; The repository treeish are located in.</li>
<li><strong>tree_sha</strong> &#8211; 20 byte or 40 byte tree sha or tree objects</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">New IndexFile instance. Its path will be undefined.
If you intend to write such a merged Index, supply an alternate file_path
to its &#8216;write&#8217; method.</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="attribute">
<dt id="git.index.base.IndexFile.path">
<code class="descname">path</code><a class="headerlink" href="#git.index.base.IndexFile.path" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Path to the index file we are representing</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="git.index.base.IndexFile.remove">
<code class="descname">remove</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#git.index.base.IndexFile.remove" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.index.base.IndexFile.repo">
<code class="descname">repo</code><a class="headerlink" href="#git.index.base.IndexFile.repo" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="git.index.base.IndexFile.reset">
<code class="descname">reset</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#git.index.base.IndexFile.reset" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="git.index.base.IndexFile.resolve_blobs">
<code class="descname">resolve_blobs</code><span class="sig-paren">(</span><em>iter_blobs</em><span class="sig-paren">)</span><a class="headerlink" href="#git.index.base.IndexFile.resolve_blobs" title="Permalink to this definition">¶</a></dt>
<dd><p>Resolve the blobs given in blob iterator. This will effectively remove the
index entries of the respective path at all non-null stages and add the given
blob as new stage null blob.</p>
<p>For each path there may only be one blob, otherwise a ValueError will be raised
claiming the path is already at stage 0.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Raises:</th><td class="field-body"><strong>ValueError</strong> &#8211; if one of the blobs already existed at stage 0</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">self</td>
</tr>
<tr class="field-odd field"><th class="field-name">Note:</th><td class="field-body">You will have to write the index manually once you are done, i.e.
index.resolve_blobs(blobs).write()</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="git.index.base.IndexFile.unmerged_blobs">
<code class="descname">unmerged_blobs</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.index.base.IndexFile.unmerged_blobs" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Iterator yielding dict(path : list( tuple( stage, Blob, ...))), being
a dictionary associating a path in the index with a list containing
sorted stage/blob pairs</td>
</tr>
<tr class="field-even field"><th class="field-name">Note:</th><td class="field-body">Blobs that have been removed in one side simply do not exist in the
given stage. I.e. a file removed on the &#8216;other&#8217; branch whose entries
are at stage 3 will not have a stage 3 entry.</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="git.index.base.IndexFile.update">
<code class="descname">update</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.index.base.IndexFile.update" title="Permalink to this definition">¶</a></dt>
<dd><p>Reread the contents of our index file, discarding all cached information
we might have.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Note:</th><td class="field-body">This is a possibly dangerious operations as it will discard your changes
to index.entries</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">self</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="attribute">
<dt id="git.index.base.IndexFile.version">
<code class="descname">version</code><a class="headerlink" href="#git.index.base.IndexFile.version" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="git.index.base.IndexFile.write">
<code class="descname">write</code><span class="sig-paren">(</span><em>file_path=None</em>, <em>ignore_extension_data=False</em><span class="sig-paren">)</span><a class="headerlink" href="#git.index.base.IndexFile.write" title="Permalink to this definition">¶</a></dt>
<dd><p>Write the current state to our file path or to the given one</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>file_path</strong> &#8211; If None, we will write to our stored file path from which we have
been initialized. Otherwise we write to the given file path.
Please note that this will change the file_path of this index to
the one you gave.</li>
<li><strong>ignore_extension_data</strong> &#8211; If True, the TREE type extension data read in the index will not
be written to disk. NOTE that no extension data is actually written.
Use this if you have altered the index and
would like to use git-write-tree afterwards to create a tree
representing your written changes.
If this data is present in the written index, git-write-tree
will instead write the stored/cached tree.
Alternatively, use IndexFile.write_tree() to handle this case
automatically</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">self</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="git.index.base.IndexFile.write_tree">
<code class="descname">write_tree</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.index.base.IndexFile.write_tree" title="Permalink to this definition">¶</a></dt>
<dd><p>Writes this index to a corresponding Tree object into the repository&#8217;s
object database and return it.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">Tree object representing this index</p>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Note:</th><td class="field-body"><p class="first">The tree will be written even if one or more objects the tree refers to
does not yet exist in the object database. This could happen if you added
Entries to the index directly.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Raises:</th><td class="field-body"><ul class="first last simple">
<li><strong>ValueError</strong> &#8211; if there are no entries in the cache</li>
<li><strong>UnmergedEntriesError</strong> &#8211; </li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>

</dd></dl>

<dl class="exception">
<dt id="git.index.base.CheckoutError">
<em class="property">exception </em><code class="descclassname">git.index.base.</code><code class="descname">CheckoutError</code><span class="sig-paren">(</span><em>message</em>, <em>failed_files</em>, <em>valid_files</em>, <em>failed_reasons</em><span class="sig-paren">)</span><a class="headerlink" href="#git.index.base.CheckoutError" title="Permalink to this definition">¶</a></dt>
<dd><p>Thrown if a file could not be checked out from the index as it contained
changes.</p>
<p>The .failed_files attribute contains a list of relative paths that failed
to be checked out as they contained changes that did not exist in the index.</p>
<p>The .failed_reasons attribute contains a string informing about the actual
cause of the issue.</p>
<p>The .valid_files attribute contains a list of relative paths to files that
were checked out successfully and hence match the version stored in the
index</p>
<dl class="method">
<dt id="git.index.base.CheckoutError.__init__">
<code class="descname">__init__</code><span class="sig-paren">(</span><em>message</em>, <em>failed_files</em>, <em>valid_files</em>, <em>failed_reasons</em><span class="sig-paren">)</span><a class="headerlink" href="#git.index.base.CheckoutError.__init__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.index.base.CheckoutError.__module__">
<code class="descname">__module__</code><em class="property"> = 'git.exc'</em><a class="headerlink" href="#git.index.base.CheckoutError.__module__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="git.index.base.CheckoutError.__str__">
<code class="descname">__str__</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.index.base.CheckoutError.__str__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.index.base.CheckoutError.__weakref__">
<code class="descname">__weakref__</code><a class="headerlink" href="#git.index.base.CheckoutError.__weakref__" title="Permalink to this definition">¶</a></dt>
<dd><p>list of weak references to the object (if defined)</p>
</dd></dl>

</dd></dl>

</div>
<div class="section" id="module-git.index.fun">
<span id="index-functions"></span><h2>Index.Functions<a class="headerlink" href="#module-git.index.fun" title="Permalink to this headline">¶</a></h2>
<dl class="function">
<dt id="git.index.fun.write_cache">
<code class="descclassname">git.index.fun.</code><code class="descname">write_cache</code><span class="sig-paren">(</span><em>entries</em>, <em>stream</em>, <em>extension_data=None</em>, <em>ShaStreamCls=&lt;class 'git.util.IndexFileSHA1Writer'&gt;</em><span class="sig-paren">)</span><a class="headerlink" href="#git.index.fun.write_cache" title="Permalink to this definition">¶</a></dt>
<dd><p>Write the cache represented by entries to a stream</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>entries</strong> &#8211; <strong>sorted</strong> list of entries</li>
<li><strong>stream</strong> &#8211; stream to wrap into the AdapterStreamCls - it is used for
final output.</li>
<li><strong>ShaStreamCls</strong> &#8211; Type to use when writing to the stream. It produces a sha
while writing to it, before the data is passed on to the wrapped stream</li>
<li><strong>extension_data</strong> &#8211; any kind of data to write as a trailer, it must begin
a 4 byte identifier, followed by its size ( 4 bytes )</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="function">
<dt id="git.index.fun.read_cache">
<code class="descclassname">git.index.fun.</code><code class="descname">read_cache</code><span class="sig-paren">(</span><em>stream</em><span class="sig-paren">)</span><a class="headerlink" href="#git.index.fun.read_cache" title="Permalink to this definition">¶</a></dt>
<dd><p>Read a cache file from the given stream
:return: tuple(version, entries_dict, extension_data, content_sha)
* version is the integer version number
* entries dict is a dictionary which maps IndexEntry instances to a path at a stage
* extension_data is &#8216;&#8217; or 4 bytes of type + 4 bytes of size + size bytes
* content_sha is a 20 byte sha on all cache file contents</p>
</dd></dl>

<dl class="function">
<dt id="git.index.fun.write_tree_from_cache">
<code class="descclassname">git.index.fun.</code><code class="descname">write_tree_from_cache</code><span class="sig-paren">(</span><em>entries</em>, <em>odb</em>, <em>sl</em>, <em>si=0</em><span class="sig-paren">)</span><a class="headerlink" href="#git.index.fun.write_tree_from_cache" title="Permalink to this definition">¶</a></dt>
<dd><p>Create a tree from the given sorted list of entries and put the respective
trees into the given object database</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>entries</strong> &#8211; <strong>sorted</strong> list of IndexEntries</li>
<li><strong>odb</strong> &#8211; object database to store the trees in</li>
<li><strong>si</strong> &#8211; start index at which we should start creating subtrees</li>
<li><strong>sl</strong> &#8211; slice indicating the range we should process on the entries list</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">tuple(binsha, list(tree_entry, ...)) a tuple of a sha and a list of
tree entries being a tuple of hexsha, mode, name</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="function">
<dt id="git.index.fun.entry_key">
<code class="descclassname">git.index.fun.</code><code class="descname">entry_key</code><span class="sig-paren">(</span><em>*entry</em><span class="sig-paren">)</span><a class="headerlink" href="#git.index.fun.entry_key" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Key suitable to be used for the index.entries dictionary</td>
</tr>
<tr class="field-even field"><th class="field-name">Parameters:</th><td class="field-body"><strong>entry</strong> &#8211; One instance of type BaseIndexEntry or the path and the stage</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="function">
<dt id="git.index.fun.stat_mode_to_index_mode">
<code class="descclassname">git.index.fun.</code><code class="descname">stat_mode_to_index_mode</code><span class="sig-paren">(</span><em>mode</em><span class="sig-paren">)</span><a class="headerlink" href="#git.index.fun.stat_mode_to_index_mode" title="Permalink to this definition">¶</a></dt>
<dd><p>Convert the given mode from a stat call to the corresponding index mode
and return it</p>
</dd></dl>

<dl class="function">
<dt id="git.index.fun.run_commit_hook">
<code class="descclassname">git.index.fun.</code><code class="descname">run_commit_hook</code><span class="sig-paren">(</span><em>name</em>, <em>index</em><span class="sig-paren">)</span><a class="headerlink" href="#git.index.fun.run_commit_hook" title="Permalink to this definition">¶</a></dt>
<dd><p>Run the commit hook of the given name. Silently ignores hooks that do not exist.
:param name: name of hook, like &#8216;pre-commit&#8217;
:param index: IndexFile instance
:raises HookExecutionError:</p>
</dd></dl>

<dl class="function">
<dt id="git.index.fun.hook_path">
<code class="descclassname">git.index.fun.</code><code class="descname">hook_path</code><span class="sig-paren">(</span><em>name</em>, <em>git_dir</em><span class="sig-paren">)</span><a class="headerlink" href="#git.index.fun.hook_path" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">path to the given named hook in the given git repository directory</td>
</tr>
</tbody>
</table>
</dd></dl>

</div>
<div class="section" id="module-git.index.typ">
<span id="index-types"></span><h2>Index.Types<a class="headerlink" href="#module-git.index.typ" title="Permalink to this headline">¶</a></h2>
<p>Module with additional types used by the index</p>
<dl class="class">
<dt id="git.index.typ.BlobFilter">
<em class="property">class </em><code class="descclassname">git.index.typ.</code><code class="descname">BlobFilter</code><span class="sig-paren">(</span><em>paths</em><span class="sig-paren">)</span><a class="headerlink" href="#git.index.typ.BlobFilter" title="Permalink to this definition">¶</a></dt>
<dd><p>Predicate to be used by iter_blobs allowing to filter only return blobs which
match the given list of directories or files.</p>
<p>The given paths are given relative to the repository.</p>
<dl class="method">
<dt id="git.index.typ.BlobFilter.__call__">
<code class="descname">__call__</code><span class="sig-paren">(</span><em>stage_blob</em><span class="sig-paren">)</span><a class="headerlink" href="#git.index.typ.BlobFilter.__call__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="git.index.typ.BlobFilter.__init__">
<code class="descname">__init__</code><span class="sig-paren">(</span><em>paths</em><span class="sig-paren">)</span><a class="headerlink" href="#git.index.typ.BlobFilter.__init__" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>paths</strong> &#8211; tuple or list of paths which are either pointing to directories or
to files relative to the current repository</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="attribute">
<dt id="git.index.typ.BlobFilter.__module__">
<code class="descname">__module__</code><em class="property"> = 'git.index.typ'</em><a class="headerlink" href="#git.index.typ.BlobFilter.__module__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.index.typ.BlobFilter.__slots__">
<code class="descname">__slots__</code><em class="property"> = 'paths'</em><a class="headerlink" href="#git.index.typ.BlobFilter.__slots__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.index.typ.BlobFilter.paths">
<code class="descname">paths</code><a class="headerlink" href="#git.index.typ.BlobFilter.paths" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="class">
<dt id="git.index.typ.BaseIndexEntry">
<em class="property">class </em><code class="descclassname">git.index.typ.</code><code class="descname">BaseIndexEntry</code><a class="headerlink" href="#git.index.typ.BaseIndexEntry" title="Permalink to this definition">¶</a></dt>
<dd><p>Small Brother of an index entry which can be created to describe changes
done to the index in which case plenty of additional information is not requried.</p>
<p>As the first 4 data members match exactly to the IndexEntry type, methods
expecting a BaseIndexEntry can also handle full IndexEntries even if they
use numeric indices for performance reasons.</p>
<dl class="attribute">
<dt id="git.index.typ.BaseIndexEntry.__dict__">
<code class="descname">__dict__</code><em class="property"> = dict_proxy({'__module__': 'git.index.typ', '__str__': &lt;function __str__ at 0x10fe75050&gt;, 'binsha': &lt;property object at 0x10fe6cfc8&gt;, 'mode': &lt;property object at 0x10fe6cf70&gt;, 'hexsha': &lt;property object at 0x10fe76050&gt;, 'to_blob': &lt;function to_blob at 0x10fe75488&gt;, '__repr__': &lt;function __repr__ at 0x10fe750c8&gt;, 'path': &lt;property object at 0x10fe76100&gt;, '__dict__': &lt;attribute '__dict__' of 'BaseIndexEntry' objects&gt;, 'flags': &lt;property object at 0x10fe76158&gt;, 'stage': &lt;property object at 0x10fe760a8&gt;, '__doc__': 'Small Brother of an index entry which can be created to describe changes\n    done to the index in which case plenty of additional information is not requried.\n\n    As the first 4 data members match exactly to the IndexEntry type, methods\n    expecting a BaseIndexEntry can also handle full IndexEntries even if they\n    use numeric indices for performance reasons. ', 'from_blob': &lt;classmethod object at 0x10fe6f8a0&gt;})</em><a class="headerlink" href="#git.index.typ.BaseIndexEntry.__dict__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.index.typ.BaseIndexEntry.__module__">
<code class="descname">__module__</code><em class="property"> = 'git.index.typ'</em><a class="headerlink" href="#git.index.typ.BaseIndexEntry.__module__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="git.index.typ.BaseIndexEntry.__repr__">
<code class="descname">__repr__</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.index.typ.BaseIndexEntry.__repr__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="git.index.typ.BaseIndexEntry.__str__">
<code class="descname">__str__</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.index.typ.BaseIndexEntry.__str__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.index.typ.BaseIndexEntry.binsha">
<code class="descname">binsha</code><a class="headerlink" href="#git.index.typ.BaseIndexEntry.binsha" title="Permalink to this definition">¶</a></dt>
<dd><p>binary sha of the blob</p>
</dd></dl>

<dl class="attribute">
<dt id="git.index.typ.BaseIndexEntry.flags">
<code class="descname">flags</code><a class="headerlink" href="#git.index.typ.BaseIndexEntry.flags" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">flags stored with this entry</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="classmethod">
<dt id="git.index.typ.BaseIndexEntry.from_blob">
<em class="property">classmethod </em><code class="descname">from_blob</code><span class="sig-paren">(</span><em>blob</em>, <em>stage=0</em><span class="sig-paren">)</span><a class="headerlink" href="#git.index.typ.BaseIndexEntry.from_blob" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Fully equipped BaseIndexEntry at the given stage</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="attribute">
<dt id="git.index.typ.BaseIndexEntry.hexsha">
<code class="descname">hexsha</code><a class="headerlink" href="#git.index.typ.BaseIndexEntry.hexsha" title="Permalink to this definition">¶</a></dt>
<dd><p>hex version of our sha</p>
</dd></dl>

<dl class="attribute">
<dt id="git.index.typ.BaseIndexEntry.mode">
<code class="descname">mode</code><a class="headerlink" href="#git.index.typ.BaseIndexEntry.mode" title="Permalink to this definition">¶</a></dt>
<dd><p>File Mode, compatible to stat module constants</p>
</dd></dl>

<dl class="attribute">
<dt id="git.index.typ.BaseIndexEntry.path">
<code class="descname">path</code><a class="headerlink" href="#git.index.typ.BaseIndexEntry.path" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">our path relative to the repository working tree root</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="attribute">
<dt id="git.index.typ.BaseIndexEntry.stage">
<code class="descname">stage</code><a class="headerlink" href="#git.index.typ.BaseIndexEntry.stage" title="Permalink to this definition">¶</a></dt>
<dd><p>Stage of the entry, either:</p>
<blockquote>
<div><ul class="simple">
<li>0 = default stage</li>
<li>1 = stage before a merge or common ancestor entry in case of a 3 way merge</li>
<li>2 = stage of entries from the &#8216;left&#8217; side of the merge</li>
<li>3 = stage of entries from the right side of the merge</li>
</ul>
</div></blockquote>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Note:</th><td class="field-body">For more information, see <a class="reference external" href="http://www.kernel.org/pub/software/scm/git/docs/git-read-tree.html">http://www.kernel.org/pub/software/scm/git/docs/git-read-tree.html</a></td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="git.index.typ.BaseIndexEntry.to_blob">
<code class="descname">to_blob</code><span class="sig-paren">(</span><em>repo</em><span class="sig-paren">)</span><a class="headerlink" href="#git.index.typ.BaseIndexEntry.to_blob" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Blob using the information of this index entry</td>
</tr>
</tbody>
</table>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="git.index.typ.IndexEntry">
<em class="property">class </em><code class="descclassname">git.index.typ.</code><code class="descname">IndexEntry</code><a class="headerlink" href="#git.index.typ.IndexEntry" title="Permalink to this definition">¶</a></dt>
<dd><p>Allows convenient access to IndexEntry data without completely unpacking it.</p>
<p>Attributes usully accessed often are cached in the tuple whereas others are
unpacked on demand.</p>
<p>See the properties for a mapping between names and tuple indices.</p>
<dl class="attribute">
<dt id="git.index.typ.IndexEntry.__module__">
<code class="descname">__module__</code><em class="property"> = 'git.index.typ'</em><a class="headerlink" href="#git.index.typ.IndexEntry.__module__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.index.typ.IndexEntry.ctime">
<code class="descname">ctime</code><a class="headerlink" href="#git.index.typ.IndexEntry.ctime" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Tuple(int_time_seconds_since_epoch, int_nano_seconds) of the
file&#8217;s creation time</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="attribute">
<dt id="git.index.typ.IndexEntry.dev">
<code class="descname">dev</code><a class="headerlink" href="#git.index.typ.IndexEntry.dev" title="Permalink to this definition">¶</a></dt>
<dd><p>Device ID</p>
</dd></dl>

<dl class="classmethod">
<dt id="git.index.typ.IndexEntry.from_base">
<em class="property">classmethod </em><code class="descname">from_base</code><span class="sig-paren">(</span><em>base</em><span class="sig-paren">)</span><a class="headerlink" href="#git.index.typ.IndexEntry.from_base" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Minimal entry as created from the given BaseIndexEntry instance.
Missing values will be set to null-like values</td>
</tr>
<tr class="field-even field"><th class="field-name">Parameters:</th><td class="field-body"><strong>base</strong> &#8211; Instance of type BaseIndexEntry</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="classmethod">
<dt id="git.index.typ.IndexEntry.from_blob">
<em class="property">classmethod </em><code class="descname">from_blob</code><span class="sig-paren">(</span><em>blob</em>, <em>stage=0</em><span class="sig-paren">)</span><a class="headerlink" href="#git.index.typ.IndexEntry.from_blob" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Minimal entry resembling the given blob object</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="attribute">
<dt id="git.index.typ.IndexEntry.gid">
<code class="descname">gid</code><a class="headerlink" href="#git.index.typ.IndexEntry.gid" title="Permalink to this definition">¶</a></dt>
<dd><p>Group ID</p>
</dd></dl>

<dl class="attribute">
<dt id="git.index.typ.IndexEntry.inode">
<code class="descname">inode</code><a class="headerlink" href="#git.index.typ.IndexEntry.inode" title="Permalink to this definition">¶</a></dt>
<dd><p>Inode ID</p>
</dd></dl>

<dl class="attribute">
<dt id="git.index.typ.IndexEntry.mtime">
<code class="descname">mtime</code><a class="headerlink" href="#git.index.typ.IndexEntry.mtime" title="Permalink to this definition">¶</a></dt>
<dd><p>See ctime property, but returns modification time</p>
</dd></dl>

<dl class="attribute">
<dt id="git.index.typ.IndexEntry.size">
<code class="descname">size</code><a class="headerlink" href="#git.index.typ.IndexEntry.size" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Uncompressed size of the blob</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="attribute">
<dt id="git.index.typ.IndexEntry.uid">
<code class="descname">uid</code><a class="headerlink" href="#git.index.typ.IndexEntry.uid" title="Permalink to this definition">¶</a></dt>
<dd><p>User ID</p>
</dd></dl>

</dd></dl>

</div>
<div class="section" id="module-git.index.util">
<span id="index-util"></span><h2>Index.Util<a class="headerlink" href="#module-git.index.util" title="Permalink to this headline">¶</a></h2>
<p>Module containing index utilities</p>
<dl class="class">
<dt id="git.index.util.TemporaryFileSwap">
<em class="property">class </em><code class="descclassname">git.index.util.</code><code class="descname">TemporaryFileSwap</code><span class="sig-paren">(</span><em>file_path</em><span class="sig-paren">)</span><a class="headerlink" href="#git.index.util.TemporaryFileSwap" title="Permalink to this definition">¶</a></dt>
<dd><p>Utility class moving a file to a temporary location within the same directory
and moving it back on to where on object deletion.</p>
<dl class="method">
<dt id="git.index.util.TemporaryFileSwap.__del__">
<code class="descname">__del__</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.index.util.TemporaryFileSwap.__del__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="git.index.util.TemporaryFileSwap.__init__">
<code class="descname">__init__</code><span class="sig-paren">(</span><em>file_path</em><span class="sig-paren">)</span><a class="headerlink" href="#git.index.util.TemporaryFileSwap.__init__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.index.util.TemporaryFileSwap.__module__">
<code class="descname">__module__</code><em class="property"> = 'git.index.util'</em><a class="headerlink" href="#git.index.util.TemporaryFileSwap.__module__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.index.util.TemporaryFileSwap.__slots__">
<code class="descname">__slots__</code><em class="property"> = ('file_path', 'tmp_file_path')</em><a class="headerlink" href="#git.index.util.TemporaryFileSwap.__slots__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.index.util.TemporaryFileSwap.file_path">
<code class="descname">file_path</code><a class="headerlink" href="#git.index.util.TemporaryFileSwap.file_path" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.index.util.TemporaryFileSwap.tmp_file_path">
<code class="descname">tmp_file_path</code><a class="headerlink" href="#git.index.util.TemporaryFileSwap.tmp_file_path" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="function">
<dt id="git.index.util.post_clear_cache">
<code class="descclassname">git.index.util.</code><code class="descname">post_clear_cache</code><span class="sig-paren">(</span><em>func</em><span class="sig-paren">)</span><a class="headerlink" href="#git.index.util.post_clear_cache" title="Permalink to this definition">¶</a></dt>
<dd><p>Decorator for functions that alter the index using the git command. This would
invalidate our possibly existing entries dictionary which is why it must be
deleted to allow it to be lazily reread later.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Note:</th><td class="field-body">This decorator will not be required once all functions are implemented
natively which in fact is possible, but probably not feasible performance wise.</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="function">
<dt id="git.index.util.default_index">
<code class="descclassname">git.index.util.</code><code class="descname">default_index</code><span class="sig-paren">(</span><em>func</em><span class="sig-paren">)</span><a class="headerlink" href="#git.index.util.default_index" title="Permalink to this definition">¶</a></dt>
<dd><p>Decorator assuring the wrapped method may only run if we are the default
repository index. This is as we rely on git commands that operate
on that index only.</p>
</dd></dl>

<dl class="function">
<dt id="git.index.util.git_working_dir">
<code class="descclassname">git.index.util.</code><code class="descname">git_working_dir</code><span class="sig-paren">(</span><em>func</em><span class="sig-paren">)</span><a class="headerlink" href="#git.index.util.git_working_dir" title="Permalink to this definition">¶</a></dt>
<dd><p>Decorator which changes the current working dir to the one of the git
repository in order to assure relative paths are handled correctly</p>
</dd></dl>

</div>
<div class="section" id="module-git.cmd">
<span id="gitcmd"></span><h2>GitCmd<a class="headerlink" href="#module-git.cmd" title="Permalink to this headline">¶</a></h2>
<dl class="class">
<dt id="git.cmd.Git">
<em class="property">class </em><code class="descclassname">git.cmd.</code><code class="descname">Git</code><span class="sig-paren">(</span><em>working_dir=None</em><span class="sig-paren">)</span><a class="headerlink" href="#git.cmd.Git" title="Permalink to this definition">¶</a></dt>
<dd><p>The Git class manages communication with the Git binary.</p>
<p>It provides a convenient interface to calling the Git binary, such as in:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">g</span> <span class="o">=</span> <span class="n">Git</span><span class="p">(</span> <span class="n">git_dir</span> <span class="p">)</span>
<span class="n">g</span><span class="o">.</span><span class="n">init</span><span class="p">()</span>                   <span class="c1"># calls &#39;git init&#39; program</span>
<span class="n">rval</span> <span class="o">=</span> <span class="n">g</span><span class="o">.</span><span class="n">ls_files</span><span class="p">()</span>        <span class="c1"># calls &#39;git ls-files&#39; program</span>
</pre></div>
</div>
<dl class="docutils">
<dt><code class="docutils literal"><span class="pre">Debugging</span></code></dt>
<dd>Set the GIT_PYTHON_TRACE environment variable print each invocation
of the command to stdout.
Set its value to &#8216;full&#8217; to see details about the returned values.</dd>
</dl>
<dl class="class">
<dt id="git.cmd.Git.AutoInterrupt">
<em class="property">class </em><code class="descname">AutoInterrupt</code><span class="sig-paren">(</span><em>proc</em>, <em>args</em><span class="sig-paren">)</span><a class="headerlink" href="#git.cmd.Git.AutoInterrupt" title="Permalink to this definition">¶</a></dt>
<dd><p>Kill/Interrupt the stored process instance once this instance goes out of scope. It is
used to prevent processes piling up in case iterators stop reading.
Besides all attributes are wired through to the contained process object.</p>
<p>The wait method was overridden to perform automatic status code checking
and possibly raise.</p>
<dl class="method">
<dt id="git.cmd.Git.AutoInterrupt.__del__">
<code class="descname">__del__</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.cmd.Git.AutoInterrupt.__del__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="git.cmd.Git.AutoInterrupt.__getattr__">
<code class="descname">__getattr__</code><span class="sig-paren">(</span><em>attr</em><span class="sig-paren">)</span><a class="headerlink" href="#git.cmd.Git.AutoInterrupt.__getattr__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="git.cmd.Git.AutoInterrupt.__init__">
<code class="descname">__init__</code><span class="sig-paren">(</span><em>proc</em>, <em>args</em><span class="sig-paren">)</span><a class="headerlink" href="#git.cmd.Git.AutoInterrupt.__init__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.cmd.Git.AutoInterrupt.__module__">
<code class="descname">__module__</code><em class="property"> = 'git.cmd'</em><a class="headerlink" href="#git.cmd.Git.AutoInterrupt.__module__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.cmd.Git.AutoInterrupt.__slots__">
<code class="descname">__slots__</code><em class="property"> = ('proc', 'args')</em><a class="headerlink" href="#git.cmd.Git.AutoInterrupt.__slots__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.cmd.Git.AutoInterrupt.args">
<code class="descname">args</code><a class="headerlink" href="#git.cmd.Git.AutoInterrupt.args" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.cmd.Git.AutoInterrupt.proc">
<code class="descname">proc</code><a class="headerlink" href="#git.cmd.Git.AutoInterrupt.proc" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="git.cmd.Git.AutoInterrupt.wait">
<code class="descname">wait</code><span class="sig-paren">(</span><em>stderr=''</em><span class="sig-paren">)</span><a class="headerlink" href="#git.cmd.Git.AutoInterrupt.wait" title="Permalink to this definition">¶</a></dt>
<dd><p>Wait for the process and return its status code.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>stderr</strong> &#8211; Previously read value of stderr, in case stderr is already closed.</td>
</tr>
<tr class="field-even field"><th class="field-name">Warn:</th><td class="field-body">may deadlock if output or error pipes are used and not handled separately.</td>
</tr>
<tr class="field-odd field"><th class="field-name">Raises:</th><td class="field-body"><strong>GitCommandError</strong> &#8211; if the return status is not 0</td>
</tr>
</tbody>
</table>
</dd></dl>

</dd></dl>

<dl class="attribute">
<dt id="git.cmd.Git.CREATE_NO_WINDOW">
<code class="descclassname">Git.</code><code class="descname">CREATE_NO_WINDOW</code><em class="property"> = 134217728</em><a class="headerlink" href="#git.cmd.Git.CREATE_NO_WINDOW" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="class">
<dt id="git.cmd.Git.CatFileContentStream">
<em class="property">class </em><code class="descclassname">Git.</code><code class="descname">CatFileContentStream</code><span class="sig-paren">(</span><em>size</em>, <em>stream</em><span class="sig-paren">)</span><a class="headerlink" href="#git.cmd.Git.CatFileContentStream" title="Permalink to this definition">¶</a></dt>
<dd><p>Object representing a sized read-only stream returning the contents of
an object.
It behaves like a stream, but counts the data read and simulates an empty
stream once our sized content region is empty.
If not all data is read to the end of the objects&#8217;s lifetime, we read the
rest to assure the underlying stream continues to work</p>
<dl class="method">
<dt id="git.cmd.Git.CatFileContentStream.__del__">
<code class="descname">__del__</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.cmd.Git.CatFileContentStream.__del__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="git.cmd.Git.CatFileContentStream.__init__">
<code class="descname">__init__</code><span class="sig-paren">(</span><em>size</em>, <em>stream</em><span class="sig-paren">)</span><a class="headerlink" href="#git.cmd.Git.CatFileContentStream.__init__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="git.cmd.Git.CatFileContentStream.__iter__">
<code class="descname">__iter__</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.cmd.Git.CatFileContentStream.__iter__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.cmd.Git.CatFileContentStream.__module__">
<code class="descname">__module__</code><em class="property"> = 'git.cmd'</em><a class="headerlink" href="#git.cmd.Git.CatFileContentStream.__module__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.cmd.Git.CatFileContentStream.__slots__">
<code class="descname">__slots__</code><em class="property"> = ('_stream', '_nbr', '_size')</em><a class="headerlink" href="#git.cmd.Git.CatFileContentStream.__slots__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="git.cmd.Git.CatFileContentStream.next">
<code class="descname">next</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.cmd.Git.CatFileContentStream.next" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="git.cmd.Git.CatFileContentStream.read">
<code class="descname">read</code><span class="sig-paren">(</span><em>size=-1</em><span class="sig-paren">)</span><a class="headerlink" href="#git.cmd.Git.CatFileContentStream.read" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="git.cmd.Git.CatFileContentStream.readline">
<code class="descname">readline</code><span class="sig-paren">(</span><em>size=-1</em><span class="sig-paren">)</span><a class="headerlink" href="#git.cmd.Git.CatFileContentStream.readline" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="git.cmd.Git.CatFileContentStream.readlines">
<code class="descname">readlines</code><span class="sig-paren">(</span><em>size=-1</em><span class="sig-paren">)</span><a class="headerlink" href="#git.cmd.Git.CatFileContentStream.readlines" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="attribute">
<dt id="git.cmd.Git.GIT_PYTHON_GIT_EXECUTABLE">
<code class="descclassname">Git.</code><code class="descname">GIT_PYTHON_GIT_EXECUTABLE</code><em class="property"> = 'git'</em><a class="headerlink" href="#git.cmd.Git.GIT_PYTHON_GIT_EXECUTABLE" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.cmd.Git.GIT_PYTHON_TRACE">
<code class="descclassname">Git.</code><code class="descname">GIT_PYTHON_TRACE</code><em class="property"> = False</em><a class="headerlink" href="#git.cmd.Git.GIT_PYTHON_TRACE" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.cmd.Git.USE_SHELL">
<code class="descclassname">Git.</code><code class="descname">USE_SHELL</code><em class="property"> = False</em><a class="headerlink" href="#git.cmd.Git.USE_SHELL" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="git.cmd.Git.__call__">
<code class="descclassname">Git.</code><code class="descname">__call__</code><span class="sig-paren">(</span><em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#git.cmd.Git.__call__" title="Permalink to this definition">¶</a></dt>
<dd><p>Specify command line options to the git executable
for a subcommand call</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>kwargs</strong> &#8211; is a dict of keyword arguments.
these arguments are passed as in _call_process
but will be passed to the git command rather than
the subcommand.</td>
</tr>
</tbody>
</table>
<dl class="docutils">
<dt><code class="docutils literal"><span class="pre">Examples</span></code>::</dt>
<dd>git(work_tree=&#8217;/tmp&#8217;).difftool()</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="git.cmd.Git.__getattr__">
<code class="descclassname">Git.</code><code class="descname">__getattr__</code><span class="sig-paren">(</span><em>name</em><span class="sig-paren">)</span><a class="headerlink" href="#git.cmd.Git.__getattr__" title="Permalink to this definition">¶</a></dt>
<dd><p>A convenience method as it allows to call the command as if it was
an object.
:return: Callable object that will execute call _call_process with your arguments.</p>
</dd></dl>

<dl class="method">
<dt id="git.cmd.Git.__getstate__">
<code class="descclassname">Git.</code><code class="descname">__getstate__</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.cmd.Git.__getstate__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="git.cmd.Git.__init__">
<code class="descclassname">Git.</code><code class="descname">__init__</code><span class="sig-paren">(</span><em>working_dir=None</em><span class="sig-paren">)</span><a class="headerlink" href="#git.cmd.Git.__init__" title="Permalink to this definition">¶</a></dt>
<dd><p>Initialize this instance with:</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>working_dir</strong> &#8211; Git directory we should work in. If None, we always work in the current
directory as returned by os.getcwd().
It is meant to be the working tree directory if available, or the
.git directory in case of bare repositories.</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="attribute">
<dt id="git.cmd.Git.__module__">
<code class="descclassname">Git.</code><code class="descname">__module__</code><em class="property"> = 'git.cmd'</em><a class="headerlink" href="#git.cmd.Git.__module__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="git.cmd.Git.__setstate__">
<code class="descclassname">Git.</code><code class="descname">__setstate__</code><span class="sig-paren">(</span><em>d</em><span class="sig-paren">)</span><a class="headerlink" href="#git.cmd.Git.__setstate__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.cmd.Git.__slots__">
<code class="descclassname">Git.</code><code class="descname">__slots__</code><em class="property"> = ('_working_dir', 'cat_file_all', 'cat_file_header', '_version_info', '_git_options', '_environment')</em><a class="headerlink" href="#git.cmd.Git.__slots__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.cmd.Git.cat_file_all">
<code class="descclassname">Git.</code><code class="descname">cat_file_all</code><a class="headerlink" href="#git.cmd.Git.cat_file_all" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.cmd.Git.cat_file_header">
<code class="descclassname">Git.</code><code class="descname">cat_file_header</code><a class="headerlink" href="#git.cmd.Git.cat_file_header" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="git.cmd.Git.clear_cache">
<code class="descclassname">Git.</code><code class="descname">clear_cache</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.cmd.Git.clear_cache" title="Permalink to this definition">¶</a></dt>
<dd><p>Clear all kinds of internal caches to release resources.</p>
<p>Currently persistent commands will be interrupted.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">self</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="git.cmd.Git.custom_environment">
<code class="descclassname">Git.</code><code class="descname">custom_environment</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwds</em><span class="sig-paren">)</span><a class="headerlink" href="#git.cmd.Git.custom_environment" title="Permalink to this definition">¶</a></dt>
<dd><p>A context manager around the above <code class="docutils literal"><span class="pre">update_environment</span></code> method to restore the
environment back to its previous state after operation.</p>
<p><code class="docutils literal"><span class="pre">Examples</span></code>:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="k">with</span> <span class="bp">self</span><span class="o">.</span><span class="n">custom_environment</span><span class="p">(</span><span class="n">GIT_SSH</span><span class="o">=</span><span class="s1">&#39;/bin/ssh_wrapper&#39;</span><span class="p">):</span>
    <span class="n">repo</span><span class="o">.</span><span class="n">remotes</span><span class="o">.</span><span class="n">origin</span><span class="o">.</span><span class="n">fetch</span><span class="p">()</span>
</pre></div>
</div>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>kwargs</strong> &#8211; see update_environment</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="git.cmd.Git.environment">
<code class="descclassname">Git.</code><code class="descname">environment</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.cmd.Git.environment" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="git.cmd.Git.execute">
<code class="descclassname">Git.</code><code class="descname">execute</code><span class="sig-paren">(</span><em>command</em>, <em>istream=None</em>, <em>with_keep_cwd=False</em>, <em>with_extended_output=False</em>, <em>with_exceptions=True</em>, <em>as_process=False</em>, <em>output_stream=None</em>, <em>stdout_as_string=True</em>, <em>kill_after_timeout=None</em>, <em>with_stdout=True</em>, <em>universal_newlines=False</em>, <em>**subprocess_kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#git.cmd.Git.execute" title="Permalink to this definition">¶</a></dt>
<dd><p>Handles executing the command on the shell and consumes and returns
the returned information (stdout)</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>command</strong> &#8211; The command argument list to execute.
It should be a string, or a sequence of program arguments. The
program to execute is the first item in the args sequence or string.</li>
<li><strong>istream</strong> &#8211; Standard input filehandle passed to subprocess.Popen.</li>
<li><strong>with_keep_cwd</strong> &#8211; Whether to use the current working directory from os.getcwd().
The cmd otherwise uses its own working_dir that it has been initialized
with if possible.</li>
<li><strong>with_extended_output</strong> &#8211; Whether to return a (status, stdout, stderr) tuple.</li>
<li><strong>with_exceptions</strong> &#8211; Whether to raise an exception when git returns a non-zero status.</li>
<li><strong>as_process</strong> &#8211; Whether to return the created process instance directly from which
streams can be read on demand. This will render with_extended_output and
with_exceptions ineffective - the caller will have
to deal with the details himself.
It is important to note that the process will be placed into an AutoInterrupt
wrapper that will interrupt the process once it goes out of scope. If you
use the command in iterators, you should pass the whole process instance
instead of a single stream.</li>
<li><strong>output_stream</strong> &#8211; If set to a file-like object, data produced by the git command will be
output to the given stream directly.
This feature only has any effect if as_process is False. Processes will
always be created with a pipe due to issues with subprocess.
This merely is a workaround as data will be copied from the
output pipe to the given output stream directly.
Judging from the implementation, you shouldn&#8217;t use this flag !</li>
<li><strong>stdout_as_string</strong> &#8211; if False, the commands standard output will be bytes. Otherwise, it will be
decoded into a string using the default encoding (usually utf-8).
The latter can fail, if the output contains binary data.</li>
<li><strong>subprocess_kwargs</strong> &#8211; Keyword arguments to be passed to subprocess.Popen. Please note that
some of the valid kwargs are already set by this method, the ones you
specify may not be the same ones.</li>
<li><strong>with_stdout</strong> &#8211; If True, default True, we open stdout on the created process</li>
<li><strong>universal_newlines</strong> &#8211; if True, pipes will be opened as text, and lines are split at
all known line endings.</li>
<li><strong>kill_after_timeout</strong> &#8211; To specify a timeout in seconds for the git command, after which the process
should be killed. This will have no effect if as_process is set to True. It is
set to None by default and will let the process run until the timeout is
explicitly specified. This feature is not supported on Windows. It&#8217;s also worth
noting that kill_after_timeout uses SIGKILL, which can have negative side
effects on a repository. For example, stale locks in case of git gc could
render the repository incapable of accepting changes until the lock is manually
removed.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first"><ul class="simple">
<li>str(output) if extended_output = False (Default)</li>
<li>tuple(int(status), str(stdout), str(stderr)) if extended_output = True</li>
</ul>
<p>if ouput_stream is True, the stdout value will be your output stream:
* output_stream if extended_output = False
* tuple(int(status), output_stream, str(stderr)) if extended_output = True</p>
<p>Note git is executed with LC_MESSAGES=&#8221;C&#8221; to ensure consistent
output regardless of system language.</p>
</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Raises:</th><td class="field-body"><p class="first"><strong>GitCommandError</strong> &#8211; </p>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Note:</th><td class="field-body"><p class="first last">If you add additional keyword arguments to the signature of this method,
you must update the execute_kwargs tuple housed in this module.</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="git.cmd.Git.get_object_data">
<code class="descclassname">Git.</code><code class="descname">get_object_data</code><span class="sig-paren">(</span><em>ref</em><span class="sig-paren">)</span><a class="headerlink" href="#git.cmd.Git.get_object_data" title="Permalink to this definition">¶</a></dt>
<dd><p>As get_object_header, but returns object data as well
:return: (hexsha, type_string, size_as_int,data_string)
:note: not threadsafe</p>
</dd></dl>

<dl class="method">
<dt id="git.cmd.Git.get_object_header">
<code class="descclassname">Git.</code><code class="descname">get_object_header</code><span class="sig-paren">(</span><em>ref</em><span class="sig-paren">)</span><a class="headerlink" href="#git.cmd.Git.get_object_header" title="Permalink to this definition">¶</a></dt>
<dd><p>Use this method to quickly examine the type and size of the object behind
the given ref.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Note:</th><td class="field-body">The method will only suffer from the costs of command invocation
once and reuses the command in subsequent calls.</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">(hexsha, type_string, size_as_int)</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="attribute">
<dt id="git.cmd.Git.git_exec_name">
<code class="descclassname">Git.</code><code class="descname">git_exec_name</code><em class="property"> = 'git'</em><a class="headerlink" href="#git.cmd.Git.git_exec_name" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.cmd.Git.git_exec_name_win">
<code class="descclassname">Git.</code><code class="descname">git_exec_name_win</code><em class="property"> = 'git.cmd'</em><a class="headerlink" href="#git.cmd.Git.git_exec_name_win" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.cmd.Git.max_chunk_size">
<code class="descclassname">Git.</code><code class="descname">max_chunk_size</code><em class="property"> = 65536</em><a class="headerlink" href="#git.cmd.Git.max_chunk_size" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="git.cmd.Git.stream_object_data">
<code class="descclassname">Git.</code><code class="descname">stream_object_data</code><span class="sig-paren">(</span><em>ref</em><span class="sig-paren">)</span><a class="headerlink" href="#git.cmd.Git.stream_object_data" title="Permalink to this definition">¶</a></dt>
<dd><p>As get_object_header, but returns the data as a stream</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">(hexsha, type_string, size_as_int, stream)</td>
</tr>
<tr class="field-even field"><th class="field-name">Note:</th><td class="field-body">This method is not threadsafe, you need one independent Command instance per thread to be safe !</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="git.cmd.Git.transform_kwarg">
<code class="descclassname">Git.</code><code class="descname">transform_kwarg</code><span class="sig-paren">(</span><em>name</em>, <em>value</em>, <em>split_single_char_options</em><span class="sig-paren">)</span><a class="headerlink" href="#git.cmd.Git.transform_kwarg" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="git.cmd.Git.transform_kwargs">
<code class="descclassname">Git.</code><code class="descname">transform_kwargs</code><span class="sig-paren">(</span><em>split_single_char_options=True</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#git.cmd.Git.transform_kwargs" title="Permalink to this definition">¶</a></dt>
<dd><p>Transforms Python style kwargs into git command line options.</p>
</dd></dl>

<dl class="method">
<dt id="git.cmd.Git.update_environment">
<code class="descclassname">Git.</code><code class="descname">update_environment</code><span class="sig-paren">(</span><em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#git.cmd.Git.update_environment" title="Permalink to this definition">¶</a></dt>
<dd><p>Set environment variables for future git invocations. Return all changed
values in a format that can be passed back into this function to revert
the changes:</p>
<p><code class="docutils literal"><span class="pre">Examples</span></code>:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">old_env</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">update_environment</span><span class="p">(</span><span class="n">PWD</span><span class="o">=</span><span class="s1">&#39;/tmp&#39;</span><span class="p">)</span>
<span class="bp">self</span><span class="o">.</span><span class="n">update_environment</span><span class="p">(</span><span class="o">**</span><span class="n">old_env</span><span class="p">)</span>
</pre></div>
</div>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>kwargs</strong> &#8211; environment variables to use for git processes</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">dict that maps environment variables to their old values</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="attribute">
<dt id="git.cmd.Git.version_info">
<code class="descclassname">Git.</code><code class="descname">version_info</code><a class="headerlink" href="#git.cmd.Git.version_info" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">tuple(int, int, int, int) tuple with integers representing the major, minor
and additional version numbers as parsed from git version.
This value is generated on demand and is cached</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="attribute">
<dt id="git.cmd.Git.working_dir">
<code class="descclassname">Git.</code><code class="descname">working_dir</code><a class="headerlink" href="#git.cmd.Git.working_dir" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Git directory we are working on</td>
</tr>
</tbody>
</table>
</dd></dl>

</dd></dl>

</div>
<div class="section" id="module-git.config">
<span id="config"></span><h2>Config<a class="headerlink" href="#module-git.config" title="Permalink to this headline">¶</a></h2>
<p>Module containing module parser implementation able to properly read and write
configuration files</p>
<dl class="attribute">
<dt id="git.config.GitConfigParser">
<code class="descclassname">git.config.</code><code class="descname">GitConfigParser</code><a class="headerlink" href="#git.config.GitConfigParser" title="Permalink to this definition">¶</a></dt>
<dd><p>alias of <code class="xref py py-class docutils literal"><span class="pre">write</span></code></p>
</dd></dl>

<dl class="class">
<dt id="git.config.SectionConstraint">
<em class="property">class </em><code class="descclassname">git.config.</code><code class="descname">SectionConstraint</code><span class="sig-paren">(</span><em>config</em>, <em>section</em><span class="sig-paren">)</span><a class="headerlink" href="#git.config.SectionConstraint" title="Permalink to this definition">¶</a></dt>
<dd><p>Constrains a ConfigParser to only option commands which are constrained to
always use the section we have been initialized with.</p>
<p>It supports all ConfigParser methods that operate on an option.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Note:</th><td class="field-body">If used as a context manager, will release the wrapped ConfigParser.</td>
</tr>
</tbody>
</table>
<dl class="method">
<dt id="git.config.SectionConstraint.__del__">
<code class="descname">__del__</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.config.SectionConstraint.__del__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="git.config.SectionConstraint.__enter__">
<code class="descname">__enter__</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.config.SectionConstraint.__enter__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="git.config.SectionConstraint.__exit__">
<code class="descname">__exit__</code><span class="sig-paren">(</span><em>exception_type</em>, <em>exception_value</em>, <em>traceback</em><span class="sig-paren">)</span><a class="headerlink" href="#git.config.SectionConstraint.__exit__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="git.config.SectionConstraint.__getattr__">
<code class="descname">__getattr__</code><span class="sig-paren">(</span><em>attr</em><span class="sig-paren">)</span><a class="headerlink" href="#git.config.SectionConstraint.__getattr__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="git.config.SectionConstraint.__init__">
<code class="descname">__init__</code><span class="sig-paren">(</span><em>config</em>, <em>section</em><span class="sig-paren">)</span><a class="headerlink" href="#git.config.SectionConstraint.__init__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.config.SectionConstraint.__module__">
<code class="descname">__module__</code><em class="property"> = 'git.config'</em><a class="headerlink" href="#git.config.SectionConstraint.__module__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.config.SectionConstraint.__slots__">
<code class="descname">__slots__</code><em class="property"> = ('_config', '_section_name')</em><a class="headerlink" href="#git.config.SectionConstraint.__slots__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.config.SectionConstraint.config">
<code class="descname">config</code><a class="headerlink" href="#git.config.SectionConstraint.config" title="Permalink to this definition">¶</a></dt>
<dd><p>return: Configparser instance we constrain</p>
</dd></dl>

<dl class="method">
<dt id="git.config.SectionConstraint.release">
<code class="descname">release</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.config.SectionConstraint.release" title="Permalink to this definition">¶</a></dt>
<dd><p>Equivalent to GitConfigParser.release(), which is called on our underlying parser instance</p>
</dd></dl>

</dd></dl>

</div>
<div class="section" id="module-git.diff">
<span id="diff"></span><h2>Diff<a class="headerlink" href="#module-git.diff" title="Permalink to this headline">¶</a></h2>
<dl class="class">
<dt id="git.diff.Diffable">
<em class="property">class </em><code class="descclassname">git.diff.</code><code class="descname">Diffable</code><a class="headerlink" href="#git.diff.Diffable" title="Permalink to this definition">¶</a></dt>
<dd><p>Common interface for all object that can be diffed against another object of compatible type.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Note:</th><td class="field-body">Subclasses require a repo member as it is the case for Object instances, for practical
reasons we do not derive from Object.</td>
</tr>
</tbody>
</table>
<dl class="class">
<dt id="git.diff.Diffable.Index">
<em class="property">class </em><code class="descname">Index</code><a class="headerlink" href="#git.diff.Diffable.Index" title="Permalink to this definition">¶</a></dt>
<dd><dl class="attribute">
<dt id="git.diff.Diffable.Index.__dict__">
<code class="descname">__dict__</code><em class="property"> = dict_proxy({'__dict__': &lt;attribute '__dict__' of 'Index' objects&gt;, '__module__': 'git.diff', '__weakref__': &lt;attribute '__weakref__' of 'Index' objects&gt;, '__doc__': None})</em><a class="headerlink" href="#git.diff.Diffable.Index.__dict__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.diff.Diffable.Index.__module__">
<code class="descname">__module__</code><em class="property"> = 'git.diff'</em><a class="headerlink" href="#git.diff.Diffable.Index.__module__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.diff.Diffable.Index.__weakref__">
<code class="descname">__weakref__</code><a class="headerlink" href="#git.diff.Diffable.Index.__weakref__" title="Permalink to this definition">¶</a></dt>
<dd><p>list of weak references to the object (if defined)</p>
</dd></dl>

</dd></dl>

<dl class="attribute">
<dt id="git.diff.Diffable.__module__">
<code class="descclassname">Diffable.</code><code class="descname">__module__</code><em class="property"> = 'git.diff'</em><a class="headerlink" href="#git.diff.Diffable.__module__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.diff.Diffable.__slots__">
<code class="descclassname">Diffable.</code><code class="descname">__slots__</code><em class="property"> = ()</em><a class="headerlink" href="#git.diff.Diffable.__slots__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="git.diff.Diffable.diff">
<code class="descclassname">Diffable.</code><code class="descname">diff</code><span class="sig-paren">(</span><em>other=&lt;class 'git.diff.Index'&gt;</em>, <em>paths=None</em>, <em>create_patch=False</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#git.diff.Diffable.diff" title="Permalink to this definition">¶</a></dt>
<dd><p>Creates diffs between two items being trees, trees and index or an
index and the working tree. It will detect renames automatically.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>other</strong> &#8211; Is the item to compare us with.
If None, we will be compared to the working tree.
If Treeish, it will be compared against the respective tree
If Index ( type ), it will be compared against the index.
If git.NULL_TREE, it will compare against the empty tree.
It defaults to Index to assure the method will not by-default fail
on bare repositories.</li>
<li><strong>paths</strong> &#8211; is a list of paths or a single path to limit the diff to.
It will only include at least one of the givne path or paths.</li>
<li><strong>create_patch</strong> &#8211; If True, the returned Diff contains a detailed patch that if applied
makes the self to other. Patches are somwhat costly as blobs have to be read
and diffed.</li>
<li><strong>kwargs</strong> &#8211; Additional arguments passed to git-diff, such as
R=True to swap both sides of the diff.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">git.DiffIndex</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Note:</th><td class="field-body"><p class="first last">On a bare repository, &#8216;other&#8217; needs to be provided as Index or as
as Tree/Commit, or a git command error will occour</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="git.diff.DiffIndex">
<em class="property">class </em><code class="descclassname">git.diff.</code><code class="descname">DiffIndex</code><a class="headerlink" href="#git.diff.DiffIndex" title="Permalink to this definition">¶</a></dt>
<dd><p>Implements an Index for diffs, allowing a list of Diffs to be queried by
the diff properties.</p>
<p>The class improves the diff handling convenience</p>
<dl class="attribute">
<dt id="git.diff.DiffIndex.__dict__">
<code class="descname">__dict__</code><em class="property"> = dict_proxy({'iter_change_type': &lt;function iter_change_type at 0x10fe27848&gt;, '__module__': 'git.diff', 'change_type': ('A', 'D', 'R', 'M'), '__dict__': &lt;attribute '__dict__' of 'DiffIndex' objects&gt;, '__weakref__': &lt;attribute '__weakref__' of 'DiffIndex' objects&gt;, '__doc__': 'Implements an Index for diffs, allowing a list of Diffs to be queried by\n    the diff properties.\n\n    The class improves the diff handling convenience'})</em><a class="headerlink" href="#git.diff.DiffIndex.__dict__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.diff.DiffIndex.__module__">
<code class="descname">__module__</code><em class="property"> = 'git.diff'</em><a class="headerlink" href="#git.diff.DiffIndex.__module__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.diff.DiffIndex.__weakref__">
<code class="descname">__weakref__</code><a class="headerlink" href="#git.diff.DiffIndex.__weakref__" title="Permalink to this definition">¶</a></dt>
<dd><p>list of weak references to the object (if defined)</p>
</dd></dl>

<dl class="attribute">
<dt id="git.diff.DiffIndex.change_type">
<code class="descname">change_type</code><em class="property"> = ('A', 'D', 'R', 'M')</em><a class="headerlink" href="#git.diff.DiffIndex.change_type" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="git.diff.DiffIndex.iter_change_type">
<code class="descname">iter_change_type</code><span class="sig-paren">(</span><em>change_type</em><span class="sig-paren">)</span><a class="headerlink" href="#git.diff.DiffIndex.iter_change_type" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">iterator yieling Diff instances that match the given change_type</td>
</tr>
<tr class="field-even field"><th class="field-name">Parameters:</th><td class="field-body"><strong>change_type</strong> &#8211; <p>Member of DiffIndex.change_type, namely:</p>
<ul class="simple">
<li>&#8216;A&#8217; for added paths</li>
<li>&#8216;D&#8217; for deleted paths</li>
<li>&#8216;R&#8217; for renamed paths</li>
<li>&#8216;M&#8217; for paths with modified data</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="git.diff.Diff">
<em class="property">class </em><code class="descclassname">git.diff.</code><code class="descname">Diff</code><span class="sig-paren">(</span><em>repo</em>, <em>a_rawpath</em>, <em>b_rawpath</em>, <em>a_blob_id</em>, <em>b_blob_id</em>, <em>a_mode</em>, <em>b_mode</em>, <em>new_file</em>, <em>deleted_file</em>, <em>raw_rename_from</em>, <em>raw_rename_to</em>, <em>diff</em>, <em>change_type</em><span class="sig-paren">)</span><a class="headerlink" href="#git.diff.Diff" title="Permalink to this definition">¶</a></dt>
<dd><p>A Diff contains diff information between two Trees.</p>
<p>It contains two sides a and b of the diff, members are prefixed with
&#8220;a&#8221; and &#8220;b&#8221; respectively to inidcate that.</p>
<p>Diffs keep information about the changed blob objects, the file mode, renames,
deletions and new files.</p>
<p>There are a few cases where None has to be expected as member variable value:</p>
<p><code class="docutils literal"><span class="pre">New</span> <span class="pre">File</span></code>:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">a_mode</span> <span class="ow">is</span> <span class="kc">None</span>
<span class="n">a_blob</span> <span class="ow">is</span> <span class="kc">None</span>
<span class="n">a_path</span> <span class="ow">is</span> <span class="kc">None</span>
</pre></div>
</div>
<p><code class="docutils literal"><span class="pre">Deleted</span> <span class="pre">File</span></code>:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">b_mode</span> <span class="ow">is</span> <span class="kc">None</span>
<span class="n">b_blob</span> <span class="ow">is</span> <span class="kc">None</span>
<span class="n">b_path</span> <span class="ow">is</span> <span class="kc">None</span>
</pre></div>
</div>
<p><code class="docutils literal"><span class="pre">Working</span> <span class="pre">Tree</span> <span class="pre">Blobs</span></code></p>
<blockquote>
<div>When comparing to working trees, the working tree blob will have a null hexsha
as a corresponding object does not yet exist. The mode will be null as well.
But the path will be available though.
If it is listed in a diff the working tree version of the file must
be different to the version in the index or tree, and hence has been modified.</div></blockquote>
<dl class="attribute">
<dt id="git.diff.Diff.NULL_BIN_SHA">
<code class="descname">NULL_BIN_SHA</code><em class="property"> = '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'</em><a class="headerlink" href="#git.diff.Diff.NULL_BIN_SHA" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.diff.Diff.NULL_HEX_SHA">
<code class="descname">NULL_HEX_SHA</code><em class="property"> = '0000000000000000000000000000000000000000'</em><a class="headerlink" href="#git.diff.Diff.NULL_HEX_SHA" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="git.diff.Diff.__eq__">
<code class="descname">__eq__</code><span class="sig-paren">(</span><em>other</em><span class="sig-paren">)</span><a class="headerlink" href="#git.diff.Diff.__eq__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="git.diff.Diff.__hash__">
<code class="descname">__hash__</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.diff.Diff.__hash__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="git.diff.Diff.__init__">
<code class="descname">__init__</code><span class="sig-paren">(</span><em>repo</em>, <em>a_rawpath</em>, <em>b_rawpath</em>, <em>a_blob_id</em>, <em>b_blob_id</em>, <em>a_mode</em>, <em>b_mode</em>, <em>new_file</em>, <em>deleted_file</em>, <em>raw_rename_from</em>, <em>raw_rename_to</em>, <em>diff</em>, <em>change_type</em><span class="sig-paren">)</span><a class="headerlink" href="#git.diff.Diff.__init__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.diff.Diff.__module__">
<code class="descname">__module__</code><em class="property"> = 'git.diff'</em><a class="headerlink" href="#git.diff.Diff.__module__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="git.diff.Diff.__ne__">
<code class="descname">__ne__</code><span class="sig-paren">(</span><em>other</em><span class="sig-paren">)</span><a class="headerlink" href="#git.diff.Diff.__ne__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.diff.Diff.__slots__">
<code class="descname">__slots__</code><em class="property"> = ('a_blob', 'b_blob', 'a_mode', 'b_mode', 'a_rawpath', 'b_rawpath', 'new_file', 'deleted_file', 'raw_rename_from', 'raw_rename_to', 'diff', 'change_type')</em><a class="headerlink" href="#git.diff.Diff.__slots__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="git.diff.Diff.__str__">
<code class="descname">__str__</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.diff.Diff.__str__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.diff.Diff.a_blob">
<code class="descname">a_blob</code><a class="headerlink" href="#git.diff.Diff.a_blob" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.diff.Diff.a_mode">
<code class="descname">a_mode</code><a class="headerlink" href="#git.diff.Diff.a_mode" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.diff.Diff.a_path">
<code class="descname">a_path</code><a class="headerlink" href="#git.diff.Diff.a_path" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.diff.Diff.a_rawpath">
<code class="descname">a_rawpath</code><a class="headerlink" href="#git.diff.Diff.a_rawpath" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.diff.Diff.b_blob">
<code class="descname">b_blob</code><a class="headerlink" href="#git.diff.Diff.b_blob" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.diff.Diff.b_mode">
<code class="descname">b_mode</code><a class="headerlink" href="#git.diff.Diff.b_mode" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.diff.Diff.b_path">
<code class="descname">b_path</code><a class="headerlink" href="#git.diff.Diff.b_path" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.diff.Diff.b_rawpath">
<code class="descname">b_rawpath</code><a class="headerlink" href="#git.diff.Diff.b_rawpath" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.diff.Diff.change_type">
<code class="descname">change_type</code><a class="headerlink" href="#git.diff.Diff.change_type" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.diff.Diff.deleted_file">
<code class="descname">deleted_file</code><a class="headerlink" href="#git.diff.Diff.deleted_file" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.diff.Diff.diff">
<code class="descname">diff</code><a class="headerlink" href="#git.diff.Diff.diff" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.diff.Diff.new_file">
<code class="descname">new_file</code><a class="headerlink" href="#git.diff.Diff.new_file" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.diff.Diff.raw_rename_from">
<code class="descname">raw_rename_from</code><a class="headerlink" href="#git.diff.Diff.raw_rename_from" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.diff.Diff.raw_rename_to">
<code class="descname">raw_rename_to</code><a class="headerlink" href="#git.diff.Diff.raw_rename_to" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.diff.Diff.re_header">
<code class="descname">re_header</code><em class="property"> = &lt;_sre.SRE_Pattern object&gt;</em><a class="headerlink" href="#git.diff.Diff.re_header" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.diff.Diff.rename_from">
<code class="descname">rename_from</code><a class="headerlink" href="#git.diff.Diff.rename_from" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.diff.Diff.rename_to">
<code class="descname">rename_to</code><a class="headerlink" href="#git.diff.Diff.rename_to" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.diff.Diff.renamed">
<code class="descname">renamed</code><a class="headerlink" href="#git.diff.Diff.renamed" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">True if the blob of our diff has been renamed</td>
</tr>
<tr class="field-even field"><th class="field-name">Note:</th><td class="field-body">This property is deprecated, please use <code class="docutils literal"><span class="pre">renamed_file</span></code> instead.</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="attribute">
<dt id="git.diff.Diff.renamed_file">
<code class="descname">renamed_file</code><a class="headerlink" href="#git.diff.Diff.renamed_file" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">True if the blob of our diff has been renamed</td>
</tr>
<tr class="field-even field"><th class="field-name">Note:</th><td class="field-body">This property is deprecated, please use <code class="docutils literal"><span class="pre">renamed_file</span></code> instead.</td>
</tr>
</tbody>
</table>
</dd></dl>

</dd></dl>

</div>
<div class="section" id="module-git.exc">
<span id="exceptions"></span><h2>Exceptions<a class="headerlink" href="#module-git.exc" title="Permalink to this headline">¶</a></h2>
<p>Module containing all exceptions thrown througout the git package,</p>
<dl class="exception">
<dt id="git.exc.CacheError">
<em class="property">exception </em><code class="descclassname">git.exc.</code><code class="descname">CacheError</code><a class="headerlink" href="#git.exc.CacheError" title="Permalink to this definition">¶</a></dt>
<dd><p>Base for all errors related to the git index, which is called cache internally</p>
<dl class="attribute">
<dt id="git.exc.CacheError.__module__">
<code class="descname">__module__</code><em class="property"> = 'git.exc'</em><a class="headerlink" href="#git.exc.CacheError.__module__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.exc.CacheError.__weakref__">
<code class="descname">__weakref__</code><a class="headerlink" href="#git.exc.CacheError.__weakref__" title="Permalink to this definition">¶</a></dt>
<dd><p>list of weak references to the object (if defined)</p>
</dd></dl>

</dd></dl>

<dl class="exception">
<dt id="git.exc.CheckoutError">
<em class="property">exception </em><code class="descclassname">git.exc.</code><code class="descname">CheckoutError</code><span class="sig-paren">(</span><em>message</em>, <em>failed_files</em>, <em>valid_files</em>, <em>failed_reasons</em><span class="sig-paren">)</span><a class="headerlink" href="#git.exc.CheckoutError" title="Permalink to this definition">¶</a></dt>
<dd><p>Thrown if a file could not be checked out from the index as it contained
changes.</p>
<p>The .failed_files attribute contains a list of relative paths that failed
to be checked out as they contained changes that did not exist in the index.</p>
<p>The .failed_reasons attribute contains a string informing about the actual
cause of the issue.</p>
<p>The .valid_files attribute contains a list of relative paths to files that
were checked out successfully and hence match the version stored in the
index</p>
<dl class="method">
<dt id="git.exc.CheckoutError.__init__">
<code class="descname">__init__</code><span class="sig-paren">(</span><em>message</em>, <em>failed_files</em>, <em>valid_files</em>, <em>failed_reasons</em><span class="sig-paren">)</span><a class="headerlink" href="#git.exc.CheckoutError.__init__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.exc.CheckoutError.__module__">
<code class="descname">__module__</code><em class="property"> = 'git.exc'</em><a class="headerlink" href="#git.exc.CheckoutError.__module__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="git.exc.CheckoutError.__str__">
<code class="descname">__str__</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.exc.CheckoutError.__str__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.exc.CheckoutError.__weakref__">
<code class="descname">__weakref__</code><a class="headerlink" href="#git.exc.CheckoutError.__weakref__" title="Permalink to this definition">¶</a></dt>
<dd><p>list of weak references to the object (if defined)</p>
</dd></dl>

</dd></dl>

<dl class="exception">
<dt id="git.exc.GitCommandError">
<em class="property">exception </em><code class="descclassname">git.exc.</code><code class="descname">GitCommandError</code><span class="sig-paren">(</span><em>command</em>, <em>status</em>, <em>stderr=None</em>, <em>stdout=None</em><span class="sig-paren">)</span><a class="headerlink" href="#git.exc.GitCommandError" title="Permalink to this definition">¶</a></dt>
<dd><p>Thrown if execution of the git command fails with non-zero status code.</p>
<dl class="method">
<dt id="git.exc.GitCommandError.__init__">
<code class="descname">__init__</code><span class="sig-paren">(</span><em>command</em>, <em>status</em>, <em>stderr=None</em>, <em>stdout=None</em><span class="sig-paren">)</span><a class="headerlink" href="#git.exc.GitCommandError.__init__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.exc.GitCommandError.__module__">
<code class="descname">__module__</code><em class="property"> = 'git.exc'</em><a class="headerlink" href="#git.exc.GitCommandError.__module__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="git.exc.GitCommandError.__str__">
<code class="descname">__str__</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.exc.GitCommandError.__str__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.exc.GitCommandError.__weakref__">
<code class="descname">__weakref__</code><a class="headerlink" href="#git.exc.GitCommandError.__weakref__" title="Permalink to this definition">¶</a></dt>
<dd><p>list of weak references to the object (if defined)</p>
</dd></dl>

</dd></dl>

<dl class="exception">
<dt id="git.exc.GitCommandNotFound">
<em class="property">exception </em><code class="descclassname">git.exc.</code><code class="descname">GitCommandNotFound</code><a class="headerlink" href="#git.exc.GitCommandNotFound" title="Permalink to this definition">¶</a></dt>
<dd><p>Thrown if we cannot find the <cite>git</cite> executable in the PATH or at the path given by
the GIT_PYTHON_GIT_EXECUTABLE environment variable</p>
<dl class="attribute">
<dt id="git.exc.GitCommandNotFound.__module__">
<code class="descname">__module__</code><em class="property"> = 'git.exc'</em><a class="headerlink" href="#git.exc.GitCommandNotFound.__module__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.exc.GitCommandNotFound.__weakref__">
<code class="descname">__weakref__</code><a class="headerlink" href="#git.exc.GitCommandNotFound.__weakref__" title="Permalink to this definition">¶</a></dt>
<dd><p>list of weak references to the object (if defined)</p>
</dd></dl>

</dd></dl>

<dl class="exception">
<dt id="git.exc.HookExecutionError">
<em class="property">exception </em><code class="descclassname">git.exc.</code><code class="descname">HookExecutionError</code><span class="sig-paren">(</span><em>command</em>, <em>status</em>, <em>stdout</em>, <em>stderr</em><span class="sig-paren">)</span><a class="headerlink" href="#git.exc.HookExecutionError" title="Permalink to this definition">¶</a></dt>
<dd><p>Thrown if a hook exits with a non-zero exit code. It provides access to the exit code and the string returned
via standard output</p>
<dl class="method">
<dt id="git.exc.HookExecutionError.__init__">
<code class="descname">__init__</code><span class="sig-paren">(</span><em>command</em>, <em>status</em>, <em>stdout</em>, <em>stderr</em><span class="sig-paren">)</span><a class="headerlink" href="#git.exc.HookExecutionError.__init__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.exc.HookExecutionError.__module__">
<code class="descname">__module__</code><em class="property"> = 'git.exc'</em><a class="headerlink" href="#git.exc.HookExecutionError.__module__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="git.exc.HookExecutionError.__str__">
<code class="descname">__str__</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.exc.HookExecutionError.__str__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.exc.HookExecutionError.__weakref__">
<code class="descname">__weakref__</code><a class="headerlink" href="#git.exc.HookExecutionError.__weakref__" title="Permalink to this definition">¶</a></dt>
<dd><p>list of weak references to the object (if defined)</p>
</dd></dl>

</dd></dl>

<dl class="exception">
<dt id="git.exc.InvalidGitRepositoryError">
<em class="property">exception </em><code class="descclassname">git.exc.</code><code class="descname">InvalidGitRepositoryError</code><a class="headerlink" href="#git.exc.InvalidGitRepositoryError" title="Permalink to this definition">¶</a></dt>
<dd><p>Thrown if the given repository appears to have an invalid format.</p>
<dl class="attribute">
<dt id="git.exc.InvalidGitRepositoryError.__module__">
<code class="descname">__module__</code><em class="property"> = 'git.exc'</em><a class="headerlink" href="#git.exc.InvalidGitRepositoryError.__module__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.exc.InvalidGitRepositoryError.__weakref__">
<code class="descname">__weakref__</code><a class="headerlink" href="#git.exc.InvalidGitRepositoryError.__weakref__" title="Permalink to this definition">¶</a></dt>
<dd><p>list of weak references to the object (if defined)</p>
</dd></dl>

</dd></dl>

<dl class="exception">
<dt id="git.exc.NoSuchPathError">
<em class="property">exception </em><code class="descclassname">git.exc.</code><code class="descname">NoSuchPathError</code><a class="headerlink" href="#git.exc.NoSuchPathError" title="Permalink to this definition">¶</a></dt>
<dd><p>Thrown if a path could not be access by the system.</p>
<dl class="attribute">
<dt id="git.exc.NoSuchPathError.__module__">
<code class="descname">__module__</code><em class="property"> = 'git.exc'</em><a class="headerlink" href="#git.exc.NoSuchPathError.__module__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.exc.NoSuchPathError.__weakref__">
<code class="descname">__weakref__</code><a class="headerlink" href="#git.exc.NoSuchPathError.__weakref__" title="Permalink to this definition">¶</a></dt>
<dd><p>list of weak references to the object (if defined)</p>
</dd></dl>

</dd></dl>

<dl class="exception">
<dt id="git.exc.RepositoryDirtyError">
<em class="property">exception </em><code class="descclassname">git.exc.</code><code class="descname">RepositoryDirtyError</code><span class="sig-paren">(</span><em>repo</em>, <em>message</em><span class="sig-paren">)</span><a class="headerlink" href="#git.exc.RepositoryDirtyError" title="Permalink to this definition">¶</a></dt>
<dd><p>Thrown whenever an operation on a repository fails as it has uncommited changes that would be overwritten</p>
<dl class="method">
<dt id="git.exc.RepositoryDirtyError.__init__">
<code class="descname">__init__</code><span class="sig-paren">(</span><em>repo</em>, <em>message</em><span class="sig-paren">)</span><a class="headerlink" href="#git.exc.RepositoryDirtyError.__init__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.exc.RepositoryDirtyError.__module__">
<code class="descname">__module__</code><em class="property"> = 'git.exc'</em><a class="headerlink" href="#git.exc.RepositoryDirtyError.__module__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="git.exc.RepositoryDirtyError.__str__">
<code class="descname">__str__</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.exc.RepositoryDirtyError.__str__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.exc.RepositoryDirtyError.__weakref__">
<code class="descname">__weakref__</code><a class="headerlink" href="#git.exc.RepositoryDirtyError.__weakref__" title="Permalink to this definition">¶</a></dt>
<dd><p>list of weak references to the object (if defined)</p>
</dd></dl>

</dd></dl>

<dl class="exception">
<dt id="git.exc.UnmergedEntriesError">
<em class="property">exception </em><code class="descclassname">git.exc.</code><code class="descname">UnmergedEntriesError</code><a class="headerlink" href="#git.exc.UnmergedEntriesError" title="Permalink to this definition">¶</a></dt>
<dd><p>Thrown if an operation cannot proceed as there are still unmerged
entries in the cache</p>
<dl class="attribute">
<dt id="git.exc.UnmergedEntriesError.__module__">
<code class="descname">__module__</code><em class="property"> = 'git.exc'</em><a class="headerlink" href="#git.exc.UnmergedEntriesError.__module__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="exception">
<dt id="git.exc.WorkTreeRepositoryUnsupported">
<em class="property">exception </em><code class="descclassname">git.exc.</code><code class="descname">WorkTreeRepositoryUnsupported</code><a class="headerlink" href="#git.exc.WorkTreeRepositoryUnsupported" title="Permalink to this definition">¶</a></dt>
<dd><p>Thrown to indicate we can&#8217;t handle work tree repositories</p>
<dl class="attribute">
<dt id="git.exc.WorkTreeRepositoryUnsupported.__module__">
<code class="descname">__module__</code><em class="property"> = 'git.exc'</em><a class="headerlink" href="#git.exc.WorkTreeRepositoryUnsupported.__module__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

</div>
<div class="section" id="module-git.refs.symbolic">
<span id="refs-symbolic"></span><h2>Refs.symbolic<a class="headerlink" href="#module-git.refs.symbolic" title="Permalink to this headline">¶</a></h2>
<dl class="class">
<dt id="git.refs.symbolic.SymbolicReference">
<em class="property">class </em><code class="descclassname">git.refs.symbolic.</code><code class="descname">SymbolicReference</code><span class="sig-paren">(</span><em>repo</em>, <em>path</em><span class="sig-paren">)</span><a class="headerlink" href="#git.refs.symbolic.SymbolicReference" title="Permalink to this definition">¶</a></dt>
<dd><p>Represents a special case of a reference such that this reference is symbolic.
It does not point to a specific commit, but to another Head, which itself
specifies a commit.</p>
<p>A typical example for a symbolic reference is HEAD.</p>
<dl class="method">
<dt id="git.refs.symbolic.SymbolicReference.__eq__">
<code class="descname">__eq__</code><span class="sig-paren">(</span><em>other</em><span class="sig-paren">)</span><a class="headerlink" href="#git.refs.symbolic.SymbolicReference.__eq__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="git.refs.symbolic.SymbolicReference.__hash__">
<code class="descname">__hash__</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.refs.symbolic.SymbolicReference.__hash__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="git.refs.symbolic.SymbolicReference.__init__">
<code class="descname">__init__</code><span class="sig-paren">(</span><em>repo</em>, <em>path</em><span class="sig-paren">)</span><a class="headerlink" href="#git.refs.symbolic.SymbolicReference.__init__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.refs.symbolic.SymbolicReference.__module__">
<code class="descname">__module__</code><em class="property"> = 'git.refs.symbolic'</em><a class="headerlink" href="#git.refs.symbolic.SymbolicReference.__module__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="git.refs.symbolic.SymbolicReference.__ne__">
<code class="descname">__ne__</code><span class="sig-paren">(</span><em>other</em><span class="sig-paren">)</span><a class="headerlink" href="#git.refs.symbolic.SymbolicReference.__ne__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="git.refs.symbolic.SymbolicReference.__repr__">
<code class="descname">__repr__</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.refs.symbolic.SymbolicReference.__repr__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.refs.symbolic.SymbolicReference.__slots__">
<code class="descname">__slots__</code><em class="property"> = ('repo', 'path')</em><a class="headerlink" href="#git.refs.symbolic.SymbolicReference.__slots__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="git.refs.symbolic.SymbolicReference.__str__">
<code class="descname">__str__</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.refs.symbolic.SymbolicReference.__str__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.refs.symbolic.SymbolicReference.abspath">
<code class="descname">abspath</code><a class="headerlink" href="#git.refs.symbolic.SymbolicReference.abspath" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.refs.symbolic.SymbolicReference.commit">
<code class="descname">commit</code><a class="headerlink" href="#git.refs.symbolic.SymbolicReference.commit" title="Permalink to this definition">¶</a></dt>
<dd><p>Query or set commits directly</p>
</dd></dl>

<dl class="classmethod">
<dt id="git.refs.symbolic.SymbolicReference.create">
<em class="property">classmethod </em><code class="descname">create</code><span class="sig-paren">(</span><em>repo</em>, <em>path</em>, <em>reference='HEAD'</em>, <em>force=False</em>, <em>logmsg=None</em><span class="sig-paren">)</span><a class="headerlink" href="#git.refs.symbolic.SymbolicReference.create" title="Permalink to this definition">¶</a></dt>
<dd><p>Create a new symbolic reference, hence a reference pointing to another reference.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>repo</strong> &#8211; Repository to create the reference in</li>
<li><strong>path</strong> &#8211; full path at which the new symbolic reference is supposed to be
created at, i.e. &#8220;NEW_HEAD&#8221; or &#8220;symrefs/my_new_symref&#8221;</li>
<li><strong>reference</strong> &#8211; The reference to which the new symbolic reference should point to.
If it is a commit&#8217;ish, the symbolic ref will be detached.</li>
<li><strong>force</strong> &#8211; if True, force creation even if a symbolic reference with that name already exists.
Raise OSError otherwise</li>
<li><strong>logmsg</strong> &#8211; If not None, the message to append to the reflog. Otherwise no reflog
entry is written.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">Newly created symbolic Reference</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Raises:</th><td class="field-body"><p class="first"><strong>OSError</strong> &#8211; If a (Symbolic)Reference with the same name but different contents
already exists.</p>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Note:</th><td class="field-body"><p class="first last">This does not alter the current HEAD, index or Working Tree</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="classmethod">
<dt id="git.refs.symbolic.SymbolicReference.delete">
<em class="property">classmethod </em><code class="descname">delete</code><span class="sig-paren">(</span><em>repo</em>, <em>path</em><span class="sig-paren">)</span><a class="headerlink" href="#git.refs.symbolic.SymbolicReference.delete" title="Permalink to this definition">¶</a></dt>
<dd><p>Delete the reference at the given path</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>repo</strong> &#8211; Repository to delete the reference from</li>
<li><strong>path</strong> &#8211; Short or full path pointing to the reference, i.e. refs/myreference
or just &#8220;myreference&#8221;, hence &#8216;refs/&#8217; is implied.
Alternatively the symbolic reference to be deleted</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="classmethod">
<dt id="git.refs.symbolic.SymbolicReference.dereference_recursive">
<em class="property">classmethod </em><code class="descname">dereference_recursive</code><span class="sig-paren">(</span><em>repo</em>, <em>ref_path</em><span class="sig-paren">)</span><a class="headerlink" href="#git.refs.symbolic.SymbolicReference.dereference_recursive" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">hexsha stored in the reference at the given ref_path, recursively dereferencing all
intermediate references as required</td>
</tr>
<tr class="field-even field"><th class="field-name">Parameters:</th><td class="field-body"><strong>repo</strong> &#8211; the repository containing the reference at ref_path</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="classmethod">
<dt id="git.refs.symbolic.SymbolicReference.from_path">
<em class="property">classmethod </em><code class="descname">from_path</code><span class="sig-paren">(</span><em>repo</em>, <em>path</em><span class="sig-paren">)</span><a class="headerlink" href="#git.refs.symbolic.SymbolicReference.from_path" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>path</strong> &#8211; full .git-directory-relative path name to the Reference to instantiate</td>
</tr>
<tr class="field-even field"><th class="field-name">Note:</th><td class="field-body">use to_full_path() if you only have a partial path of a known Reference Type</td>
</tr>
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Instance of type Reference, Head, or Tag
depending on the given path</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="attribute">
<dt id="git.refs.symbolic.SymbolicReference.is_detached">
<code class="descname">is_detached</code><a class="headerlink" href="#git.refs.symbolic.SymbolicReference.is_detached" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">True if we are a detached reference, hence we point to a specific commit
instead to another reference</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="git.refs.symbolic.SymbolicReference.is_remote">
<code class="descname">is_remote</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.refs.symbolic.SymbolicReference.is_remote" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">True if this symbolic reference points to a remote branch</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="git.refs.symbolic.SymbolicReference.is_valid">
<code class="descname">is_valid</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.refs.symbolic.SymbolicReference.is_valid" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">True if the reference is valid, hence it can be read and points to
a valid object or reference.</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="classmethod">
<dt id="git.refs.symbolic.SymbolicReference.iter_items">
<em class="property">classmethod </em><code class="descname">iter_items</code><span class="sig-paren">(</span><em>repo</em>, <em>common_path=None</em><span class="sig-paren">)</span><a class="headerlink" href="#git.refs.symbolic.SymbolicReference.iter_items" title="Permalink to this definition">¶</a></dt>
<dd><p>Find all refs in the repository</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>repo</strong> &#8211; is the Repo</li>
<li><strong>common_path</strong> &#8211; Optional keyword argument to the path which is to be shared by all
returned Ref objects.
Defaults to class specific portion if None assuring that only
refs suitable for the actual class are returned.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last"><p>git.SymbolicReference[], each of them is guaranteed to be a symbolic
ref which is not detached and pointing to a valid ref</p>
<p>List is lexigraphically sorted
The returned objects represent actual subclasses, such as Head or TagReference</p>
</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="git.refs.symbolic.SymbolicReference.log">
<code class="descname">log</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.refs.symbolic.SymbolicReference.log" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">RefLog for this reference. Its last entry reflects the latest change
applied to this reference</td>
</tr>
</tbody>
</table>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">As the log is parsed every time, its recommended to cache it for use
instead of calling this method repeatedly. It should be considered read-only.</p>
</div>
</dd></dl>

<dl class="method">
<dt id="git.refs.symbolic.SymbolicReference.log_append">
<code class="descname">log_append</code><span class="sig-paren">(</span><em>oldbinsha</em>, <em>message</em>, <em>newbinsha=None</em><span class="sig-paren">)</span><a class="headerlink" href="#git.refs.symbolic.SymbolicReference.log_append" title="Permalink to this definition">¶</a></dt>
<dd><p>Append a logentry to the logfile of this ref</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>oldbinsha</strong> &#8211; binary sha this ref used to point to</li>
<li><strong>message</strong> &#8211; A message describing the change</li>
<li><strong>newbinsha</strong> &#8211; The sha the ref points to now. If None, our current commit sha
will be used</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">added RefLogEntry instance</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="git.refs.symbolic.SymbolicReference.log_entry">
<code class="descname">log_entry</code><span class="sig-paren">(</span><em>index</em><span class="sig-paren">)</span><a class="headerlink" href="#git.refs.symbolic.SymbolicReference.log_entry" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">RefLogEntry at the given index</td>
</tr>
<tr class="field-even field"><th class="field-name">Parameters:</th><td class="field-body"><strong>index</strong> &#8211; python list compatible positive or negative index</td>
</tr>
</tbody>
</table>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">This method must read part of the reflog during execution, hence
it should be used sparringly, or only if you need just one index.
In that case, it will be faster than the <code class="docutils literal"><span class="pre">log()</span></code> method</p>
</div>
</dd></dl>

<dl class="attribute">
<dt id="git.refs.symbolic.SymbolicReference.name">
<code class="descname">name</code><a class="headerlink" href="#git.refs.symbolic.SymbolicReference.name" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">In case of symbolic references, the shortest assumable name
is the path itself.</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="attribute">
<dt id="git.refs.symbolic.SymbolicReference.object">
<code class="descname">object</code><a class="headerlink" href="#git.refs.symbolic.SymbolicReference.object" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the object our ref currently refers to</p>
</dd></dl>

<dl class="attribute">
<dt id="git.refs.symbolic.SymbolicReference.path">
<code class="descname">path</code><a class="headerlink" href="#git.refs.symbolic.SymbolicReference.path" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.refs.symbolic.SymbolicReference.ref">
<code class="descname">ref</code><a class="headerlink" href="#git.refs.symbolic.SymbolicReference.ref" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the Reference we point to</p>
</dd></dl>

<dl class="attribute">
<dt id="git.refs.symbolic.SymbolicReference.reference">
<code class="descname">reference</code><a class="headerlink" href="#git.refs.symbolic.SymbolicReference.reference" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the Reference we point to</p>
</dd></dl>

<dl class="method">
<dt id="git.refs.symbolic.SymbolicReference.rename">
<code class="descname">rename</code><span class="sig-paren">(</span><em>new_path</em>, <em>force=False</em><span class="sig-paren">)</span><a class="headerlink" href="#git.refs.symbolic.SymbolicReference.rename" title="Permalink to this definition">¶</a></dt>
<dd><p>Rename self to a new path</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>new_path</strong> &#8211; Either a simple name or a full path, i.e. new_name or features/new_name.
The prefix refs/ is implied for references and will be set as needed.
In case this is a symbolic ref, there is no implied prefix</li>
<li><strong>force</strong> &#8211; If True, the rename will succeed even if a head with the target name
already exists. It will be overwritten in that case</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">self</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><strong>OSError</strong> &#8211; In case a file at path but a different contents already exists</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="attribute">
<dt id="git.refs.symbolic.SymbolicReference.repo">
<code class="descname">repo</code><a class="headerlink" href="#git.refs.symbolic.SymbolicReference.repo" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="git.refs.symbolic.SymbolicReference.set_commit">
<code class="descname">set_commit</code><span class="sig-paren">(</span><em>commit</em>, <em>logmsg=None</em><span class="sig-paren">)</span><a class="headerlink" href="#git.refs.symbolic.SymbolicReference.set_commit" title="Permalink to this definition">¶</a></dt>
<dd><p>As set_object, but restricts the type of object to be a Commit</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Raises:</th><td class="field-body"><strong>ValueError</strong> &#8211; If commit is not a Commit object or doesn&#8217;t point to
a commit</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">self</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="git.refs.symbolic.SymbolicReference.set_object">
<code class="descname">set_object</code><span class="sig-paren">(</span><em>object</em>, <em>logmsg=None</em><span class="sig-paren">)</span><a class="headerlink" href="#git.refs.symbolic.SymbolicReference.set_object" title="Permalink to this definition">¶</a></dt>
<dd><p>Set the object we point to, possibly dereference our symbolic reference first.
If the reference does not exist, it will be created</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>object</strong> &#8211; a refspec, a SymbolicReference or an Object instance. SymbolicReferences
will be dereferenced beforehand to obtain the object they point to</li>
<li><strong>logmsg</strong> &#8211; If not None, the message will be used in the reflog entry to be
written. Otherwise the reflog is not altered</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Note:</th><td class="field-body"><p class="first">plain SymbolicReferences may not actually point to objects by convention</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">self</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="git.refs.symbolic.SymbolicReference.set_reference">
<code class="descname">set_reference</code><span class="sig-paren">(</span><em>ref</em>, <em>logmsg=None</em><span class="sig-paren">)</span><a class="headerlink" href="#git.refs.symbolic.SymbolicReference.set_reference" title="Permalink to this definition">¶</a></dt>
<dd><p>Set ourselves to the given ref. It will stay a symbol if the ref is a Reference.
Otherwise an Object, given as Object instance or refspec, is assumed and if valid,
will be set which effectively detaches the refererence if it was a purely
symbolic one.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>ref</strong> &#8211; SymbolicReference instance, Object instance or refspec string
Only if the ref is a SymbolicRef instance, we will point to it. Everthing
else is dereferenced to obtain the actual object.</li>
<li><strong>logmsg</strong> &#8211; <p>If set to a string, the message will be used in the reflog.
Otherwise, a reflog entry is not written for the changed reference.
The previous commit of the entry will be the commit we point to now.</p>
<p>See also: log_append()</p>
</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">self</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Note:</th><td class="field-body"><p class="first last">This symbolic reference will not be dereferenced. For that, see
<code class="docutils literal"><span class="pre">set_object(...)</span></code></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="classmethod">
<dt id="git.refs.symbolic.SymbolicReference.to_full_path">
<em class="property">classmethod </em><code class="descname">to_full_path</code><span class="sig-paren">(</span><em>path</em><span class="sig-paren">)</span><a class="headerlink" href="#git.refs.symbolic.SymbolicReference.to_full_path" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">string with a full repository-relative path which can be used to initialize
a Reference instance, for instance by using <code class="docutils literal"><span class="pre">Reference.from_path</span></code></td>
</tr>
</tbody>
</table>
</dd></dl>

</dd></dl>

</div>
<div class="section" id="module-git.refs.reference">
<span id="refs-reference"></span><h2>Refs.reference<a class="headerlink" href="#module-git.refs.reference" title="Permalink to this headline">¶</a></h2>
<dl class="class">
<dt id="git.refs.reference.Reference">
<em class="property">class </em><code class="descclassname">git.refs.reference.</code><code class="descname">Reference</code><span class="sig-paren">(</span><em>repo</em>, <em>path</em>, <em>check_path=True</em><span class="sig-paren">)</span><a class="headerlink" href="#git.refs.reference.Reference" title="Permalink to this definition">¶</a></dt>
<dd><p>Represents a named reference to any object. Subclasses may apply restrictions though,
i.e. Heads can only point to commits.</p>
<dl class="method">
<dt id="git.refs.reference.Reference.__init__">
<code class="descname">__init__</code><span class="sig-paren">(</span><em>repo</em>, <em>path</em>, <em>check_path=True</em><span class="sig-paren">)</span><a class="headerlink" href="#git.refs.reference.Reference.__init__" title="Permalink to this definition">¶</a></dt>
<dd><p>Initialize this instance
:param repo: Our parent repository</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>path</strong> &#8211; Path relative to the .git/ directory pointing to the ref in question, i.e.
refs/heads/master</li>
<li><strong>check_path</strong> &#8211; if False, you can provide any path. Otherwise the path must start with the
default path prefix of this type.</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="attribute">
<dt id="git.refs.reference.Reference.__module__">
<code class="descname">__module__</code><em class="property"> = 'git.refs.reference'</em><a class="headerlink" href="#git.refs.reference.Reference.__module__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.refs.reference.Reference.__slots__">
<code class="descname">__slots__</code><em class="property"> = ()</em><a class="headerlink" href="#git.refs.reference.Reference.__slots__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="git.refs.reference.Reference.__str__">
<code class="descname">__str__</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.refs.reference.Reference.__str__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="classmethod">
<dt id="git.refs.reference.Reference.iter_items">
<em class="property">classmethod </em><code class="descname">iter_items</code><span class="sig-paren">(</span><em>repo</em>, <em>common_path=None</em><span class="sig-paren">)</span><a class="headerlink" href="#git.refs.reference.Reference.iter_items" title="Permalink to this definition">¶</a></dt>
<dd><p>Equivalent to SymbolicReference.iter_items, but will return non-detached
references as well.</p>
</dd></dl>

<dl class="attribute">
<dt id="git.refs.reference.Reference.name">
<code class="descname">name</code><a class="headerlink" href="#git.refs.reference.Reference.name" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">(shortest) Name of this reference - it may contain path components</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="attribute">
<dt id="git.refs.reference.Reference.remote_head">
<code class="descname">remote_head</code><a class="headerlink" href="#git.refs.reference.Reference.remote_head" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.refs.reference.Reference.remote_name">
<code class="descname">remote_name</code><a class="headerlink" href="#git.refs.reference.Reference.remote_name" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="git.refs.reference.Reference.set_object">
<code class="descname">set_object</code><span class="sig-paren">(</span><em>object</em>, <em>logmsg=None</em><span class="sig-paren">)</span><a class="headerlink" href="#git.refs.reference.Reference.set_object" title="Permalink to this definition">¶</a></dt>
<dd><p>Special version which checks if the head-log needs an update as well
:return: self</p>
</dd></dl>

</dd></dl>

</div>
<div class="section" id="module-git.refs.head">
<span id="refs-head"></span><h2>Refs.head<a class="headerlink" href="#module-git.refs.head" title="Permalink to this headline">¶</a></h2>
<dl class="class">
<dt id="git.refs.head.HEAD">
<em class="property">class </em><code class="descclassname">git.refs.head.</code><code class="descname">HEAD</code><span class="sig-paren">(</span><em>repo</em>, <em>path='HEAD'</em><span class="sig-paren">)</span><a class="headerlink" href="#git.refs.head.HEAD" title="Permalink to this definition">¶</a></dt>
<dd><p>Special case of a Symbolic Reference as it represents the repository&#8217;s
HEAD reference.</p>
<dl class="method">
<dt id="git.refs.head.HEAD.__init__">
<code class="descname">__init__</code><span class="sig-paren">(</span><em>repo</em>, <em>path='HEAD'</em><span class="sig-paren">)</span><a class="headerlink" href="#git.refs.head.HEAD.__init__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.refs.head.HEAD.__module__">
<code class="descname">__module__</code><em class="property"> = 'git.refs.head'</em><a class="headerlink" href="#git.refs.head.HEAD.__module__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.refs.head.HEAD.__slots__">
<code class="descname">__slots__</code><em class="property"> = ()</em><a class="headerlink" href="#git.refs.head.HEAD.__slots__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="git.refs.head.HEAD.orig_head">
<code class="descname">orig_head</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.refs.head.HEAD.orig_head" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">SymbolicReference pointing at the ORIG_HEAD, which is maintained
to contain the previous value of HEAD</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="git.refs.head.HEAD.reset">
<code class="descname">reset</code><span class="sig-paren">(</span><em>commit='HEAD'</em>, <em>index=True</em>, <em>working_tree=False</em>, <em>paths=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#git.refs.head.HEAD.reset" title="Permalink to this definition">¶</a></dt>
<dd><p>Reset our HEAD to the given commit optionally synchronizing
the index and working tree. The reference we refer to will be set to
commit as well.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>commit</strong> &#8211; Commit object, Reference Object or string identifying a revision we
should reset HEAD to.</li>
<li><strong>index</strong> &#8211; If True, the index will be set to match the given commit. Otherwise
it will not be touched.</li>
<li><strong>working_tree</strong> &#8211; If True, the working tree will be forcefully adjusted to match the given
commit, possibly overwriting uncommitted changes without warning.
If working_tree is True, index must be true as well</li>
<li><strong>paths</strong> &#8211; Single path or list of paths relative to the git root directory
that are to be reset. This allows to partially reset individual files.</li>
<li><strong>kwargs</strong> &#8211; Additional arguments passed to git-reset.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">self</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="git.refs.head.Head">
<em class="property">class </em><code class="descclassname">git.refs.head.</code><code class="descname">Head</code><span class="sig-paren">(</span><em>repo</em>, <em>path</em>, <em>check_path=True</em><span class="sig-paren">)</span><a class="headerlink" href="#git.refs.head.Head" title="Permalink to this definition">¶</a></dt>
<dd><p>A Head is a named reference to a Commit. Every Head instance contains a name
and a Commit object.</p>
<p>Examples:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">repo</span> <span class="o">=</span> <span class="n">Repo</span><span class="p">(</span><span class="s2">&quot;/path/to/repo&quot;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">head</span> <span class="o">=</span> <span class="n">repo</span><span class="o">.</span><span class="n">heads</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span>

<span class="gp">&gt;&gt;&gt; </span><span class="n">head</span><span class="o">.</span><span class="n">name</span>
<span class="go">&#39;master&#39;</span>

<span class="gp">&gt;&gt;&gt; </span><span class="n">head</span><span class="o">.</span><span class="n">commit</span>
<span class="go">&lt;git.Commit &quot;1c09f116cbc2cb4100fb6935bb162daa4723f455&quot;&gt;</span>

<span class="gp">&gt;&gt;&gt; </span><span class="n">head</span><span class="o">.</span><span class="n">commit</span><span class="o">.</span><span class="n">hexsha</span>
<span class="go">&#39;1c09f116cbc2cb4100fb6935bb162daa4723f455&#39;</span>
</pre></div>
</div>
<dl class="attribute">
<dt id="git.refs.head.Head.__dict__">
<code class="descname">__dict__</code><em class="property"> = dict_proxy({'rename': &lt;function rename at 0x10fe56398&gt;, '__module__': 'git.refs.head', '_common_path_default': 'refs/heads', 'config_reader': &lt;function config_reader at 0x10fe56500&gt;, 'k_config_remote': 'remote', 'set_tracking_branch': &lt;function set_tracking_branch at 0x10fe562a8&gt;, '_config_parser': &lt;function _config_parser at 0x10fe56488&gt;, 'k_config_remote_ref': 'merge', 'tracking_branch': &lt;function tracking_branch at 0x10fe56320&gt;, '__dict__': &lt;attribute '__dict__' of 'Head' objects&gt;, 'config_writer': &lt;function config_writer at 0x10fe56578&gt;, 'checkout': &lt;function checkout at 0x10fe56410&gt;, '__doc__': 'A Head is a named reference to a Commit. Every Head instance contains a name\n    and a Commit object.\n\n    Examples::\n\n        &gt;&gt;&gt; repo = Repo(&quot;/path/to/repo&quot;)\n        &gt;&gt;&gt; head = repo.heads[0]\n\n        &gt;&gt;&gt; head.name\n        \'master\'\n\n        &gt;&gt;&gt; head.commit\n        &lt;git.Commit &quot;1c09f116cbc2cb4100fb6935bb162daa4723f455&quot;&gt;\n\n        &gt;&gt;&gt; head.commit.hexsha\n        \'1c09f116cbc2cb4100fb6935bb162daa4723f455\'', '__weakref__': &lt;attribute '__weakref__' of 'Head' objects&gt;, 'delete': &lt;classmethod object at 0x10fe4ae50&gt;})</em><a class="headerlink" href="#git.refs.head.Head.__dict__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.refs.head.Head.__module__">
<code class="descname">__module__</code><em class="property"> = 'git.refs.head'</em><a class="headerlink" href="#git.refs.head.Head.__module__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.refs.head.Head.__weakref__">
<code class="descname">__weakref__</code><a class="headerlink" href="#git.refs.head.Head.__weakref__" title="Permalink to this definition">¶</a></dt>
<dd><p>list of weak references to the object (if defined)</p>
</dd></dl>

<dl class="method">
<dt id="git.refs.head.Head.checkout">
<code class="descname">checkout</code><span class="sig-paren">(</span><em>force=False</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#git.refs.head.Head.checkout" title="Permalink to this definition">¶</a></dt>
<dd><p>Checkout this head by setting the HEAD to this reference, by updating the index
to reflect the tree we point to and by updating the working tree to reflect
the latest index.</p>
<p>The command will fail if changed working tree files would be overwritten.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>force</strong> &#8211; If True, changes to the index and the working tree will be discarded.
If False, GitCommandError will be raised in that situation.</li>
<li><strong>kwargs</strong> &#8211; Additional keyword arguments to be passed to git checkout, i.e.
b=&#8217;new_branch&#8217; to create a new branch at the given spot.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The active branch after the checkout operation, usually self unless
a new branch has been created.
If there is no active branch, as the HEAD is now detached, the HEAD
reference will be returned instead.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Note:</th><td class="field-body"><p class="first last">By default it is only allowed to checkout heads - everything else
will leave the HEAD detached which is allowed and possible, but remains
a special state that some tools might not be able to handle.</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="git.refs.head.Head.config_reader">
<code class="descname">config_reader</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.refs.head.Head.config_reader" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">A configuration parser instance constrained to only read
this instance&#8217;s values</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="git.refs.head.Head.config_writer">
<code class="descname">config_writer</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.refs.head.Head.config_writer" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">A configuration writer instance with read-and write acccess
to options of this head</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="classmethod">
<dt id="git.refs.head.Head.delete">
<em class="property">classmethod </em><code class="descname">delete</code><span class="sig-paren">(</span><em>repo</em>, <em>*heads</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#git.refs.head.Head.delete" title="Permalink to this definition">¶</a></dt>
<dd><p>Delete the given heads</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>force</strong> &#8211; If True, the heads will be deleted even if they are not yet merged into
the main development stream.
Default False</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="attribute">
<dt id="git.refs.head.Head.k_config_remote">
<code class="descname">k_config_remote</code><em class="property"> = 'remote'</em><a class="headerlink" href="#git.refs.head.Head.k_config_remote" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.refs.head.Head.k_config_remote_ref">
<code class="descname">k_config_remote_ref</code><em class="property"> = 'merge'</em><a class="headerlink" href="#git.refs.head.Head.k_config_remote_ref" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="git.refs.head.Head.rename">
<code class="descname">rename</code><span class="sig-paren">(</span><em>new_path</em>, <em>force=False</em><span class="sig-paren">)</span><a class="headerlink" href="#git.refs.head.Head.rename" title="Permalink to this definition">¶</a></dt>
<dd><p>Rename self to a new path</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>new_path</strong> &#8211; Either a simple name or a path, i.e. new_name or features/new_name.
The prefix refs/heads is implied</li>
<li><strong>force</strong> &#8211; If True, the rename will succeed even if a head with the target name
already exists.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">self</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Note:</th><td class="field-body"><p class="first last">respects the ref log as git commands are used</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="git.refs.head.Head.set_tracking_branch">
<code class="descname">set_tracking_branch</code><span class="sig-paren">(</span><em>remote_reference</em><span class="sig-paren">)</span><a class="headerlink" href="#git.refs.head.Head.set_tracking_branch" title="Permalink to this definition">¶</a></dt>
<dd><dl class="docutils">
<dt>Configure this branch to track the given remote reference. This will alter</dt>
<dd>this branch&#8217;s configuration accordingly.</dd>
</dl>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>remote_reference</strong> &#8211; The remote reference to track or None to untrack
any references</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">self</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="git.refs.head.Head.tracking_branch">
<code class="descname">tracking_branch</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.refs.head.Head.tracking_branch" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">The remote_reference we are tracking, or None if we are
not a tracking branch</td>
</tr>
</tbody>
</table>
</dd></dl>

</dd></dl>

</div>
<div class="section" id="module-git.refs.tag">
<span id="refs-tag"></span><h2>Refs.tag<a class="headerlink" href="#module-git.refs.tag" title="Permalink to this headline">¶</a></h2>
<dl class="class">
<dt id="git.refs.tag.TagReference">
<em class="property">class </em><code class="descclassname">git.refs.tag.</code><code class="descname">TagReference</code><span class="sig-paren">(</span><em>repo</em>, <em>path</em>, <em>check_path=True</em><span class="sig-paren">)</span><a class="headerlink" href="#git.refs.tag.TagReference" title="Permalink to this definition">¶</a></dt>
<dd><p>Class representing a lightweight tag reference which either points to a commit
,a tag object or any other object. In the latter case additional information,
like the signature or the tag-creator, is available.</p>
<p>This tag object will always point to a commit object, but may carray additional
information in a tag object:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">tagref</span> <span class="o">=</span> <span class="n">TagReference</span><span class="o">.</span><span class="n">list_items</span><span class="p">(</span><span class="n">repo</span><span class="p">)[</span><span class="mi">0</span><span class="p">]</span>
<span class="nb">print</span><span class="p">(</span><span class="n">tagref</span><span class="o">.</span><span class="n">commit</span><span class="o">.</span><span class="n">message</span><span class="p">)</span>
<span class="k">if</span> <span class="n">tagref</span><span class="o">.</span><span class="n">tag</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
   <span class="nb">print</span><span class="p">(</span><span class="n">tagref</span><span class="o">.</span><span class="n">tag</span><span class="o">.</span><span class="n">message</span><span class="p">)</span>
</pre></div>
</div>
<dl class="attribute">
<dt id="git.refs.tag.TagReference.__module__">
<code class="descname">__module__</code><em class="property"> = 'git.refs.tag'</em><a class="headerlink" href="#git.refs.tag.TagReference.__module__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.refs.tag.TagReference.__slots__">
<code class="descname">__slots__</code><em class="property"> = ()</em><a class="headerlink" href="#git.refs.tag.TagReference.__slots__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.refs.tag.TagReference.commit">
<code class="descname">commit</code><a class="headerlink" href="#git.refs.tag.TagReference.commit" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Commit object the tag ref points to</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="classmethod">
<dt id="git.refs.tag.TagReference.create">
<em class="property">classmethod </em><code class="descname">create</code><span class="sig-paren">(</span><em>repo</em>, <em>path</em>, <em>ref='HEAD'</em>, <em>message=None</em>, <em>force=False</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#git.refs.tag.TagReference.create" title="Permalink to this definition">¶</a></dt>
<dd><p>Create a new tag reference.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>path</strong> &#8211; The name of the tag, i.e. 1.0 or releases/1.0.
The prefix refs/tags is implied</li>
<li><strong>ref</strong> &#8211; A reference to the object you want to tag. It can be a commit, tree or
blob.</li>
<li><strong>message</strong> &#8211; <p>If not None, the message will be used in your tag object. This will also
create an additional tag object that allows to obtain that information, i.e.:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">tagref</span><span class="o">.</span><span class="n">tag</span><span class="o">.</span><span class="n">message</span>
</pre></div>
</div>
</li>
<li><strong>force</strong> &#8211; If True, to force creation of a tag even though that tag already exists.</li>
<li><strong>kwargs</strong> &#8211; Additional keyword arguments to be passed to git-tag</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">A new TagReference</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="classmethod">
<dt id="git.refs.tag.TagReference.delete">
<em class="property">classmethod </em><code class="descname">delete</code><span class="sig-paren">(</span><em>repo</em>, <em>*tags</em><span class="sig-paren">)</span><a class="headerlink" href="#git.refs.tag.TagReference.delete" title="Permalink to this definition">¶</a></dt>
<dd><p>Delete the given existing tag or tags</p>
</dd></dl>

<dl class="attribute">
<dt id="git.refs.tag.TagReference.object">
<code class="descname">object</code><a class="headerlink" href="#git.refs.tag.TagReference.object" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">The object our ref currently refers to. Refs can be cached, they will
always point to the actual object as it gets re-created on each query</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="attribute">
<dt id="git.refs.tag.TagReference.tag">
<code class="descname">tag</code><a class="headerlink" href="#git.refs.tag.TagReference.tag" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Tag object this tag ref points to or None in case
we are a light weight tag</td>
</tr>
</tbody>
</table>
</dd></dl>

</dd></dl>

<dl class="attribute">
<dt id="git.refs.tag.Tag">
<code class="descclassname">git.refs.tag.</code><code class="descname">Tag</code><a class="headerlink" href="#git.refs.tag.Tag" title="Permalink to this definition">¶</a></dt>
<dd><p>alias of <a class="reference internal" href="#git.refs.tag.TagReference" title="git.refs.tag.TagReference"><code class="xref py py-class docutils literal"><span class="pre">TagReference</span></code></a></p>
</dd></dl>

</div>
<div class="section" id="module-git.refs.remote">
<span id="refs-remote"></span><h2>Refs.remote<a class="headerlink" href="#module-git.refs.remote" title="Permalink to this headline">¶</a></h2>
<dl class="class">
<dt id="git.refs.remote.RemoteReference">
<em class="property">class </em><code class="descclassname">git.refs.remote.</code><code class="descname">RemoteReference</code><span class="sig-paren">(</span><em>repo</em>, <em>path</em>, <em>check_path=True</em><span class="sig-paren">)</span><a class="headerlink" href="#git.refs.remote.RemoteReference" title="Permalink to this definition">¶</a></dt>
<dd><p>Represents a reference pointing to a remote head.</p>
<dl class="attribute">
<dt id="git.refs.remote.RemoteReference.__module__">
<code class="descname">__module__</code><em class="property"> = 'git.refs.remote'</em><a class="headerlink" href="#git.refs.remote.RemoteReference.__module__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="classmethod">
<dt id="git.refs.remote.RemoteReference.create">
<em class="property">classmethod </em><code class="descname">create</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#git.refs.remote.RemoteReference.create" title="Permalink to this definition">¶</a></dt>
<dd><p>Used to disable this method</p>
</dd></dl>

<dl class="classmethod">
<dt id="git.refs.remote.RemoteReference.delete">
<em class="property">classmethod </em><code class="descname">delete</code><span class="sig-paren">(</span><em>repo</em>, <em>*refs</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#git.refs.remote.RemoteReference.delete" title="Permalink to this definition">¶</a></dt>
<dd><p>Delete the given remote references</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Note:</th><td class="field-body">kwargs are given for compatability with the base class method as we
should not narrow the signature.</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="classmethod">
<dt id="git.refs.remote.RemoteReference.iter_items">
<em class="property">classmethod </em><code class="descname">iter_items</code><span class="sig-paren">(</span><em>repo</em>, <em>common_path=None</em>, <em>remote=None</em><span class="sig-paren">)</span><a class="headerlink" href="#git.refs.remote.RemoteReference.iter_items" title="Permalink to this definition">¶</a></dt>
<dd><p>Iterate remote references, and if given, constrain them to the given remote</p>
</dd></dl>

</dd></dl>

</div>
<div class="section" id="module-git.refs.log">
<span id="refs-log"></span><h2>Refs.log<a class="headerlink" href="#module-git.refs.log" title="Permalink to this headline">¶</a></h2>
<dl class="class">
<dt id="git.refs.log.RefLog">
<em class="property">class </em><code class="descclassname">git.refs.log.</code><code class="descname">RefLog</code><span class="sig-paren">(</span><em>filepath=None</em><span class="sig-paren">)</span><a class="headerlink" href="#git.refs.log.RefLog" title="Permalink to this definition">¶</a></dt>
<dd><p>A reflog contains reflog entries, each of which defines a certain state
of the head in question. Custom query methods allow to retrieve log entries
by date or by other criteria.</p>
<p>Reflog entries are orded, the first added entry is first in the list, the last
entry, i.e. the last change of the head or reference, is last in the list.</p>
<dl class="method">
<dt id="git.refs.log.RefLog.__init__">
<code class="descname">__init__</code><span class="sig-paren">(</span><em>filepath=None</em><span class="sig-paren">)</span><a class="headerlink" href="#git.refs.log.RefLog.__init__" title="Permalink to this definition">¶</a></dt>
<dd><p>Initialize this instance with an optional filepath, from which we will
initialize our data. The path is also used to write changes back using
the write() method</p>
</dd></dl>

<dl class="attribute">
<dt id="git.refs.log.RefLog.__module__">
<code class="descname">__module__</code><em class="property"> = 'git.refs.log'</em><a class="headerlink" href="#git.refs.log.RefLog.__module__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="staticmethod">
<dt id="git.refs.log.RefLog.__new__">
<em class="property">static </em><code class="descname">__new__</code><span class="sig-paren">(</span><em>filepath=None</em><span class="sig-paren">)</span><a class="headerlink" href="#git.refs.log.RefLog.__new__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.refs.log.RefLog.__slots__">
<code class="descname">__slots__</code><em class="property"> = ('_path',)</em><a class="headerlink" href="#git.refs.log.RefLog.__slots__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="classmethod">
<dt id="git.refs.log.RefLog.append_entry">
<em class="property">classmethod </em><code class="descname">append_entry</code><span class="sig-paren">(</span><em>config_reader</em>, <em>filepath</em>, <em>oldbinsha</em>, <em>newbinsha</em>, <em>message</em><span class="sig-paren">)</span><a class="headerlink" href="#git.refs.log.RefLog.append_entry" title="Permalink to this definition">¶</a></dt>
<dd><p>Append a new log entry to the revlog at filepath.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>config_reader</strong> &#8211; configuration reader of the repository - used to obtain
user information. May also be an Actor instance identifying the committer directly.
May also be None</li>
<li><strong>filepath</strong> &#8211; full path to the log file</li>
<li><strong>oldbinsha</strong> &#8211; binary sha of the previous commit</li>
<li><strong>newbinsha</strong> &#8211; binary sha of the current commit</li>
<li><strong>message</strong> &#8211; message describing the change to the reference</li>
<li><strong>write</strong> &#8211; If True, the changes will be written right away. Otherwise
the change will not be written</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">RefLogEntry objects which was appended to the log</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Note:</th><td class="field-body"><p class="first last">As we are append-only, concurrent access is not a problem as we
do not interfere with readers.</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="classmethod">
<dt id="git.refs.log.RefLog.entry_at">
<em class="property">classmethod </em><code class="descname">entry_at</code><span class="sig-paren">(</span><em>filepath</em>, <em>index</em><span class="sig-paren">)</span><a class="headerlink" href="#git.refs.log.RefLog.entry_at" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">RefLogEntry at the given index</p>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>filepath</strong> &#8211; full path to the index file from which to read the entry</li>
<li><strong>index</strong> &#8211; python list compatible index, i.e. it may be negative to
specifiy an entry counted from the end of the list</li>
</ul>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><strong>IndexError</strong> &#8211; If the entry didn&#8217;t exist</p>
</td>
</tr>
</tbody>
</table>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">This method is faster as it only parses the entry at index, skipping
all other lines. Nonetheless, the whole file has to be read if
the index is negative</p>
</div>
</dd></dl>

<dl class="classmethod">
<dt id="git.refs.log.RefLog.from_file">
<em class="property">classmethod </em><code class="descname">from_file</code><span class="sig-paren">(</span><em>filepath</em><span class="sig-paren">)</span><a class="headerlink" href="#git.refs.log.RefLog.from_file" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">a new RefLog instance containing all entries from the reflog
at the given filepath</td>
</tr>
<tr class="field-even field"><th class="field-name">Parameters:</th><td class="field-body"><strong>filepath</strong> &#8211; path to reflog</td>
</tr>
<tr class="field-odd field"><th class="field-name">Raises:</th><td class="field-body"><strong>ValueError</strong> &#8211; If the file could not be read or was corrupted in some way</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="classmethod">
<dt id="git.refs.log.RefLog.iter_entries">
<em class="property">classmethod </em><code class="descname">iter_entries</code><span class="sig-paren">(</span><em>stream</em><span class="sig-paren">)</span><a class="headerlink" href="#git.refs.log.RefLog.iter_entries" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Iterator yielding RefLogEntry instances, one for each line read
sfrom the given stream.</td>
</tr>
<tr class="field-even field"><th class="field-name">Parameters:</th><td class="field-body"><strong>stream</strong> &#8211; file-like object containing the revlog in its native format
or basestring instance pointing to a file to read</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="classmethod">
<dt id="git.refs.log.RefLog.path">
<em class="property">classmethod </em><code class="descname">path</code><span class="sig-paren">(</span><em>ref</em><span class="sig-paren">)</span><a class="headerlink" href="#git.refs.log.RefLog.path" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">string to absolute path at which the reflog of the given ref
instance would be found. The path is not guaranteed to point to a valid
file though.</td>
</tr>
<tr class="field-even field"><th class="field-name">Parameters:</th><td class="field-body"><strong>ref</strong> &#8211; SymbolicReference instance</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="git.refs.log.RefLog.to_file">
<code class="descname">to_file</code><span class="sig-paren">(</span><em>filepath</em><span class="sig-paren">)</span><a class="headerlink" href="#git.refs.log.RefLog.to_file" title="Permalink to this definition">¶</a></dt>
<dd><p>Write the contents of the reflog instance to a file at the given filepath.
:param filepath: path to file, parent directories are assumed to exist</p>
</dd></dl>

<dl class="method">
<dt id="git.refs.log.RefLog.write">
<code class="descname">write</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.refs.log.RefLog.write" title="Permalink to this definition">¶</a></dt>
<dd><p>Write this instance&#8217;s data to the file we are originating from
:return: self</p>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="git.refs.log.RefLogEntry">
<em class="property">class </em><code class="descclassname">git.refs.log.</code><code class="descname">RefLogEntry</code><a class="headerlink" href="#git.refs.log.RefLogEntry" title="Permalink to this definition">¶</a></dt>
<dd><p>Named tuple allowing easy access to the revlog data fields</p>
<dl class="attribute">
<dt id="git.refs.log.RefLogEntry.__module__">
<code class="descname">__module__</code><em class="property"> = 'git.refs.log'</em><a class="headerlink" href="#git.refs.log.RefLogEntry.__module__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="git.refs.log.RefLogEntry.__repr__">
<code class="descname">__repr__</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.refs.log.RefLogEntry.__repr__" title="Permalink to this definition">¶</a></dt>
<dd><p>Representation of ourselves in git reflog format</p>
</dd></dl>

<dl class="attribute">
<dt id="git.refs.log.RefLogEntry.__slots__">
<code class="descname">__slots__</code><em class="property"> = ()</em><a class="headerlink" href="#git.refs.log.RefLogEntry.__slots__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.refs.log.RefLogEntry.actor">
<code class="descname">actor</code><a class="headerlink" href="#git.refs.log.RefLogEntry.actor" title="Permalink to this definition">¶</a></dt>
<dd><p>Actor instance, providing access</p>
</dd></dl>

<dl class="method">
<dt id="git.refs.log.RefLogEntry.format">
<code class="descname">format</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.refs.log.RefLogEntry.format" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">a string suitable to be placed in a reflog file</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="classmethod">
<dt id="git.refs.log.RefLogEntry.from_line">
<em class="property">classmethod </em><code class="descname">from_line</code><span class="sig-paren">(</span><em>line</em><span class="sig-paren">)</span><a class="headerlink" href="#git.refs.log.RefLogEntry.from_line" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">New RefLogEntry instance from the given revlog line.</td>
</tr>
<tr class="field-even field"><th class="field-name">Parameters:</th><td class="field-body"><strong>line</strong> &#8211; line bytes without trailing newline</td>
</tr>
<tr class="field-odd field"><th class="field-name">Raises:</th><td class="field-body"><strong>ValueError</strong> &#8211; If line could not be parsed</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="attribute">
<dt id="git.refs.log.RefLogEntry.message">
<code class="descname">message</code><a class="headerlink" href="#git.refs.log.RefLogEntry.message" title="Permalink to this definition">¶</a></dt>
<dd><p>Message describing the operation that acted on the reference</p>
</dd></dl>

<dl class="classmethod">
<dt id="git.refs.log.RefLogEntry.new">
<em class="property">classmethod </em><code class="descname">new</code><span class="sig-paren">(</span><em>oldhexsha</em>, <em>newhexsha</em>, <em>actor</em>, <em>time</em>, <em>tz_offset</em>, <em>message</em><span class="sig-paren">)</span><a class="headerlink" href="#git.refs.log.RefLogEntry.new" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">New instance of a RefLogEntry</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="attribute">
<dt id="git.refs.log.RefLogEntry.newhexsha">
<code class="descname">newhexsha</code><a class="headerlink" href="#git.refs.log.RefLogEntry.newhexsha" title="Permalink to this definition">¶</a></dt>
<dd><p>The hexsha to the commit the ref now points to, after the change</p>
</dd></dl>

<dl class="attribute">
<dt id="git.refs.log.RefLogEntry.oldhexsha">
<code class="descname">oldhexsha</code><a class="headerlink" href="#git.refs.log.RefLogEntry.oldhexsha" title="Permalink to this definition">¶</a></dt>
<dd><p>The hexsha to the commit the ref pointed to before the change</p>
</dd></dl>

<dl class="attribute">
<dt id="git.refs.log.RefLogEntry.time">
<code class="descname">time</code><a class="headerlink" href="#git.refs.log.RefLogEntry.time" title="Permalink to this definition">¶</a></dt>
<dd><p>time as tuple:</p>
<ul class="simple">
<li>[0] = int(time)</li>
<li>[1] = int(timezone_offset) in time.altzone format</li>
</ul>
</dd></dl>

</dd></dl>

</div>
<div class="section" id="module-git.remote">
<span id="remote"></span><h2>Remote<a class="headerlink" href="#module-git.remote" title="Permalink to this headline">¶</a></h2>
<dl class="class">
<dt id="git.remote.RemoteProgress">
<em class="property">class </em><code class="descclassname">git.remote.</code><code class="descname">RemoteProgress</code><a class="headerlink" href="#git.remote.RemoteProgress" title="Permalink to this definition">¶</a></dt>
<dd><p>Handler providing an interface to parse progress information emitted by git-push
and git-fetch and to dispatch callbacks allowing subclasses to react to the progress.</p>
<dl class="attribute">
<dt id="git.remote.RemoteProgress.BEGIN">
<code class="descname">BEGIN</code><em class="property"> = 1</em><a class="headerlink" href="#git.remote.RemoteProgress.BEGIN" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.remote.RemoteProgress.CHECKING_OUT">
<code class="descname">CHECKING_OUT</code><em class="property"> = 256</em><a class="headerlink" href="#git.remote.RemoteProgress.CHECKING_OUT" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.remote.RemoteProgress.COMPRESSING">
<code class="descname">COMPRESSING</code><em class="property"> = 8</em><a class="headerlink" href="#git.remote.RemoteProgress.COMPRESSING" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.remote.RemoteProgress.COUNTING">
<code class="descname">COUNTING</code><em class="property"> = 4</em><a class="headerlink" href="#git.remote.RemoteProgress.COUNTING" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.remote.RemoteProgress.DONE_TOKEN">
<code class="descname">DONE_TOKEN</code><em class="property"> = 'done.'</em><a class="headerlink" href="#git.remote.RemoteProgress.DONE_TOKEN" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.remote.RemoteProgress.END">
<code class="descname">END</code><em class="property"> = 2</em><a class="headerlink" href="#git.remote.RemoteProgress.END" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.remote.RemoteProgress.FINDING_SOURCES">
<code class="descname">FINDING_SOURCES</code><em class="property"> = 128</em><a class="headerlink" href="#git.remote.RemoteProgress.FINDING_SOURCES" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.remote.RemoteProgress.OP_MASK">
<code class="descname">OP_MASK</code><em class="property"> = -4</em><a class="headerlink" href="#git.remote.RemoteProgress.OP_MASK" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.remote.RemoteProgress.RECEIVING">
<code class="descname">RECEIVING</code><em class="property"> = 32</em><a class="headerlink" href="#git.remote.RemoteProgress.RECEIVING" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.remote.RemoteProgress.RESOLVING">
<code class="descname">RESOLVING</code><em class="property"> = 64</em><a class="headerlink" href="#git.remote.RemoteProgress.RESOLVING" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.remote.RemoteProgress.STAGE_MASK">
<code class="descname">STAGE_MASK</code><em class="property"> = 3</em><a class="headerlink" href="#git.remote.RemoteProgress.STAGE_MASK" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.remote.RemoteProgress.TOKEN_SEPARATOR">
<code class="descname">TOKEN_SEPARATOR</code><em class="property"> = ', '</em><a class="headerlink" href="#git.remote.RemoteProgress.TOKEN_SEPARATOR" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.remote.RemoteProgress.WRITING">
<code class="descname">WRITING</code><em class="property"> = 16</em><a class="headerlink" href="#git.remote.RemoteProgress.WRITING" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="git.remote.RemoteProgress.__init__">
<code class="descname">__init__</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.remote.RemoteProgress.__init__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.remote.RemoteProgress.__module__">
<code class="descname">__module__</code><em class="property"> = 'git.util'</em><a class="headerlink" href="#git.remote.RemoteProgress.__module__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.remote.RemoteProgress.__slots__">
<code class="descname">__slots__</code><em class="property"> = ('_cur_line', '_seen_ops', '_error_lines')</em><a class="headerlink" href="#git.remote.RemoteProgress.__slots__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="git.remote.RemoteProgress.error_lines">
<code class="descname">error_lines</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.remote.RemoteProgress.error_lines" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns all lines that started with error: or fatal:</p>
</dd></dl>

<dl class="method">
<dt id="git.remote.RemoteProgress.line_dropped">
<code class="descname">line_dropped</code><span class="sig-paren">(</span><em>line</em><span class="sig-paren">)</span><a class="headerlink" href="#git.remote.RemoteProgress.line_dropped" title="Permalink to this definition">¶</a></dt>
<dd><p>Called whenever a line could not be understood and was therefore dropped.</p>
</dd></dl>

<dl class="method">
<dt id="git.remote.RemoteProgress.new_message_handler">
<code class="descname">new_message_handler</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.remote.RemoteProgress.new_message_handler" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">a progress handler suitable for handle_process_output(), passing lines on to this Progress
handler in a suitable format</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="attribute">
<dt id="git.remote.RemoteProgress.re_op_absolute">
<code class="descname">re_op_absolute</code><em class="property"> = &lt;_sre.SRE_Pattern object&gt;</em><a class="headerlink" href="#git.remote.RemoteProgress.re_op_absolute" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.remote.RemoteProgress.re_op_relative">
<code class="descname">re_op_relative</code><em class="property"> = &lt;_sre.SRE_Pattern object&gt;</em><a class="headerlink" href="#git.remote.RemoteProgress.re_op_relative" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="git.remote.RemoteProgress.update">
<code class="descname">update</code><span class="sig-paren">(</span><em>op_code</em>, <em>cur_count</em>, <em>max_count=None</em>, <em>message=''</em><span class="sig-paren">)</span><a class="headerlink" href="#git.remote.RemoteProgress.update" title="Permalink to this definition">¶</a></dt>
<dd><p>Called whenever the progress changes</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>op_code</strong> &#8211; <p>Integer allowing to be compared against Operation IDs and stage IDs.</p>
<p>Stage IDs are BEGIN and END. BEGIN will only be set once for each Operation
ID as well as END. It may be that BEGIN and END are set at once in case only
one progress message was emitted due to the speed of the operation.
Between BEGIN and END, none of these flags will be set</p>
<p>Operation IDs are all held within the OP_MASK. Only one Operation ID will
be active per call.</p>
</li>
<li><strong>cur_count</strong> &#8211; Current absolute count of items</li>
<li><strong>max_count</strong> &#8211; The maximum count of items we expect. It may be None in case there is
no maximum number of items or if it is (yet) unknown.</li>
<li><strong>message</strong> &#8211; In case of the &#8216;WRITING&#8217; operation, it contains the amount of bytes
transferred. It may possibly be used for other purposes as well.</li>
</ul>
</td>
</tr>
</tbody>
</table>
<p>You may read the contents of the current line in self._cur_line</p>
</dd></dl>

<dl class="attribute">
<dt id="git.remote.RemoteProgress.x">
<code class="descname">x</code><em class="property"> = 8</em><a class="headerlink" href="#git.remote.RemoteProgress.x" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="class">
<dt id="git.remote.PushInfo">
<em class="property">class </em><code class="descclassname">git.remote.</code><code class="descname">PushInfo</code><span class="sig-paren">(</span><em>flags</em>, <em>local_ref</em>, <em>remote_ref_string</em>, <em>remote</em>, <em>old_commit=None</em>, <em>summary=''</em><span class="sig-paren">)</span><a class="headerlink" href="#git.remote.PushInfo" title="Permalink to this definition">¶</a></dt>
<dd><p>Carries information about the result of a push operation of a single head:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">info</span> <span class="o">=</span> <span class="n">remote</span><span class="o">.</span><span class="n">push</span><span class="p">()[</span><span class="mi">0</span><span class="p">]</span>
<span class="n">info</span><span class="o">.</span><span class="n">flags</span>          <span class="c1"># bitflags providing more information about the result</span>
<span class="n">info</span><span class="o">.</span><span class="n">local_ref</span>      <span class="c1"># Reference pointing to the local reference that was pushed</span>
                    <span class="c1"># It is None if the ref was deleted.</span>
<span class="n">info</span><span class="o">.</span><span class="n">remote_ref_string</span> <span class="c1"># path to the remote reference located on the remote side</span>
<span class="n">info</span><span class="o">.</span><span class="n">remote_ref</span> <span class="c1"># Remote Reference on the local side corresponding to</span>
                <span class="c1"># the remote_ref_string. It can be a TagReference as well.</span>
<span class="n">info</span><span class="o">.</span><span class="n">old_commit</span> <span class="c1"># commit at which the remote_ref was standing before we pushed</span>
                <span class="c1"># it to local_ref.commit. Will be None if an error was indicated</span>
<span class="n">info</span><span class="o">.</span><span class="n">summary</span>    <span class="c1"># summary line providing human readable english text about the push</span>
</pre></div>
</div>
<dl class="attribute">
<dt id="git.remote.PushInfo.DELETED">
<code class="descname">DELETED</code><em class="property"> = 64</em><a class="headerlink" href="#git.remote.PushInfo.DELETED" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.remote.PushInfo.ERROR">
<code class="descname">ERROR</code><em class="property"> = 1024</em><a class="headerlink" href="#git.remote.PushInfo.ERROR" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.remote.PushInfo.FAST_FORWARD">
<code class="descname">FAST_FORWARD</code><em class="property"> = 256</em><a class="headerlink" href="#git.remote.PushInfo.FAST_FORWARD" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.remote.PushInfo.FORCED_UPDATE">
<code class="descname">FORCED_UPDATE</code><em class="property"> = 128</em><a class="headerlink" href="#git.remote.PushInfo.FORCED_UPDATE" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.remote.PushInfo.NEW_HEAD">
<code class="descname">NEW_HEAD</code><em class="property"> = 2</em><a class="headerlink" href="#git.remote.PushInfo.NEW_HEAD" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.remote.PushInfo.NEW_TAG">
<code class="descname">NEW_TAG</code><em class="property"> = 1</em><a class="headerlink" href="#git.remote.PushInfo.NEW_TAG" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.remote.PushInfo.NO_MATCH">
<code class="descname">NO_MATCH</code><em class="property"> = 4</em><a class="headerlink" href="#git.remote.PushInfo.NO_MATCH" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.remote.PushInfo.REJECTED">
<code class="descname">REJECTED</code><em class="property"> = 8</em><a class="headerlink" href="#git.remote.PushInfo.REJECTED" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.remote.PushInfo.REMOTE_FAILURE">
<code class="descname">REMOTE_FAILURE</code><em class="property"> = 32</em><a class="headerlink" href="#git.remote.PushInfo.REMOTE_FAILURE" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.remote.PushInfo.REMOTE_REJECTED">
<code class="descname">REMOTE_REJECTED</code><em class="property"> = 16</em><a class="headerlink" href="#git.remote.PushInfo.REMOTE_REJECTED" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.remote.PushInfo.UP_TO_DATE">
<code class="descname">UP_TO_DATE</code><em class="property"> = 512</em><a class="headerlink" href="#git.remote.PushInfo.UP_TO_DATE" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="git.remote.PushInfo.__init__">
<code class="descname">__init__</code><span class="sig-paren">(</span><em>flags</em>, <em>local_ref</em>, <em>remote_ref_string</em>, <em>remote</em>, <em>old_commit=None</em>, <em>summary=''</em><span class="sig-paren">)</span><a class="headerlink" href="#git.remote.PushInfo.__init__" title="Permalink to this definition">¶</a></dt>
<dd><p>Initialize a new instance</p>
</dd></dl>

<dl class="attribute">
<dt id="git.remote.PushInfo.__module__">
<code class="descname">__module__</code><em class="property"> = 'git.remote'</em><a class="headerlink" href="#git.remote.PushInfo.__module__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.remote.PushInfo.__slots__">
<code class="descname">__slots__</code><em class="property"> = ('local_ref', 'remote_ref_string', 'flags', '_old_commit_sha', '_remote', 'summary')</em><a class="headerlink" href="#git.remote.PushInfo.__slots__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.remote.PushInfo.flags">
<code class="descname">flags</code><a class="headerlink" href="#git.remote.PushInfo.flags" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.remote.PushInfo.local_ref">
<code class="descname">local_ref</code><a class="headerlink" href="#git.remote.PushInfo.local_ref" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.remote.PushInfo.old_commit">
<code class="descname">old_commit</code><a class="headerlink" href="#git.remote.PushInfo.old_commit" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.remote.PushInfo.remote_ref">
<code class="descname">remote_ref</code><a class="headerlink" href="#git.remote.PushInfo.remote_ref" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Remote Reference or TagReference in the local repository corresponding
to the remote_ref_string kept in this instance.</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="attribute">
<dt id="git.remote.PushInfo.remote_ref_string">
<code class="descname">remote_ref_string</code><a class="headerlink" href="#git.remote.PushInfo.remote_ref_string" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.remote.PushInfo.summary">
<code class="descname">summary</code><a class="headerlink" href="#git.remote.PushInfo.summary" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.remote.PushInfo.x">
<code class="descname">x</code><em class="property"> = 10</em><a class="headerlink" href="#git.remote.PushInfo.x" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="class">
<dt id="git.remote.FetchInfo">
<em class="property">class </em><code class="descclassname">git.remote.</code><code class="descname">FetchInfo</code><span class="sig-paren">(</span><em>ref</em>, <em>flags</em>, <em>note=''</em>, <em>old_commit=None</em>, <em>remote_ref_path=None</em><span class="sig-paren">)</span><a class="headerlink" href="#git.remote.FetchInfo" title="Permalink to this definition">¶</a></dt>
<dd><p>Carries information about the results of a fetch operation of a single head:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">info</span> <span class="o">=</span> <span class="n">remote</span><span class="o">.</span><span class="n">fetch</span><span class="p">()[</span><span class="mi">0</span><span class="p">]</span>
<span class="n">info</span><span class="o">.</span><span class="n">ref</span>           <span class="c1"># Symbolic Reference or RemoteReference to the changed</span>
                   <span class="c1"># remote head or FETCH_HEAD</span>
<span class="n">info</span><span class="o">.</span><span class="n">flags</span>         <span class="c1"># additional flags to be &amp; with enumeration members,</span>
                   <span class="c1"># i.e. info.flags &amp; info.REJECTED</span>
                   <span class="c1"># is 0 if ref is SymbolicReference</span>
<span class="n">info</span><span class="o">.</span><span class="n">note</span>          <span class="c1"># additional notes given by git-fetch intended for the user</span>
<span class="n">info</span><span class="o">.</span><span class="n">old_commit</span>    <span class="c1"># if info.flags &amp; info.FORCED_UPDATE|info.FAST_FORWARD,</span>
                   <span class="c1"># field is set to the previous location of ref, otherwise None</span>
<span class="n">info</span><span class="o">.</span><span class="n">remote_ref_path</span> <span class="c1"># The path from which we fetched on the remote. It&#39;s the remote&#39;s version of our info.ref</span>
</pre></div>
</div>
<dl class="attribute">
<dt id="git.remote.FetchInfo.ERROR">
<code class="descname">ERROR</code><em class="property"> = 128</em><a class="headerlink" href="#git.remote.FetchInfo.ERROR" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.remote.FetchInfo.FAST_FORWARD">
<code class="descname">FAST_FORWARD</code><em class="property"> = 64</em><a class="headerlink" href="#git.remote.FetchInfo.FAST_FORWARD" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.remote.FetchInfo.FORCED_UPDATE">
<code class="descname">FORCED_UPDATE</code><em class="property"> = 32</em><a class="headerlink" href="#git.remote.FetchInfo.FORCED_UPDATE" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.remote.FetchInfo.HEAD_UPTODATE">
<code class="descname">HEAD_UPTODATE</code><em class="property"> = 4</em><a class="headerlink" href="#git.remote.FetchInfo.HEAD_UPTODATE" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.remote.FetchInfo.NEW_HEAD">
<code class="descname">NEW_HEAD</code><em class="property"> = 2</em><a class="headerlink" href="#git.remote.FetchInfo.NEW_HEAD" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.remote.FetchInfo.NEW_TAG">
<code class="descname">NEW_TAG</code><em class="property"> = 1</em><a class="headerlink" href="#git.remote.FetchInfo.NEW_TAG" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.remote.FetchInfo.REJECTED">
<code class="descname">REJECTED</code><em class="property"> = 16</em><a class="headerlink" href="#git.remote.FetchInfo.REJECTED" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.remote.FetchInfo.TAG_UPDATE">
<code class="descname">TAG_UPDATE</code><em class="property"> = 8</em><a class="headerlink" href="#git.remote.FetchInfo.TAG_UPDATE" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="git.remote.FetchInfo.__init__">
<code class="descname">__init__</code><span class="sig-paren">(</span><em>ref</em>, <em>flags</em>, <em>note=''</em>, <em>old_commit=None</em>, <em>remote_ref_path=None</em><span class="sig-paren">)</span><a class="headerlink" href="#git.remote.FetchInfo.__init__" title="Permalink to this definition">¶</a></dt>
<dd><p>Initialize a new instance</p>
</dd></dl>

<dl class="attribute">
<dt id="git.remote.FetchInfo.__module__">
<code class="descname">__module__</code><em class="property"> = 'git.remote'</em><a class="headerlink" href="#git.remote.FetchInfo.__module__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.remote.FetchInfo.__slots__">
<code class="descname">__slots__</code><em class="property"> = ('ref', 'old_commit', 'flags', 'note', 'remote_ref_path')</em><a class="headerlink" href="#git.remote.FetchInfo.__slots__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="git.remote.FetchInfo.__str__">
<code class="descname">__str__</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.remote.FetchInfo.__str__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.remote.FetchInfo.commit">
<code class="descname">commit</code><a class="headerlink" href="#git.remote.FetchInfo.commit" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Commit of our remote ref</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="attribute">
<dt id="git.remote.FetchInfo.flags">
<code class="descname">flags</code><a class="headerlink" href="#git.remote.FetchInfo.flags" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.remote.FetchInfo.name">
<code class="descname">name</code><a class="headerlink" href="#git.remote.FetchInfo.name" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Name of our remote ref</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="attribute">
<dt id="git.remote.FetchInfo.note">
<code class="descname">note</code><a class="headerlink" href="#git.remote.FetchInfo.note" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.remote.FetchInfo.old_commit">
<code class="descname">old_commit</code><a class="headerlink" href="#git.remote.FetchInfo.old_commit" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.remote.FetchInfo.re_fetch_result">
<code class="descname">re_fetch_result</code><em class="property"> = &lt;_sre.SRE_Pattern object&gt;</em><a class="headerlink" href="#git.remote.FetchInfo.re_fetch_result" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.remote.FetchInfo.ref">
<code class="descname">ref</code><a class="headerlink" href="#git.remote.FetchInfo.ref" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.remote.FetchInfo.remote_ref_path">
<code class="descname">remote_ref_path</code><a class="headerlink" href="#git.remote.FetchInfo.remote_ref_path" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.remote.FetchInfo.x">
<code class="descname">x</code><em class="property"> = 7</em><a class="headerlink" href="#git.remote.FetchInfo.x" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="class">
<dt id="git.remote.Remote">
<em class="property">class </em><code class="descclassname">git.remote.</code><code class="descname">Remote</code><span class="sig-paren">(</span><em>repo</em>, <em>name</em><span class="sig-paren">)</span><a class="headerlink" href="#git.remote.Remote" title="Permalink to this definition">¶</a></dt>
<dd><p>Provides easy read and write access to a git remote.</p>
<p>Everything not part of this interface is considered an option for the current
remote, allowing constructs like remote.pushurl to query the pushurl.</p>
<p>NOTE: When querying configuration, the configuration accessor will be cached
to speed up subsequent accesses.</p>
<dl class="method">
<dt id="git.remote.Remote.__eq__">
<code class="descname">__eq__</code><span class="sig-paren">(</span><em>other</em><span class="sig-paren">)</span><a class="headerlink" href="#git.remote.Remote.__eq__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="git.remote.Remote.__getattr__">
<code class="descname">__getattr__</code><span class="sig-paren">(</span><em>attr</em><span class="sig-paren">)</span><a class="headerlink" href="#git.remote.Remote.__getattr__" title="Permalink to this definition">¶</a></dt>
<dd><p>Allows to call this instance like
remote.special( *args, **kwargs) to call git-remote special self.name</p>
</dd></dl>

<dl class="method">
<dt id="git.remote.Remote.__hash__">
<code class="descname">__hash__</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.remote.Remote.__hash__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="git.remote.Remote.__init__">
<code class="descname">__init__</code><span class="sig-paren">(</span><em>repo</em>, <em>name</em><span class="sig-paren">)</span><a class="headerlink" href="#git.remote.Remote.__init__" title="Permalink to this definition">¶</a></dt>
<dd><p>Initialize a remote instance</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>repo</strong> &#8211; The repository we are a remote of</li>
<li><strong>name</strong> &#8211; the name of the remote, i.e. &#8216;origin&#8217;</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="attribute">
<dt id="git.remote.Remote.__module__">
<code class="descname">__module__</code><em class="property"> = 'git.remote'</em><a class="headerlink" href="#git.remote.Remote.__module__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="git.remote.Remote.__ne__">
<code class="descname">__ne__</code><span class="sig-paren">(</span><em>other</em><span class="sig-paren">)</span><a class="headerlink" href="#git.remote.Remote.__ne__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="git.remote.Remote.__repr__">
<code class="descname">__repr__</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.remote.Remote.__repr__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.remote.Remote.__slots__">
<code class="descname">__slots__</code><em class="property"> = ('repo', 'name', '_config_reader')</em><a class="headerlink" href="#git.remote.Remote.__slots__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="git.remote.Remote.__str__">
<code class="descname">__str__</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.remote.Remote.__str__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="classmethod">
<dt id="git.remote.Remote.add">
<em class="property">classmethod </em><code class="descname">add</code><span class="sig-paren">(</span><em>repo</em>, <em>name</em>, <em>url</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#git.remote.Remote.add" title="Permalink to this definition">¶</a></dt>
<dd><p>Create a new remote to the given repository
:param repo: Repository instance that is to receive the new remote
:param name: Desired name of the remote
:param url: URL which corresponds to the remote&#8217;s name
:param kwargs: Additional arguments to be passed to the git-remote add command
:return: New Remote instance
:raise GitCommandError: in case an origin with that name already exists</p>
</dd></dl>

<dl class="method">
<dt id="git.remote.Remote.add_url">
<code class="descname">add_url</code><span class="sig-paren">(</span><em>url</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#git.remote.Remote.add_url" title="Permalink to this definition">¶</a></dt>
<dd><p>Adds a new url on current remote (special case of git remote set_url)</p>
<p>This command adds new URLs to a given remote, making it possible to have
multiple URLs for a single remote.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>url</strong> &#8211; string being the URL to add as an extra remote URL</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">self</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="attribute">
<dt id="git.remote.Remote.config_reader">
<code class="descname">config_reader</code><a class="headerlink" href="#git.remote.Remote.config_reader" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">GitConfigParser compatible object able to read options for only our remote.
Hence you may simple type config.get(&#8220;pushurl&#8221;) to obtain the information</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="attribute">
<dt id="git.remote.Remote.config_writer">
<code class="descname">config_writer</code><a class="headerlink" href="#git.remote.Remote.config_writer" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">GitConfigParser compatible object able to write options for this remote.</p>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Note:</th><td class="field-body"><p class="first">You can only own one writer at a time - delete it to release the
configuration file and make it useable by others.</p>
<p class="last">To assure consistent results, you should only query options through the
writer. Once you are done writing, you are free to use the config reader
once again.</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="classmethod">
<dt id="git.remote.Remote.create">
<em class="property">classmethod </em><code class="descname">create</code><span class="sig-paren">(</span><em>repo</em>, <em>name</em>, <em>url</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#git.remote.Remote.create" title="Permalink to this definition">¶</a></dt>
<dd><p>Create a new remote to the given repository
:param repo: Repository instance that is to receive the new remote
:param name: Desired name of the remote
:param url: URL which corresponds to the remote&#8217;s name
:param kwargs: Additional arguments to be passed to the git-remote add command
:return: New Remote instance
:raise GitCommandError: in case an origin with that name already exists</p>
</dd></dl>

<dl class="method">
<dt id="git.remote.Remote.delete_url">
<code class="descname">delete_url</code><span class="sig-paren">(</span><em>url</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#git.remote.Remote.delete_url" title="Permalink to this definition">¶</a></dt>
<dd><p>Deletes a new url on current remote (special case of git remote set_url)</p>
<p>This command deletes new URLs to a given remote, making it possible to have
multiple URLs for a single remote.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>url</strong> &#8211; string being the URL to delete from the remote</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">self</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="git.remote.Remote.exists">
<code class="descname">exists</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.remote.Remote.exists" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">True if this is a valid, existing remote.
Valid remotes have an entry in the repository&#8217;s configuration</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="git.remote.Remote.fetch">
<code class="descname">fetch</code><span class="sig-paren">(</span><em>refspec=None</em>, <em>progress=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#git.remote.Remote.fetch" title="Permalink to this definition">¶</a></dt>
<dd><p>Fetch the latest changes for this remote</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>refspec</strong> &#8211; <p>A &#8220;refspec&#8221; is used by fetch and push to describe the mapping
between remote ref and local ref. They are combined with a colon in
the format &lt;src&gt;:&lt;dst&gt;, preceded by an optional plus sign, +.
For example: git fetch $URL refs/heads/master:refs/heads/origin means
&#8220;grab the master branch head from the $URL and store it as my origin
branch head&#8221;. And git push $URL refs/heads/master:refs/heads/to-upstream
means &#8220;publish my master branch head as to-upstream branch at $URL&#8221;.
See also git-push(1).</p>
<p>Taken from the git manual</p>
<p>Fetch supports multiple refspecs (as the
underlying git-fetch does) - supplying a list rather than a string
for &#8216;refspec&#8217; will make use of this facility.</p>
</li>
<li><strong>progress</strong> &#8211; See &#8216;push&#8217; method</li>
<li><strong>kwargs</strong> &#8211; Additional arguments to be passed to git-fetch</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">IterableList(FetchInfo, ...) list of FetchInfo instances providing detailed
information about the fetch results</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Note:</th><td class="field-body"><p class="first last">As fetch does not provide progress information to non-ttys, we cannot make
it available here unfortunately as in the &#8216;push&#8217; method.</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="classmethod">
<dt id="git.remote.Remote.iter_items">
<em class="property">classmethod </em><code class="descname">iter_items</code><span class="sig-paren">(</span><em>repo</em><span class="sig-paren">)</span><a class="headerlink" href="#git.remote.Remote.iter_items" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Iterator yielding Remote objects of the given repository</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="attribute">
<dt id="git.remote.Remote.name">
<code class="descname">name</code><a class="headerlink" href="#git.remote.Remote.name" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="git.remote.Remote.pull">
<code class="descname">pull</code><span class="sig-paren">(</span><em>refspec=None</em>, <em>progress=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#git.remote.Remote.pull" title="Permalink to this definition">¶</a></dt>
<dd><p>Pull changes from the given branch, being the same as a fetch followed
by a merge of branch with your local branch.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>refspec</strong> &#8211; see &#8216;fetch&#8217; method</li>
<li><strong>progress</strong> &#8211; see &#8216;push&#8217; method</li>
<li><strong>kwargs</strong> &#8211; Additional arguments to be passed to git-pull</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">Please see &#8216;fetch&#8217; method</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="git.remote.Remote.push">
<code class="descname">push</code><span class="sig-paren">(</span><em>refspec=None</em>, <em>progress=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#git.remote.Remote.push" title="Permalink to this definition">¶</a></dt>
<dd><p>Push changes from source branch in refspec to target branch in refspec.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>refspec</strong> &#8211; see &#8216;fetch&#8217; method</li>
<li><strong>progress</strong> &#8211; <p>Can take one of many value types:</p>
<ul>
<li>None to discard progress information</li>
<li>A function (callable) that is called with the progress infomation.<p>Signature: <code class="docutils literal"><span class="pre">progress(op_code,</span> <span class="pre">cur_count,</span> <span class="pre">max_count=None,</span> <span class="pre">message='')</span></code>.</p>
</li>
</ul>
<blockquote>
<div><dl class="docutils">
<dt><a class="reference external" href="http://goo.gl/NPa7st">Click here</a> for a description of all arguments</dt>
<dd>given to the function.</dd>
</dl>
</div></blockquote>
<ul>
<li>An instance of a class derived from <code class="docutils literal"><span class="pre">git.RemoteProgress</span></code> that
overrides the <code class="docutils literal"><span class="pre">update()</span></code> function.</li>
</ul>
</li>
<li><strong>kwargs</strong> &#8211; Additional arguments to be passed to git-push</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Note:</th><td class="field-body"><p class="first">No further progress information is returned after push returns.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">IterableList(PushInfo, ...) iterable list of PushInfo instances, each
one informing about an individual head which had been updated on the remote
side.
If the push contains rejected heads, these will have the PushInfo.ERROR bit set
in their flags.
If the operation fails completely, the length of the returned IterableList will
be null.</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="attribute">
<dt id="git.remote.Remote.refs">
<code class="descname">refs</code><a class="headerlink" href="#git.remote.Remote.refs" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">IterableList of RemoteReference objects. It is prefixed, allowing
you to omit the remote path portion, i.e.::
remote.refs.master # yields RemoteReference(&#8216;/refs/remotes/origin/master&#8217;)</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="classmethod">
<dt id="git.remote.Remote.remove">
<em class="property">classmethod </em><code class="descname">remove</code><span class="sig-paren">(</span><em>repo</em>, <em>name</em><span class="sig-paren">)</span><a class="headerlink" href="#git.remote.Remote.remove" title="Permalink to this definition">¶</a></dt>
<dd><p>Remove the remote with the given name
:return: the passed remote name to remove</p>
</dd></dl>

<dl class="method">
<dt id="git.remote.Remote.rename">
<code class="descname">rename</code><span class="sig-paren">(</span><em>new_name</em><span class="sig-paren">)</span><a class="headerlink" href="#git.remote.Remote.rename" title="Permalink to this definition">¶</a></dt>
<dd><p>Rename self to the given new_name
:return: self</p>
</dd></dl>

<dl class="attribute">
<dt id="git.remote.Remote.repo">
<code class="descname">repo</code><a class="headerlink" href="#git.remote.Remote.repo" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="classmethod">
<dt id="git.remote.Remote.rm">
<em class="property">classmethod </em><code class="descname">rm</code><span class="sig-paren">(</span><em>repo</em>, <em>name</em><span class="sig-paren">)</span><a class="headerlink" href="#git.remote.Remote.rm" title="Permalink to this definition">¶</a></dt>
<dd><p>Remove the remote with the given name
:return: the passed remote name to remove</p>
</dd></dl>

<dl class="method">
<dt id="git.remote.Remote.set_url">
<code class="descname">set_url</code><span class="sig-paren">(</span><em>new_url</em>, <em>old_url=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#git.remote.Remote.set_url" title="Permalink to this definition">¶</a></dt>
<dd><p>Configure URLs on current remote (cf command git remote set_url)</p>
<p>This command manages URLs on the remote.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>new_url</strong> &#8211; string being the URL to add as an extra remote URL</li>
<li><strong>old_url</strong> &#8211; when set, replaces this URL with new_url for the remote</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">self</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="attribute">
<dt id="git.remote.Remote.stale_refs">
<code class="descname">stale_refs</code><a class="headerlink" href="#git.remote.Remote.stale_refs" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">IterableList RemoteReference objects that do not have a corresponding
head in the remote reference anymore as they have been deleted on the
remote side, but are still available locally.<p>The IterableList is prefixed, hence the &#8216;origin&#8217; must be omitted. See
&#8216;refs&#8217; property for an example.</p>
<p>To make things more complicated, it can be possble for the list to include
other kinds of references, for example, tag references, if these are stale
as well. This is a fix for the issue described here:
<a class="reference external" href="https://github.com/gitpython-developers/GitPython/issues/260">https://github.com/gitpython-developers/GitPython/issues/260</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="git.remote.Remote.update">
<code class="descname">update</code><span class="sig-paren">(</span><em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#git.remote.Remote.update" title="Permalink to this definition">¶</a></dt>
<dd><p>Fetch all changes for this remote, including new branches which will
be forced in ( in case your local remote branch is not part the new remote branches
ancestry anymore ).</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>kwargs</strong> &#8211; Additional arguments passed to git-remote update</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">self</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="attribute">
<dt id="git.remote.Remote.urls">
<code class="descname">urls</code><a class="headerlink" href="#git.remote.Remote.urls" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Iterator yielding all configured URL targets on a remote</td>
</tr>
</tbody>
</table>
<p>as strings</p>
</dd></dl>

</dd></dl>

</div>
<div class="section" id="module-git.repo.base">
<span id="repo-base"></span><h2>Repo.Base<a class="headerlink" href="#module-git.repo.base" title="Permalink to this headline">¶</a></h2>
<dl class="class">
<dt id="git.repo.base.Repo">
<em class="property">class </em><code class="descclassname">git.repo.base.</code><code class="descname">Repo</code><span class="sig-paren">(</span><em>path=None</em>, <em>odbt=&lt;class 'git.db.GitCmdObjectDB'&gt;</em>, <em>search_parent_directories=False</em><span class="sig-paren">)</span><a class="headerlink" href="#git.repo.base.Repo" title="Permalink to this definition">¶</a></dt>
<dd><p>Represents a git repository and allows you to query references,
gather commit information, generate diffs, create and clone repositories query
the log.</p>
<p>The following attributes are worth using:</p>
<p>&#8216;working_dir&#8217; is the working directory of the git command, which is the working tree
directory if available or the .git directory in case of bare repositories</p>
<p>&#8216;working_tree_dir&#8217; is the working tree directory, but will raise AssertionError
if we are a bare repository.</p>
<p>&#8216;git_dir&#8217; is the .git repository directory, which is always set.</p>
<dl class="attribute">
<dt id="git.repo.base.Repo.DAEMON_EXPORT_FILE">
<code class="descname">DAEMON_EXPORT_FILE</code><em class="property"> = 'git-daemon-export-ok'</em><a class="headerlink" href="#git.repo.base.Repo.DAEMON_EXPORT_FILE" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.repo.base.Repo.GitCommandWrapperType">
<code class="descname">GitCommandWrapperType</code><a class="headerlink" href="#git.repo.base.Repo.GitCommandWrapperType" title="Permalink to this definition">¶</a></dt>
<dd><p>alias of <code class="xref py py-class docutils literal"><span class="pre">Git</span></code></p>
</dd></dl>

<dl class="method">
<dt id="git.repo.base.Repo.__del__">
<code class="descname">__del__</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.repo.base.Repo.__del__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.repo.base.Repo.__dict__">
<code class="descname">__dict__</code><em class="property"> = dict_proxy({'create_submodule': &lt;function create_submodule at 0x10f6a8de8&gt;, 'config_reader': &lt;function config_reader at 0x10f6a5410&gt;, 're_author_committer_start': &lt;_sre.SRE_Pattern object at 0x10fde0b70&gt;, 're_hexsha_shortened': &lt;_sre.SRE_Pattern object at 0x10fe7a0f8&gt;, 'is_dirty': &lt;function is_dirty at 0x10f6a59b0&gt;, 'references': &lt;property object at 0x10fd81998&gt;, 'merge_base': &lt;function merge_base at 0x10f6a56e0&gt;, '_clone': &lt;classmethod object at 0x10ff4eef8&gt;, '__weakref__': &lt;attribute '__weakref__' of 'Repo' objects&gt;, 'submodule': &lt;function submodule at 0x10f6a8d70&gt;, 'heads': &lt;property object at 0x10fd81940&gt;, 'iter_commits': &lt;function iter_commits at 0x10f6a5668&gt;, '__eq__': &lt;function __eq__ at 0x10f6a86e0&gt;, 'create_tag': &lt;function create_tag at 0x10f6a51b8&gt;, 'init': &lt;classmethod object at 0x10ff4eec0&gt;, 'active_branch': &lt;property object at 0x10fd81cb0&gt;, '__doc__': &quot;Represents a git repository and allows you to query references,\n    gather commit information, generate diffs, create and clone repositories query\n    the log.\n\n    The following attributes are worth using:\n\n    'working_dir' is the working directory of the git command, which is the working tree\n    directory if available or the .git directory in case of bare repositories\n\n    'working_tree_dir' is the working tree directory, but will raise AssertionError\n    if we are a bare repository.\n\n    'git_dir' is the .git repository directory, which is always set.&quot;, 'head': &lt;property object at 0x10fd81a48&gt;, 'submodule_update': &lt;function submodule_update at 0x10f6a8ed8&gt;, '__del__': &lt;function __del__ at 0x10f6a8668&gt;, 'untracked_files': &lt;property object at 0x10fd81c58&gt;, 'create_remote': &lt;function create_remote at 0x10f6a52a8&gt;, 'remotes': &lt;property object at 0x10fd81aa0&gt;, 'remote': &lt;function remote at 0x10f6a8c80&gt;, '_get_config_path': &lt;function _get_config_path at 0x10f6a5398&gt;, 'GitCommandWrapperType': &lt;class 'git.cmd.Git'&gt;, 'DAEMON_EXPORT_FILE': 'git-daemon-export-ok', 'delete_tag': &lt;function delete_tag at 0x10f6a5230&gt;, 'blame_incremental': &lt;function blame_incremental at 0x10f6a5b90&gt;, 'tree': &lt;function tree at 0x10f6a55f0&gt;, 'working_tree_dir': &lt;property object at 0x10fd81890&gt;, '__hash__': &lt;function __hash__ at 0x10f6a87d0&gt;, 'rev_parse': &lt;function rev_parse at 0x10f6a8140&gt;, '__module__': 'git.repo.base', 're_hexsha_only': &lt;_sre.SRE_Pattern object at 0x10fdec990&gt;, 'submodules': &lt;property object at 0x10fd81af8&gt;, 'refs': &lt;property object at 0x10fd81998&gt;, 'iter_submodules': &lt;function iter_submodules at 0x10f6a8e60&gt;, '__dict__': &lt;attribute '__dict__' of 'Repo' objects&gt;, 'tag': &lt;function tag at 0x10f6a5050&gt;, 'bare': &lt;property object at 0x10fd818e8&gt;, 'daemon_export': &lt;property object at 0x10fd81ba8&gt;, 'archive': &lt;function archive at 0x10f6a5e60&gt;, '__init__': &lt;function __init__ at 0x10f6a85f0&gt;, 'alternates': &lt;property object at 0x10fd81c00&gt;, 'index': &lt;property object at 0x10fd819f0&gt;, 're_whitespace': &lt;_sre.SRE_Pattern object at 0x10fc01030&gt;, '_set_alternates': &lt;function _set_alternates at 0x10f6a5938&gt;, 'delete_head': &lt;function delete_head at 0x10f6a5140&gt;, 'has_separate_working_tree': &lt;function has_separate_working_tree at 0x10f6a5ed8&gt;, '_get_untracked_files': &lt;function _get_untracked_files at 0x10f6a5aa0&gt;, '__ne__': &lt;function __ne__ at 0x10f6a8758&gt;, 're_tab_full_line': &lt;_sre.SRE_Pattern object at 0x10fe6e2f0&gt;, 'description': &lt;property object at 0x10fd81838&gt;, 'tags': &lt;property object at 0x10fd81b50&gt;, 'clone': &lt;function clone at 0x10f6a5d70&gt;, 'create_head': &lt;function create_head at 0x10f6a50c8&gt;, 'blame': &lt;function blame at 0x10f6a5c08&gt;, 'delete_remote': &lt;function delete_remote at 0x10f6a5320&gt;, 'iter_trees': &lt;function iter_trees at 0x10f6a5578&gt;, 'config_writer': &lt;function config_writer at 0x10f6a5488&gt;, 'branches': &lt;property object at 0x10fd81940&gt;, 'is_ancestor': &lt;function is_ancestor at 0x10f6a5758&gt;, '__repr__': &lt;function __repr__ at 0x10f6a5f50&gt;, 'commit': &lt;function commit at 0x10f6a5500&gt;, '_get_alternates': &lt;function _get_alternates at 0x10f6a58c0&gt;, 'clone_from': &lt;classmethod object at 0x10ff4ef30&gt;, 'config_level': ('system', 'user', 'global', 'repository')})</em><a class="headerlink" href="#git.repo.base.Repo.__dict__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="git.repo.base.Repo.__eq__">
<code class="descname">__eq__</code><span class="sig-paren">(</span><em>rhs</em><span class="sig-paren">)</span><a class="headerlink" href="#git.repo.base.Repo.__eq__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="git.repo.base.Repo.__hash__">
<code class="descname">__hash__</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.repo.base.Repo.__hash__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="git.repo.base.Repo.__init__">
<code class="descname">__init__</code><span class="sig-paren">(</span><em>path=None</em>, <em>odbt=&lt;class 'git.db.GitCmdObjectDB'&gt;</em>, <em>search_parent_directories=False</em><span class="sig-paren">)</span><a class="headerlink" href="#git.repo.base.Repo.__init__" title="Permalink to this definition">¶</a></dt>
<dd><p>Create a new Repo instance</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>path</strong> &#8211; <p>the path to either the root git directory or the bare git repo:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">repo</span> <span class="o">=</span> <span class="n">Repo</span><span class="p">(</span><span class="s2">&quot;/Users/mtrier/Development/git-python&quot;</span><span class="p">)</span>
<span class="n">repo</span> <span class="o">=</span> <span class="n">Repo</span><span class="p">(</span><span class="s2">&quot;/Users/mtrier/Development/git-python.git&quot;</span><span class="p">)</span>
<span class="n">repo</span> <span class="o">=</span> <span class="n">Repo</span><span class="p">(</span><span class="s2">&quot;~/Development/git-python.git&quot;</span><span class="p">)</span>
<span class="n">repo</span> <span class="o">=</span> <span class="n">Repo</span><span class="p">(</span><span class="s2">&quot;$REPOSITORIES/Development/git-python.git&quot;</span><span class="p">)</span>
</pre></div>
</div>
</li>
<li><strong>odbt</strong> &#8211; Object DataBase type - a type which is constructed by providing
the directory containing the database objects, i.e. .git/objects. It will
be used to access all object data</li>
<li><strong>search_parent_directories</strong> &#8211; <p>if True, all parent directories will be searched for a valid repo as well.</p>
<p>Please note that this was the default behaviour in older versions of GitPython,
which is considered a bug though.</p>
</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><ul class="first simple">
<li><strong>InvalidGitRepositoryError</strong> &#8211; </li>
<li><strong>NoSuchPathError</strong> &#8211; </li>
</ul>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">git.Repo</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="attribute">
<dt id="git.repo.base.Repo.__module__">
<code class="descname">__module__</code><em class="property"> = 'git.repo.base'</em><a class="headerlink" href="#git.repo.base.Repo.__module__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="git.repo.base.Repo.__ne__">
<code class="descname">__ne__</code><span class="sig-paren">(</span><em>rhs</em><span class="sig-paren">)</span><a class="headerlink" href="#git.repo.base.Repo.__ne__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="git.repo.base.Repo.__repr__">
<code class="descname">__repr__</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.repo.base.Repo.__repr__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.repo.base.Repo.__weakref__">
<code class="descname">__weakref__</code><a class="headerlink" href="#git.repo.base.Repo.__weakref__" title="Permalink to this definition">¶</a></dt>
<dd><p>list of weak references to the object (if defined)</p>
</dd></dl>

<dl class="attribute">
<dt id="git.repo.base.Repo.active_branch">
<code class="descname">active_branch</code><a class="headerlink" href="#git.repo.base.Repo.active_branch" title="Permalink to this definition">¶</a></dt>
<dd><p>The name of the currently active branch.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Head to the active branch</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="attribute">
<dt id="git.repo.base.Repo.alternates">
<code class="descname">alternates</code><a class="headerlink" href="#git.repo.base.Repo.alternates" title="Permalink to this definition">¶</a></dt>
<dd><p>Retrieve a list of alternates paths or set a list paths to be used as alternates</p>
</dd></dl>

<dl class="method">
<dt id="git.repo.base.Repo.archive">
<code class="descname">archive</code><span class="sig-paren">(</span><em>ostream</em>, <em>treeish=None</em>, <em>prefix=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#git.repo.base.Repo.archive" title="Permalink to this definition">¶</a></dt>
<dd><p>Archive the tree at the given revision.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parm ostream:</th><td class="field-body"><p class="first">file compatible stream object to which the archive will be written as bytes</p>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Parm treeish:</th><td class="field-body"><p class="first">is the treeish name/id, defaults to active branch</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Parm prefix:</th><td class="field-body"><p class="first">is the optional prefix to prepend to each filename in the archive</p>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Parm kwargs:</th><td class="field-body"><p class="first">Additional arguments passed to git-archive</p>
<ul class="simple">
<li>Use the &#8216;format&#8217; argument to define the kind of format. Use
specialized ostreams to write any format supported by python.</li>
<li>You may specify the special <strong>path</strong> keyword, which may either be a repository-relative
path to a directory or file to place into the archive, or a list or tuple of multipe paths.</li>
</ul>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Raises:</th><td class="field-body"><p class="first"><strong>GitCommandError</strong> &#8211; in case something went wrong</p>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">self</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="attribute">
<dt id="git.repo.base.Repo.bare">
<code class="descname">bare</code><a class="headerlink" href="#git.repo.base.Repo.bare" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">True if the repository is bare</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="git.repo.base.Repo.blame">
<code class="descname">blame</code><span class="sig-paren">(</span><em>rev</em>, <em>file</em>, <em>incremental=False</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#git.repo.base.Repo.blame" title="Permalink to this definition">¶</a></dt>
<dd><p>The blame information for the given file at the given revision.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parm rev:</th><td class="field-body">revision specifier, see git-rev-parse for viable options.</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">list: [git.Commit, list: [&lt;line&gt;]]
A list of tuples associating a Commit object with a list of lines that
changed within the given commit. The Commit objects will be given in order
of appearance.</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="git.repo.base.Repo.blame_incremental">
<code class="descname">blame_incremental</code><span class="sig-paren">(</span><em>rev</em>, <em>file</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#git.repo.base.Repo.blame_incremental" title="Permalink to this definition">¶</a></dt>
<dd><p>Iterator for blame information for the given file at the given revision.</p>
<p>Unlike .blame(), this does not return the actual file&#8217;s contents, only
a stream of BlameEntry tuples.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parm rev:</th><td class="field-body">revision specifier, see git-rev-parse for viable options.</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">lazy iterator of BlameEntry tuples, where the commit
indicates the commit to blame for the line, and range
indicates a span of line numbers in the resulting file.</td>
</tr>
</tbody>
</table>
<p>If you combine all line number ranges outputted by this command, you
should get a continuous range spanning all line numbers in the file.</p>
</dd></dl>

<dl class="attribute">
<dt id="git.repo.base.Repo.branches">
<code class="descname">branches</code><a class="headerlink" href="#git.repo.base.Repo.branches" title="Permalink to this definition">¶</a></dt>
<dd><p>A list of <code class="docutils literal"><span class="pre">Head</span></code> objects representing the branch heads in
this repo</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><code class="docutils literal"><span class="pre">git.IterableList(Head,</span> <span class="pre">...)</span></code></td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="git.repo.base.Repo.clone">
<code class="descname">clone</code><span class="sig-paren">(</span><em>path</em>, <em>progress=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#git.repo.base.Repo.clone" title="Permalink to this definition">¶</a></dt>
<dd><p>Create a clone from this repository.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>path</strong> &#8211; is the full path of the new repo (traditionally ends with ./&lt;name&gt;.git).</li>
<li><strong>progress</strong> &#8211; See &#8216;git.remote.Remote.push&#8217;.</li>
<li><strong>kwargs</strong> &#8211; <ul>
<li>odbt = ObjectDatabase Type, allowing to determine the object database
implementation used by the returned Repo instance</li>
<li>All remaining keyword arguments are given to the git-clone command</li>
</ul>
</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last"><code class="docutils literal"><span class="pre">git.Repo</span></code> (the newly cloned repo)</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="classmethod">
<dt id="git.repo.base.Repo.clone_from">
<em class="property">classmethod </em><code class="descname">clone_from</code><span class="sig-paren">(</span><em>url</em>, <em>to_path</em>, <em>progress=None</em>, <em>env=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#git.repo.base.Repo.clone_from" title="Permalink to this definition">¶</a></dt>
<dd><p>Create a clone from the given URL</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>url</strong> &#8211; valid git url, see <a class="reference external" href="http://www.kernel.org/pub/software/scm/git/docs/git-clone.html#URLS">http://www.kernel.org/pub/software/scm/git/docs/git-clone.html#URLS</a></li>
<li><strong>to_path</strong> &#8211; Path to which the repository should be cloned to</li>
<li><strong>progress</strong> &#8211; See &#8216;git.remote.Remote.push&#8217;.</li>
<li><strong>env</strong> &#8211; Optional dictionary containing the desired environment variables.</li>
<li><strong>kwargs</strong> &#8211; see the <code class="docutils literal"><span class="pre">clone</span></code> method</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">Repo instance pointing to the cloned directory</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="git.repo.base.Repo.commit">
<code class="descname">commit</code><span class="sig-paren">(</span><em>rev=None</em><span class="sig-paren">)</span><a class="headerlink" href="#git.repo.base.Repo.commit" title="Permalink to this definition">¶</a></dt>
<dd><p>The Commit object for the specified revision
:param rev: revision specifier, see git-rev-parse for viable options.
:return: <code class="docutils literal"><span class="pre">git.Commit</span></code></p>
</dd></dl>

<dl class="attribute">
<dt id="git.repo.base.Repo.config_level">
<code class="descname">config_level</code><em class="property"> = ('system', 'user', 'global', 'repository')</em><a class="headerlink" href="#git.repo.base.Repo.config_level" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="git.repo.base.Repo.config_reader">
<code class="descname">config_reader</code><span class="sig-paren">(</span><em>config_level=None</em><span class="sig-paren">)</span><a class="headerlink" href="#git.repo.base.Repo.config_reader" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">GitConfigParser allowing to read the full git configuration, but not to write it<p>The configuration will include values from the system, user and repository
configuration files.</p>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Parameters:</th><td class="field-body"><strong>config_level</strong> &#8211; For possible values, see config_writer method
If None, all applicable levels will be used. Specify a level in case
you know which exact file you whish to read to prevent reading multiple files for
instance</td>
</tr>
<tr class="field-odd field"><th class="field-name">Note:</th><td class="field-body">On windows, system configuration cannot currently be read as the path is
unknown, instead the global path will be used.</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="git.repo.base.Repo.config_writer">
<code class="descname">config_writer</code><span class="sig-paren">(</span><em>config_level='repository'</em><span class="sig-paren">)</span><a class="headerlink" href="#git.repo.base.Repo.config_writer" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">GitConfigParser allowing to write values of the specified configuration file level.
Config writers should be retrieved, used to change the configuration, and written
right away as they will lock the configuration file in question and prevent other&#8217;s
to write it.</td>
</tr>
<tr class="field-even field"><th class="field-name">Parameters:</th><td class="field-body"><strong>config_level</strong> &#8211; One of the following values
system = sytem wide configuration file
global = user level configuration file
repository = configuration file for this repostory only</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="git.repo.base.Repo.create_head">
<code class="descname">create_head</code><span class="sig-paren">(</span><em>path</em>, <em>commit='HEAD'</em>, <em>force=False</em>, <em>logmsg=None</em><span class="sig-paren">)</span><a class="headerlink" href="#git.repo.base.Repo.create_head" title="Permalink to this definition">¶</a></dt>
<dd><p>Create a new head within the repository.
For more documentation, please see the Head.create method.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">newly created Head Reference</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="git.repo.base.Repo.create_remote">
<code class="descname">create_remote</code><span class="sig-paren">(</span><em>name</em>, <em>url</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#git.repo.base.Repo.create_remote" title="Permalink to this definition">¶</a></dt>
<dd><p>Create a new remote.</p>
<p>For more information, please see the documentation of the Remote.create
methods</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Remote reference</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="git.repo.base.Repo.create_submodule">
<code class="descname">create_submodule</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#git.repo.base.Repo.create_submodule" title="Permalink to this definition">¶</a></dt>
<dd><p>Create a new submodule</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Note:</th><td class="field-body">See the documentation of Submodule.add for a description of the
applicable parameters</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">created submodules</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="git.repo.base.Repo.create_tag">
<code class="descname">create_tag</code><span class="sig-paren">(</span><em>path</em>, <em>ref='HEAD'</em>, <em>message=None</em>, <em>force=False</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#git.repo.base.Repo.create_tag" title="Permalink to this definition">¶</a></dt>
<dd><p>Create a new tag reference.
For more documentation, please see the TagReference.create method.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">TagReference object</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="attribute">
<dt id="git.repo.base.Repo.daemon_export">
<code class="descname">daemon_export</code><a class="headerlink" href="#git.repo.base.Repo.daemon_export" title="Permalink to this definition">¶</a></dt>
<dd><p>If True, git-daemon may export this repository</p>
</dd></dl>

<dl class="method">
<dt id="git.repo.base.Repo.delete_head">
<code class="descname">delete_head</code><span class="sig-paren">(</span><em>*heads</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#git.repo.base.Repo.delete_head" title="Permalink to this definition">¶</a></dt>
<dd><p>Delete the given heads</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>kwargs</strong> &#8211; Additional keyword arguments to be passed to git-branch</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="git.repo.base.Repo.delete_remote">
<code class="descname">delete_remote</code><span class="sig-paren">(</span><em>remote</em><span class="sig-paren">)</span><a class="headerlink" href="#git.repo.base.Repo.delete_remote" title="Permalink to this definition">¶</a></dt>
<dd><p>Delete the given remote.</p>
</dd></dl>

<dl class="method">
<dt id="git.repo.base.Repo.delete_tag">
<code class="descname">delete_tag</code><span class="sig-paren">(</span><em>*tags</em><span class="sig-paren">)</span><a class="headerlink" href="#git.repo.base.Repo.delete_tag" title="Permalink to this definition">¶</a></dt>
<dd><p>Delete the given tag references</p>
</dd></dl>

<dl class="attribute">
<dt id="git.repo.base.Repo.description">
<code class="descname">description</code><a class="headerlink" href="#git.repo.base.Repo.description" title="Permalink to this definition">¶</a></dt>
<dd><p>the project&#8217;s description</p>
</dd></dl>

<dl class="method">
<dt id="git.repo.base.Repo.has_separate_working_tree">
<code class="descname">has_separate_working_tree</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.repo.base.Repo.has_separate_working_tree" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">True if our git_dir is not at the root of our working_tree_dir, but a .git file with a
platform agnositic symbolic link. Our git_dir will be whereever the .git file points to</td>
</tr>
<tr class="field-even field"><th class="field-name">Note:</th><td class="field-body">bare repositories will always return False here</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="attribute">
<dt id="git.repo.base.Repo.head">
<code class="descname">head</code><a class="headerlink" href="#git.repo.base.Repo.head" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">HEAD Object pointing to the current head reference</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="attribute">
<dt id="git.repo.base.Repo.heads">
<code class="descname">heads</code><a class="headerlink" href="#git.repo.base.Repo.heads" title="Permalink to this definition">¶</a></dt>
<dd><p>A list of <code class="docutils literal"><span class="pre">Head</span></code> objects representing the branch heads in
this repo</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><code class="docutils literal"><span class="pre">git.IterableList(Head,</span> <span class="pre">...)</span></code></td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="attribute">
<dt id="git.repo.base.Repo.index">
<code class="descname">index</code><a class="headerlink" href="#git.repo.base.Repo.index" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">IndexFile representing this repository&#8217;s index.</td>
</tr>
<tr class="field-even field"><th class="field-name">Note:</th><td class="field-body">This property can be expensive, as the returned <code class="docutils literal"><span class="pre">IndexFile</span></code> will be
reinitialized. It&#8217;s recommended to re-use the object.</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="classmethod">
<dt id="git.repo.base.Repo.init">
<em class="property">classmethod </em><code class="descname">init</code><span class="sig-paren">(</span><em>path=None</em>, <em>mkdir=True</em>, <em>odbt=&lt;class 'git.db.GitCmdObjectDB'&gt;</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#git.repo.base.Repo.init" title="Permalink to this definition">¶</a></dt>
<dd><p>Initialize a git repository at the given path if specified</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>path</strong> &#8211; is the full path to the repo (traditionally ends with /&lt;name&gt;.git)
or None in which case the repository will be created in the current
working directory</li>
<li><strong>odbt</strong> &#8211; Object DataBase type - a type which is constructed by providing
the directory containing the database objects, i.e. .git/objects.
It will be used to access all object data</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Parm mkdir:</th><td class="field-body"><p class="first">if specified will create the repository directory if it doesn&#8217;t
already exists. Creates the directory with a mode=0755.
Only effective if a path is explicitly given</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Parm kwargs:</th><td class="field-body"><p class="first">keyword arguments serving as additional options to the git-init command</p>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last"><code class="docutils literal"><span class="pre">git.Repo</span></code> (the newly created repo)</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="git.repo.base.Repo.is_ancestor">
<code class="descname">is_ancestor</code><span class="sig-paren">(</span><em>ancestor_rev</em>, <em>rev</em><span class="sig-paren">)</span><a class="headerlink" href="#git.repo.base.Repo.is_ancestor" title="Permalink to this definition">¶</a></dt>
<dd><p>Check if a commit  is an ancestor of another</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>ancestor_rev</strong> &#8211; Rev which should be an ancestor</li>
<li><strong>rev</strong> &#8211; Rev to test against ancestor_rev</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last"><code class="docutils literal"><span class="pre">True</span></code>, ancestor_rev is an accestor to rev.</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="git.repo.base.Repo.is_dirty">
<code class="descname">is_dirty</code><span class="sig-paren">(</span><em>index=True</em>, <em>working_tree=True</em>, <em>untracked_files=False</em>, <em>submodules=True</em>, <em>path=None</em><span class="sig-paren">)</span><a class="headerlink" href="#git.repo.base.Repo.is_dirty" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><code class="docutils literal"><span class="pre">True</span></code>, the repository is considered dirty. By default it will react
like a git-status without untracked files, hence it is dirty if the
index or the working copy have changes.</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="git.repo.base.Repo.iter_commits">
<code class="descname">iter_commits</code><span class="sig-paren">(</span><em>rev=None</em>, <em>paths=''</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#git.repo.base.Repo.iter_commits" title="Permalink to this definition">¶</a></dt>
<dd><p>A list of Commit objects representing the history of a given ref/commit</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parm rev:</th><td class="field-body">revision specifier, see git-rev-parse for viable options.
If None, the active branch will be used.</td>
</tr>
<tr class="field-even field"><th class="field-name">Parm paths:</th><td class="field-body">is an optional path or a list of paths to limit the returned commits to
Commits that do not contain that path or the paths will not be returned.</td>
</tr>
<tr class="field-odd field"><th class="field-name">Parm kwargs:</th><td class="field-body">Arguments to be passed to git-rev-list - common ones are
max_count and skip</td>
</tr>
<tr class="field-even field"><th class="field-name">Note:</th><td class="field-body">to receive only commits between two named revisions, use the
&#8220;revA...revB&#8221; revision specifier</td>
</tr>
</tbody>
</table>
<p>:return <code class="docutils literal"><span class="pre">git.Commit[]</span></code></p>
</dd></dl>

<dl class="method">
<dt id="git.repo.base.Repo.iter_submodules">
<code class="descname">iter_submodules</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#git.repo.base.Repo.iter_submodules" title="Permalink to this definition">¶</a></dt>
<dd><p>An iterator yielding Submodule instances, see Traversable interface
for a description of args and kwargs
:return: Iterator</p>
</dd></dl>

<dl class="method">
<dt id="git.repo.base.Repo.iter_trees">
<code class="descname">iter_trees</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#git.repo.base.Repo.iter_trees" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Iterator yielding Tree objects</td>
</tr>
<tr class="field-even field"><th class="field-name">Note:</th><td class="field-body">Takes all arguments known to iter_commits method</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="git.repo.base.Repo.merge_base">
<code class="descname">merge_base</code><span class="sig-paren">(</span><em>*rev</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#git.repo.base.Repo.merge_base" title="Permalink to this definition">¶</a></dt>
<dd><p>Find the closest common ancestor for the given revision (e.g. Commits, Tags, References, etc)</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>rev</strong> &#8211; At least two revs to find the common ancestor for.</li>
<li><strong>kwargs</strong> &#8211; Additional arguments to be passed to the repo.git.merge_base() command which does all the work.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">A list of Commit objects. If &#8211;all was not specified as kwarg, the list will have at max one Commit,
or is empty if no common merge base exists.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><strong>ValueError</strong> &#8211; If not at least two revs are provided</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="attribute">
<dt id="git.repo.base.Repo.re_author_committer_start">
<code class="descname">re_author_committer_start</code><em class="property"> = &lt;_sre.SRE_Pattern object&gt;</em><a class="headerlink" href="#git.repo.base.Repo.re_author_committer_start" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.repo.base.Repo.re_hexsha_only">
<code class="descname">re_hexsha_only</code><em class="property"> = &lt;_sre.SRE_Pattern object&gt;</em><a class="headerlink" href="#git.repo.base.Repo.re_hexsha_only" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.repo.base.Repo.re_hexsha_shortened">
<code class="descname">re_hexsha_shortened</code><em class="property"> = &lt;_sre.SRE_Pattern object&gt;</em><a class="headerlink" href="#git.repo.base.Repo.re_hexsha_shortened" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.repo.base.Repo.re_tab_full_line">
<code class="descname">re_tab_full_line</code><em class="property"> = &lt;_sre.SRE_Pattern object&gt;</em><a class="headerlink" href="#git.repo.base.Repo.re_tab_full_line" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.repo.base.Repo.re_whitespace">
<code class="descname">re_whitespace</code><em class="property"> = &lt;_sre.SRE_Pattern object&gt;</em><a class="headerlink" href="#git.repo.base.Repo.re_whitespace" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.repo.base.Repo.references">
<code class="descname">references</code><a class="headerlink" href="#git.repo.base.Repo.references" title="Permalink to this definition">¶</a></dt>
<dd><p>A list of Reference objects representing tags, heads and remote references.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">IterableList(Reference, ...)</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="attribute">
<dt id="git.repo.base.Repo.refs">
<code class="descname">refs</code><a class="headerlink" href="#git.repo.base.Repo.refs" title="Permalink to this definition">¶</a></dt>
<dd><p>A list of Reference objects representing tags, heads and remote references.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">IterableList(Reference, ...)</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="git.repo.base.Repo.remote">
<code class="descname">remote</code><span class="sig-paren">(</span><em>name='origin'</em><span class="sig-paren">)</span><a class="headerlink" href="#git.repo.base.Repo.remote" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Remote with the specified name</td>
</tr>
<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><strong>ValueError</strong> &#8211; if no remote with such a name exists</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="attribute">
<dt id="git.repo.base.Repo.remotes">
<code class="descname">remotes</code><a class="headerlink" href="#git.repo.base.Repo.remotes" title="Permalink to this definition">¶</a></dt>
<dd><p>A list of Remote objects allowing to access and manipulate remotes
:return: <code class="docutils literal"><span class="pre">git.IterableList(Remote,</span> <span class="pre">...)</span></code></p>
</dd></dl>

<dl class="method">
<dt id="git.repo.base.Repo.rev_parse">
<code class="descname">rev_parse</code><span class="sig-paren">(</span><em>repo</em>, <em>rev</em><span class="sig-paren">)</span><a class="headerlink" href="#git.repo.base.Repo.rev_parse" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">Object at the given revision, either Commit, Tag, Tree or Blob</p>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Parameters:</th><td class="field-body"><p class="first"><strong>rev</strong> &#8211; git-rev-parse compatible revision specification as string, please see
<a class="reference external" href="http://www.kernel.org/pub/software/scm/git/docs/git-rev-parse.html">http://www.kernel.org/pub/software/scm/git/docs/git-rev-parse.html</a>
for details</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Raises:</th><td class="field-body"><ul class="first last simple">
<li><strong>BadObject</strong> &#8211; if the given revision could not be found</li>
<li><strong>ValueError</strong> &#8211; If rev couldn&#8217;t be parsed</li>
<li><strong>IndexError</strong> &#8211; If invalid reflog index is specified</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="git.repo.base.Repo.submodule">
<code class="descname">submodule</code><span class="sig-paren">(</span><em>name</em><span class="sig-paren">)</span><a class="headerlink" href="#git.repo.base.Repo.submodule" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Submodule with the given name</td>
</tr>
<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><strong>ValueError</strong> &#8211; If no such submodule exists</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="git.repo.base.Repo.submodule_update">
<code class="descname">submodule_update</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#git.repo.base.Repo.submodule_update" title="Permalink to this definition">¶</a></dt>
<dd><p>Update the submodules, keeping the repository consistent as it will
take the previous state into consideration. For more information, please
see the documentation of RootModule.update</p>
</dd></dl>

<dl class="attribute">
<dt id="git.repo.base.Repo.submodules">
<code class="descname">submodules</code><a class="headerlink" href="#git.repo.base.Repo.submodules" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">git.IterableList(Submodule, ...) of direct submodules
available from the current head</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="git.repo.base.Repo.tag">
<code class="descname">tag</code><span class="sig-paren">(</span><em>path</em><span class="sig-paren">)</span><a class="headerlink" href="#git.repo.base.Repo.tag" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">TagReference Object, reference pointing to a Commit or Tag</td>
</tr>
<tr class="field-even field"><th class="field-name">Parameters:</th><td class="field-body"><strong>path</strong> &#8211; path to the tag reference, i.e. 0.1.5 or tags/0.1.5</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="attribute">
<dt id="git.repo.base.Repo.tags">
<code class="descname">tags</code><a class="headerlink" href="#git.repo.base.Repo.tags" title="Permalink to this definition">¶</a></dt>
<dd><p>A list of <code class="docutils literal"><span class="pre">Tag</span></code> objects that are available in this repo
:return: <code class="docutils literal"><span class="pre">git.IterableList(TagReference,</span> <span class="pre">...)</span></code></p>
</dd></dl>

<dl class="method">
<dt id="git.repo.base.Repo.tree">
<code class="descname">tree</code><span class="sig-paren">(</span><em>rev=None</em><span class="sig-paren">)</span><a class="headerlink" href="#git.repo.base.Repo.tree" title="Permalink to this definition">¶</a></dt>
<dd><p>The Tree object for the given treeish revision
Examples:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">repo</span><span class="o">.</span><span class="n">tree</span><span class="p">(</span><span class="n">repo</span><span class="o">.</span><span class="n">heads</span><span class="p">[</span><span class="mi">0</span><span class="p">])</span>
</pre></div>
</div>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>rev</strong> &#8211; is a revision pointing to a Treeish ( being a commit or tree )</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><code class="docutils literal"><span class="pre">git.Tree</span></code></td>
</tr>
<tr class="field-odd field"><th class="field-name">Note:</th><td class="field-body">If you need a non-root level tree, find it by iterating the root tree. Otherwise
it cannot know about its path relative to the repository root and subsequent
operations might have unexpected results.</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="attribute">
<dt id="git.repo.base.Repo.untracked_files">
<code class="descname">untracked_files</code><a class="headerlink" href="#git.repo.base.Repo.untracked_files" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">list(str,...)<p>Files currently untracked as they have not been staged yet. Paths
are relative to the current working directory of the git command.</p>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Note:</th><td class="field-body">ignored files will not appear here, i.e. files mentioned in .gitignore</td>
</tr>
<tr class="field-odd field"><th class="field-name">Note:</th><td class="field-body">This property is expensive, as no cache is involved. To process the result, please
consider caching it yourself.</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="attribute">
<dt id="git.repo.base.Repo.working_tree_dir">
<code class="descname">working_tree_dir</code><a class="headerlink" href="#git.repo.base.Repo.working_tree_dir" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">The working tree directory of our git repository. If this is a bare repository, None is returned.</td>
</tr>
</tbody>
</table>
</dd></dl>

</dd></dl>

</div>
<div class="section" id="module-git.repo.fun">
<span id="repo-functions"></span><h2>Repo.Functions<a class="headerlink" href="#module-git.repo.fun" title="Permalink to this headline">¶</a></h2>
<p>Package with general repository related functions</p>
<dl class="function">
<dt id="git.repo.fun.rev_parse">
<code class="descclassname">git.repo.fun.</code><code class="descname">rev_parse</code><span class="sig-paren">(</span><em>repo</em>, <em>rev</em><span class="sig-paren">)</span><a class="headerlink" href="#git.repo.fun.rev_parse" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">Object at the given revision, either Commit, Tag, Tree or Blob</p>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Parameters:</th><td class="field-body"><p class="first"><strong>rev</strong> &#8211; git-rev-parse compatible revision specification as string, please see
<a class="reference external" href="http://www.kernel.org/pub/software/scm/git/docs/git-rev-parse.html">http://www.kernel.org/pub/software/scm/git/docs/git-rev-parse.html</a>
for details</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Raises:</th><td class="field-body"><ul class="first last simple">
<li><strong>BadObject</strong> &#8211; if the given revision could not be found</li>
<li><strong>ValueError</strong> &#8211; If rev couldn&#8217;t be parsed</li>
<li><strong>IndexError</strong> &#8211; If invalid reflog index is specified</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="function">
<dt id="git.repo.fun.is_git_dir">
<code class="descclassname">git.repo.fun.</code><code class="descname">is_git_dir</code><span class="sig-paren">(</span><em>d</em><span class="sig-paren">)</span><a class="headerlink" href="#git.repo.fun.is_git_dir" title="Permalink to this definition">¶</a></dt>
<dd><p>This is taken from the git setup.c:is_git_directory
function.</p>
<dl class="docutils">
<dt>&#64;throws WorkTreeRepositoryUnsupported if it sees a worktree directory. It&#8217;s quite hacky to do that here,</dt>
<dd>but at least clearly indicates that we don&#8217;t support it.
There is the unlikely danger to throw if we see directories which just look like a worktree dir,
but are none.</dd>
</dl>
</dd></dl>

<dl class="function">
<dt id="git.repo.fun.touch">
<code class="descclassname">git.repo.fun.</code><code class="descname">touch</code><span class="sig-paren">(</span><em>filename</em><span class="sig-paren">)</span><a class="headerlink" href="#git.repo.fun.touch" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="function">
<dt id="git.repo.fun.find_git_dir">
<code class="descclassname">git.repo.fun.</code><code class="descname">find_git_dir</code><span class="sig-paren">(</span><em>d</em><span class="sig-paren">)</span><a class="headerlink" href="#git.repo.fun.find_git_dir" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="function">
<dt id="git.repo.fun.name_to_object">
<code class="descclassname">git.repo.fun.</code><code class="descname">name_to_object</code><span class="sig-paren">(</span><em>repo</em>, <em>name</em>, <em>return_ref=False</em><span class="sig-paren">)</span><a class="headerlink" href="#git.repo.fun.name_to_object" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">object specified by the given name, hexshas ( short and long )
as well as references are supported</td>
</tr>
<tr class="field-even field"><th class="field-name">Parameters:</th><td class="field-body"><strong>return_ref</strong> &#8211; if name specifies a reference, we will return the reference
instead of the object. Otherwise it will raise BadObject or BadName</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="function">
<dt id="git.repo.fun.short_to_long">
<code class="descclassname">git.repo.fun.</code><code class="descname">short_to_long</code><span class="sig-paren">(</span><em>odb</em>, <em>hexsha</em><span class="sig-paren">)</span><a class="headerlink" href="#git.repo.fun.short_to_long" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">long hexadecimal sha1 from the given less-than-40 byte hexsha
or None if no candidate could be found.</td>
</tr>
<tr class="field-even field"><th class="field-name">Parameters:</th><td class="field-body"><strong>hexsha</strong> &#8211; hexsha with less than 40 byte</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="function">
<dt id="git.repo.fun.deref_tag">
<code class="descclassname">git.repo.fun.</code><code class="descname">deref_tag</code><span class="sig-paren">(</span><em>tag</em><span class="sig-paren">)</span><a class="headerlink" href="#git.repo.fun.deref_tag" title="Permalink to this definition">¶</a></dt>
<dd><p>Recursively dereference a tag and return the resulting object</p>
</dd></dl>

<dl class="function">
<dt id="git.repo.fun.to_commit">
<code class="descclassname">git.repo.fun.</code><code class="descname">to_commit</code><span class="sig-paren">(</span><em>obj</em><span class="sig-paren">)</span><a class="headerlink" href="#git.repo.fun.to_commit" title="Permalink to this definition">¶</a></dt>
<dd><p>Convert the given object to a commit if possible and return it</p>
</dd></dl>

</div>
<div class="section" id="util">
<h2>Util<a class="headerlink" href="#util" title="Permalink to this headline">¶</a></h2>
<span class="target" id="module-git.util"></span><dl class="function">
<dt id="git.util.stream_copy">
<code class="descclassname">git.util.</code><code class="descname">stream_copy</code><span class="sig-paren">(</span><em>source</em>, <em>destination</em>, <em>chunk_size=524288</em><span class="sig-paren">)</span><a class="headerlink" href="#git.util.stream_copy" title="Permalink to this definition">¶</a></dt>
<dd><p>Copy all data from the source stream into the destination stream in chunks
of size chunk_size</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">amount of bytes written</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="function">
<dt id="git.util.join_path">
<code class="descclassname">git.util.</code><code class="descname">join_path</code><span class="sig-paren">(</span><em>a</em>, <em>*p</em><span class="sig-paren">)</span><a class="headerlink" href="#git.util.join_path" title="Permalink to this definition">¶</a></dt>
<dd><p>Join path tokens together similar to os.path.join, but always use
&#8216;/&#8217; instead of possibly &#8216;&#8217; on windows.</p>
</dd></dl>

<dl class="function">
<dt id="git.util.to_native_path_linux">
<code class="descclassname">git.util.</code><code class="descname">to_native_path_linux</code><span class="sig-paren">(</span><em>path</em><span class="sig-paren">)</span><a class="headerlink" href="#git.util.to_native_path_linux" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="function">
<dt id="git.util.join_path_native">
<code class="descclassname">git.util.</code><code class="descname">join_path_native</code><span class="sig-paren">(</span><em>a</em>, <em>*p</em><span class="sig-paren">)</span><a class="headerlink" href="#git.util.join_path_native" title="Permalink to this definition">¶</a></dt>
<dd><dl class="docutils">
<dt>As join path, but makes sure an OS native path is returned. This is only</dt>
<dd>needed to play it safe on my dear windows and to assure nice paths that only
use &#8216;&#8217;</dd>
</dl>
</dd></dl>

<dl class="class">
<dt id="git.util.Stats">
<em class="property">class </em><code class="descclassname">git.util.</code><code class="descname">Stats</code><span class="sig-paren">(</span><em>total</em>, <em>files</em><span class="sig-paren">)</span><a class="headerlink" href="#git.util.Stats" title="Permalink to this definition">¶</a></dt>
<dd><p>Represents stat information as presented by git at the end of a merge. It is
created from the output of a diff operation.</p>
<p><code class="docutils literal"><span class="pre">Example</span></code>:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">c</span> <span class="o">=</span> <span class="n">Commit</span><span class="p">(</span> <span class="n">sha1</span> <span class="p">)</span>
<span class="n">s</span> <span class="o">=</span> <span class="n">c</span><span class="o">.</span><span class="n">stats</span>
<span class="n">s</span><span class="o">.</span><span class="n">total</span>         <span class="c1"># full-stat-dict</span>
<span class="n">s</span><span class="o">.</span><span class="n">files</span>         <span class="c1"># dict( filepath : stat-dict )</span>
</pre></div>
</div>
<p><code class="docutils literal"><span class="pre">stat-dict</span></code></p>
<p>A dictionary with the following keys and values:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">deletions</span> <span class="o">=</span> <span class="n">number</span> <span class="n">of</span> <span class="n">deleted</span> <span class="n">lines</span> <span class="k">as</span> <span class="nb">int</span>
<span class="n">insertions</span> <span class="o">=</span> <span class="n">number</span> <span class="n">of</span> <span class="n">inserted</span> <span class="n">lines</span> <span class="k">as</span> <span class="nb">int</span>
<span class="n">lines</span> <span class="o">=</span> <span class="n">total</span> <span class="n">number</span> <span class="n">of</span> <span class="n">lines</span> <span class="n">changed</span> <span class="k">as</span> <span class="nb">int</span><span class="p">,</span> <span class="ow">or</span> <span class="n">deletions</span> <span class="o">+</span> <span class="n">insertions</span>
</pre></div>
</div>
<p><code class="docutils literal"><span class="pre">full-stat-dict</span></code></p>
<p>In addition to the items in the stat-dict, it features additional information:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">files</span> <span class="o">=</span> <span class="n">number</span> <span class="n">of</span> <span class="n">changed</span> <span class="n">files</span> <span class="k">as</span> <span class="nb">int</span>
</pre></div>
</div>
<dl class="method">
<dt id="git.util.Stats.__init__">
<code class="descname">__init__</code><span class="sig-paren">(</span><em>total</em>, <em>files</em><span class="sig-paren">)</span><a class="headerlink" href="#git.util.Stats.__init__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.util.Stats.__module__">
<code class="descname">__module__</code><em class="property"> = 'git.util'</em><a class="headerlink" href="#git.util.Stats.__module__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.util.Stats.__slots__">
<code class="descname">__slots__</code><em class="property"> = ('total', 'files')</em><a class="headerlink" href="#git.util.Stats.__slots__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.util.Stats.files">
<code class="descname">files</code><a class="headerlink" href="#git.util.Stats.files" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.util.Stats.total">
<code class="descname">total</code><a class="headerlink" href="#git.util.Stats.total" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="class">
<dt id="git.util.IndexFileSHA1Writer">
<em class="property">class </em><code class="descclassname">git.util.</code><code class="descname">IndexFileSHA1Writer</code><span class="sig-paren">(</span><em>f</em><span class="sig-paren">)</span><a class="headerlink" href="#git.util.IndexFileSHA1Writer" title="Permalink to this definition">¶</a></dt>
<dd><p>Wrapper around a file-like object that remembers the SHA1 of
the data written to it. It will write a sha when the stream is closed
or if the asked for explicitly usign write_sha.</p>
<p>Only useful to the indexfile</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Note:</th><td class="field-body">Based on the dulwich project</td>
</tr>
</tbody>
</table>
<dl class="method">
<dt id="git.util.IndexFileSHA1Writer.__init__">
<code class="descname">__init__</code><span class="sig-paren">(</span><em>f</em><span class="sig-paren">)</span><a class="headerlink" href="#git.util.IndexFileSHA1Writer.__init__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.util.IndexFileSHA1Writer.__module__">
<code class="descname">__module__</code><em class="property"> = 'git.util'</em><a class="headerlink" href="#git.util.IndexFileSHA1Writer.__module__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.util.IndexFileSHA1Writer.__slots__">
<code class="descname">__slots__</code><em class="property"> = ('f', 'sha1')</em><a class="headerlink" href="#git.util.IndexFileSHA1Writer.__slots__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="git.util.IndexFileSHA1Writer.close">
<code class="descname">close</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.util.IndexFileSHA1Writer.close" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.util.IndexFileSHA1Writer.f">
<code class="descname">f</code><a class="headerlink" href="#git.util.IndexFileSHA1Writer.f" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.util.IndexFileSHA1Writer.sha1">
<code class="descname">sha1</code><a class="headerlink" href="#git.util.IndexFileSHA1Writer.sha1" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="git.util.IndexFileSHA1Writer.tell">
<code class="descname">tell</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.util.IndexFileSHA1Writer.tell" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="git.util.IndexFileSHA1Writer.write">
<code class="descname">write</code><span class="sig-paren">(</span><em>data</em><span class="sig-paren">)</span><a class="headerlink" href="#git.util.IndexFileSHA1Writer.write" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="git.util.IndexFileSHA1Writer.write_sha">
<code class="descname">write_sha</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.util.IndexFileSHA1Writer.write_sha" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="class">
<dt id="git.util.Iterable">
<em class="property">class </em><code class="descclassname">git.util.</code><code class="descname">Iterable</code><a class="headerlink" href="#git.util.Iterable" title="Permalink to this definition">¶</a></dt>
<dd><p>Defines an interface for iterable items which is to assure a uniform
way to retrieve and iterate items within the git repository</p>
<dl class="attribute">
<dt id="git.util.Iterable.__module__">
<code class="descname">__module__</code><em class="property"> = 'git.util'</em><a class="headerlink" href="#git.util.Iterable.__module__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.util.Iterable.__slots__">
<code class="descname">__slots__</code><em class="property"> = ()</em><a class="headerlink" href="#git.util.Iterable.__slots__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="classmethod">
<dt id="git.util.Iterable.iter_items">
<em class="property">classmethod </em><code class="descname">iter_items</code><span class="sig-paren">(</span><em>repo</em>, <em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#git.util.Iterable.iter_items" title="Permalink to this definition">¶</a></dt>
<dd><p>For more information about the arguments, see list_items
:return:  iterator yielding Items</p>
</dd></dl>

<dl class="classmethod">
<dt id="git.util.Iterable.list_items">
<em class="property">classmethod </em><code class="descname">list_items</code><span class="sig-paren">(</span><em>repo</em>, <em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#git.util.Iterable.list_items" title="Permalink to this definition">¶</a></dt>
<dd><p>Find all items of this type - subclasses can specify args and kwargs differently.
If no args are given, subclasses are obliged to return all items if no additional
arguments arg given.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Note:</th><td class="field-body">Favor the iter_items method as it will</td>
</tr>
</tbody>
</table>
<p>:return:list(Item,...) list of item instances</p>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="git.util.IterableList">
<em class="property">class </em><code class="descclassname">git.util.</code><code class="descname">IterableList</code><span class="sig-paren">(</span><em>id_attr</em>, <em>prefix=''</em><span class="sig-paren">)</span><a class="headerlink" href="#git.util.IterableList" title="Permalink to this definition">¶</a></dt>
<dd><p>List of iterable objects allowing to query an object by id or by named index:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">heads</span> <span class="o">=</span> <span class="n">repo</span><span class="o">.</span><span class="n">heads</span>
<span class="n">heads</span><span class="o">.</span><span class="n">master</span>
<span class="n">heads</span><span class="p">[</span><span class="s1">&#39;master&#39;</span><span class="p">]</span>
<span class="n">heads</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span>
</pre></div>
</div>
<p>It requires an id_attribute name to be set which will be queried from its
contained items to have a means for comparison.</p>
<p>A prefix can be specified which is to be used in case the id returned by the
items always contains a prefix that does not matter to the user, so it
can be left out.</p>
<dl class="method">
<dt id="git.util.IterableList.__contains__">
<code class="descname">__contains__</code><span class="sig-paren">(</span><em>attr</em><span class="sig-paren">)</span><a class="headerlink" href="#git.util.IterableList.__contains__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="git.util.IterableList.__delitem__">
<code class="descname">__delitem__</code><span class="sig-paren">(</span><em>index</em><span class="sig-paren">)</span><a class="headerlink" href="#git.util.IterableList.__delitem__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="git.util.IterableList.__getattr__">
<code class="descname">__getattr__</code><span class="sig-paren">(</span><em>attr</em><span class="sig-paren">)</span><a class="headerlink" href="#git.util.IterableList.__getattr__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="git.util.IterableList.__getitem__">
<code class="descname">__getitem__</code><span class="sig-paren">(</span><em>index</em><span class="sig-paren">)</span><a class="headerlink" href="#git.util.IterableList.__getitem__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="git.util.IterableList.__init__">
<code class="descname">__init__</code><span class="sig-paren">(</span><em>id_attr</em>, <em>prefix=''</em><span class="sig-paren">)</span><a class="headerlink" href="#git.util.IterableList.__init__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.util.IterableList.__module__">
<code class="descname">__module__</code><em class="property"> = 'git.util'</em><a class="headerlink" href="#git.util.IterableList.__module__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="staticmethod">
<dt id="git.util.IterableList.__new__">
<em class="property">static </em><code class="descname">__new__</code><span class="sig-paren">(</span><em>id_attr</em>, <em>prefix=''</em><span class="sig-paren">)</span><a class="headerlink" href="#git.util.IterableList.__new__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.util.IterableList.__slots__">
<code class="descname">__slots__</code><em class="property"> = ('_id_attr', '_prefix')</em><a class="headerlink" href="#git.util.IterableList.__slots__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="class">
<dt id="git.util.BlockingLockFile">
<em class="property">class </em><code class="descclassname">git.util.</code><code class="descname">BlockingLockFile</code><span class="sig-paren">(</span><em>file_path</em>, <em>check_interval_s=0.3</em>, <em>max_block_time_s=9223372036854775807</em><span class="sig-paren">)</span><a class="headerlink" href="#git.util.BlockingLockFile" title="Permalink to this definition">¶</a></dt>
<dd><p>The lock file will block until a lock could be obtained, or fail after
a specified timeout.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Note:</th><td class="field-body">If the directory containing the lock was removed, an exception will
be raised during the blocking period, preventing hangs as the lock
can never be obtained.</td>
</tr>
</tbody>
</table>
<dl class="method">
<dt id="git.util.BlockingLockFile.__init__">
<code class="descname">__init__</code><span class="sig-paren">(</span><em>file_path</em>, <em>check_interval_s=0.3</em>, <em>max_block_time_s=9223372036854775807</em><span class="sig-paren">)</span><a class="headerlink" href="#git.util.BlockingLockFile.__init__" title="Permalink to this definition">¶</a></dt>
<dd><p>Configure the instance</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name" colspan="2">Parm check_interval_s:</th></tr>
<tr class="field-odd field"><td>&nbsp;</td><td class="field-body">Period of time to sleep until the lock is checked the next time.
By default, it waits a nearly unlimited time</td>
</tr>
<tr class="field-even field"><th class="field-name" colspan="2">Parm max_block_time_s:</th></tr>
<tr class="field-even field"><td>&nbsp;</td><td class="field-body">Maximum amount of seconds we may lock</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="attribute">
<dt id="git.util.BlockingLockFile.__module__">
<code class="descname">__module__</code><em class="property"> = 'git.util'</em><a class="headerlink" href="#git.util.BlockingLockFile.__module__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.util.BlockingLockFile.__slots__">
<code class="descname">__slots__</code><em class="property"> = ('_check_interval', '_max_block_time')</em><a class="headerlink" href="#git.util.BlockingLockFile.__slots__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="class">
<dt id="git.util.LockFile">
<em class="property">class </em><code class="descclassname">git.util.</code><code class="descname">LockFile</code><span class="sig-paren">(</span><em>file_path</em><span class="sig-paren">)</span><a class="headerlink" href="#git.util.LockFile" title="Permalink to this definition">¶</a></dt>
<dd><p>Provides methods to obtain, check for, and release a file based lock which
should be used to handle concurrent access to the same file.</p>
<p>As we are a utility class to be derived from, we only use protected methods.</p>
<p>Locks will automatically be released on destruction</p>
<dl class="method">
<dt id="git.util.LockFile.__del__">
<code class="descname">__del__</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.util.LockFile.__del__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="git.util.LockFile.__init__">
<code class="descname">__init__</code><span class="sig-paren">(</span><em>file_path</em><span class="sig-paren">)</span><a class="headerlink" href="#git.util.LockFile.__init__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.util.LockFile.__module__">
<code class="descname">__module__</code><em class="property"> = 'git.util'</em><a class="headerlink" href="#git.util.LockFile.__module__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.util.LockFile.__slots__">
<code class="descname">__slots__</code><em class="property"> = ('_file_path', '_owns_lock')</em><a class="headerlink" href="#git.util.LockFile.__slots__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="class">
<dt id="git.util.Actor">
<em class="property">class </em><code class="descclassname">git.util.</code><code class="descname">Actor</code><span class="sig-paren">(</span><em>name</em>, <em>email</em><span class="sig-paren">)</span><a class="headerlink" href="#git.util.Actor" title="Permalink to this definition">¶</a></dt>
<dd><p>Actors hold information about a person acting on the repository. They
can be committers and authors or anything with a name and an email as
mentioned in the git log entries.</p>
<dl class="method">
<dt id="git.util.Actor.__eq__">
<code class="descname">__eq__</code><span class="sig-paren">(</span><em>other</em><span class="sig-paren">)</span><a class="headerlink" href="#git.util.Actor.__eq__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="git.util.Actor.__hash__">
<code class="descname">__hash__</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.util.Actor.__hash__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="git.util.Actor.__init__">
<code class="descname">__init__</code><span class="sig-paren">(</span><em>name</em>, <em>email</em><span class="sig-paren">)</span><a class="headerlink" href="#git.util.Actor.__init__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.util.Actor.__module__">
<code class="descname">__module__</code><em class="property"> = 'git.util'</em><a class="headerlink" href="#git.util.Actor.__module__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="git.util.Actor.__ne__">
<code class="descname">__ne__</code><span class="sig-paren">(</span><em>other</em><span class="sig-paren">)</span><a class="headerlink" href="#git.util.Actor.__ne__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="git.util.Actor.__repr__">
<code class="descname">__repr__</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.util.Actor.__repr__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.util.Actor.__slots__">
<code class="descname">__slots__</code><em class="property"> = ('name', 'email')</em><a class="headerlink" href="#git.util.Actor.__slots__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="git.util.Actor.__str__">
<code class="descname">__str__</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.util.Actor.__str__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="classmethod">
<dt id="git.util.Actor.author">
<em class="property">classmethod </em><code class="descname">author</code><span class="sig-paren">(</span><em>config_reader=None</em><span class="sig-paren">)</span><a class="headerlink" href="#git.util.Actor.author" title="Permalink to this definition">¶</a></dt>
<dd><p>Same as committer(), but defines the main author. It may be specified in the environment,
but defaults to the committer</p>
</dd></dl>

<dl class="classmethod">
<dt id="git.util.Actor.committer">
<em class="property">classmethod </em><code class="descname">committer</code><span class="sig-paren">(</span><em>config_reader=None</em><span class="sig-paren">)</span><a class="headerlink" href="#git.util.Actor.committer" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Actor instance corresponding to the configured committer. It behaves
similar to the git implementation, such that the environment will override
configuration values of config_reader. If no value is set at all, it will be
generated</td>
</tr>
<tr class="field-even field"><th class="field-name">Parameters:</th><td class="field-body"><strong>config_reader</strong> &#8211; ConfigReader to use to retrieve the values from in case
they are not set in the environment</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="attribute">
<dt id="git.util.Actor.conf_email">
<code class="descname">conf_email</code><em class="property"> = 'email'</em><a class="headerlink" href="#git.util.Actor.conf_email" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.util.Actor.conf_name">
<code class="descname">conf_name</code><em class="property"> = 'name'</em><a class="headerlink" href="#git.util.Actor.conf_name" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.util.Actor.email">
<code class="descname">email</code><a class="headerlink" href="#git.util.Actor.email" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.util.Actor.env_author_email">
<code class="descname">env_author_email</code><em class="property"> = 'GIT_AUTHOR_EMAIL'</em><a class="headerlink" href="#git.util.Actor.env_author_email" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.util.Actor.env_author_name">
<code class="descname">env_author_name</code><em class="property"> = 'GIT_AUTHOR_NAME'</em><a class="headerlink" href="#git.util.Actor.env_author_name" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.util.Actor.env_committer_email">
<code class="descname">env_committer_email</code><em class="property"> = 'GIT_COMMITTER_EMAIL'</em><a class="headerlink" href="#git.util.Actor.env_committer_email" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.util.Actor.env_committer_name">
<code class="descname">env_committer_name</code><em class="property"> = 'GIT_COMMITTER_NAME'</em><a class="headerlink" href="#git.util.Actor.env_committer_name" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.util.Actor.name">
<code class="descname">name</code><a class="headerlink" href="#git.util.Actor.name" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.util.Actor.name_email_regex">
<code class="descname">name_email_regex</code><em class="property"> = &lt;_sre.SRE_Pattern object&gt;</em><a class="headerlink" href="#git.util.Actor.name_email_regex" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.util.Actor.name_only_regex">
<code class="descname">name_only_regex</code><em class="property"> = &lt;_sre.SRE_Pattern object&gt;</em><a class="headerlink" href="#git.util.Actor.name_only_regex" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="function">
<dt id="git.util.get_user_id">
<code class="descclassname">git.util.</code><code class="descname">get_user_id</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.util.get_user_id" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">string identifying the currently active system user as <a class="reference external" href="mailto:name&#37;&#52;&#48;node">name<span>&#64;</span>node</a></td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="function">
<dt id="git.util.assure_directory_exists">
<code class="descclassname">git.util.</code><code class="descname">assure_directory_exists</code><span class="sig-paren">(</span><em>path</em>, <em>is_file=False</em><span class="sig-paren">)</span><a class="headerlink" href="#git.util.assure_directory_exists" title="Permalink to this definition">¶</a></dt>
<dd><p>Assure that the directory pointed to by path exists.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>is_file</strong> &#8211; If True, path is assumed to be a file and handled correctly.
Otherwise it must be a directory</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">True if the directory was created, False if it already existed</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="class">
<dt id="git.util.RemoteProgress">
<em class="property">class </em><code class="descclassname">git.util.</code><code class="descname">RemoteProgress</code><a class="headerlink" href="#git.util.RemoteProgress" title="Permalink to this definition">¶</a></dt>
<dd><p>Handler providing an interface to parse progress information emitted by git-push
and git-fetch and to dispatch callbacks allowing subclasses to react to the progress.</p>
<dl class="attribute">
<dt id="git.util.RemoteProgress.BEGIN">
<code class="descname">BEGIN</code><em class="property"> = 1</em><a class="headerlink" href="#git.util.RemoteProgress.BEGIN" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.util.RemoteProgress.CHECKING_OUT">
<code class="descname">CHECKING_OUT</code><em class="property"> = 256</em><a class="headerlink" href="#git.util.RemoteProgress.CHECKING_OUT" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.util.RemoteProgress.COMPRESSING">
<code class="descname">COMPRESSING</code><em class="property"> = 8</em><a class="headerlink" href="#git.util.RemoteProgress.COMPRESSING" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.util.RemoteProgress.COUNTING">
<code class="descname">COUNTING</code><em class="property"> = 4</em><a class="headerlink" href="#git.util.RemoteProgress.COUNTING" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.util.RemoteProgress.DONE_TOKEN">
<code class="descname">DONE_TOKEN</code><em class="property"> = 'done.'</em><a class="headerlink" href="#git.util.RemoteProgress.DONE_TOKEN" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.util.RemoteProgress.END">
<code class="descname">END</code><em class="property"> = 2</em><a class="headerlink" href="#git.util.RemoteProgress.END" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.util.RemoteProgress.FINDING_SOURCES">
<code class="descname">FINDING_SOURCES</code><em class="property"> = 128</em><a class="headerlink" href="#git.util.RemoteProgress.FINDING_SOURCES" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.util.RemoteProgress.OP_MASK">
<code class="descname">OP_MASK</code><em class="property"> = -4</em><a class="headerlink" href="#git.util.RemoteProgress.OP_MASK" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.util.RemoteProgress.RECEIVING">
<code class="descname">RECEIVING</code><em class="property"> = 32</em><a class="headerlink" href="#git.util.RemoteProgress.RECEIVING" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.util.RemoteProgress.RESOLVING">
<code class="descname">RESOLVING</code><em class="property"> = 64</em><a class="headerlink" href="#git.util.RemoteProgress.RESOLVING" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.util.RemoteProgress.STAGE_MASK">
<code class="descname">STAGE_MASK</code><em class="property"> = 3</em><a class="headerlink" href="#git.util.RemoteProgress.STAGE_MASK" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.util.RemoteProgress.TOKEN_SEPARATOR">
<code class="descname">TOKEN_SEPARATOR</code><em class="property"> = ', '</em><a class="headerlink" href="#git.util.RemoteProgress.TOKEN_SEPARATOR" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.util.RemoteProgress.WRITING">
<code class="descname">WRITING</code><em class="property"> = 16</em><a class="headerlink" href="#git.util.RemoteProgress.WRITING" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="git.util.RemoteProgress.__init__">
<code class="descname">__init__</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.util.RemoteProgress.__init__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.util.RemoteProgress.__module__">
<code class="descname">__module__</code><em class="property"> = 'git.util'</em><a class="headerlink" href="#git.util.RemoteProgress.__module__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.util.RemoteProgress.__slots__">
<code class="descname">__slots__</code><em class="property"> = ('_cur_line', '_seen_ops', '_error_lines')</em><a class="headerlink" href="#git.util.RemoteProgress.__slots__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="git.util.RemoteProgress.error_lines">
<code class="descname">error_lines</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.util.RemoteProgress.error_lines" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns all lines that started with error: or fatal:</p>
</dd></dl>

<dl class="method">
<dt id="git.util.RemoteProgress.line_dropped">
<code class="descname">line_dropped</code><span class="sig-paren">(</span><em>line</em><span class="sig-paren">)</span><a class="headerlink" href="#git.util.RemoteProgress.line_dropped" title="Permalink to this definition">¶</a></dt>
<dd><p>Called whenever a line could not be understood and was therefore dropped.</p>
</dd></dl>

<dl class="method">
<dt id="git.util.RemoteProgress.new_message_handler">
<code class="descname">new_message_handler</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.util.RemoteProgress.new_message_handler" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">a progress handler suitable for handle_process_output(), passing lines on to this Progress
handler in a suitable format</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="attribute">
<dt id="git.util.RemoteProgress.re_op_absolute">
<code class="descname">re_op_absolute</code><em class="property"> = &lt;_sre.SRE_Pattern object&gt;</em><a class="headerlink" href="#git.util.RemoteProgress.re_op_absolute" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.util.RemoteProgress.re_op_relative">
<code class="descname">re_op_relative</code><em class="property"> = &lt;_sre.SRE_Pattern object&gt;</em><a class="headerlink" href="#git.util.RemoteProgress.re_op_relative" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="git.util.RemoteProgress.update">
<code class="descname">update</code><span class="sig-paren">(</span><em>op_code</em>, <em>cur_count</em>, <em>max_count=None</em>, <em>message=''</em><span class="sig-paren">)</span><a class="headerlink" href="#git.util.RemoteProgress.update" title="Permalink to this definition">¶</a></dt>
<dd><p>Called whenever the progress changes</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>op_code</strong> &#8211; <p>Integer allowing to be compared against Operation IDs and stage IDs.</p>
<p>Stage IDs are BEGIN and END. BEGIN will only be set once for each Operation
ID as well as END. It may be that BEGIN and END are set at once in case only
one progress message was emitted due to the speed of the operation.
Between BEGIN and END, none of these flags will be set</p>
<p>Operation IDs are all held within the OP_MASK. Only one Operation ID will
be active per call.</p>
</li>
<li><strong>cur_count</strong> &#8211; Current absolute count of items</li>
<li><strong>max_count</strong> &#8211; The maximum count of items we expect. It may be None in case there is
no maximum number of items or if it is (yet) unknown.</li>
<li><strong>message</strong> &#8211; In case of the &#8216;WRITING&#8217; operation, it contains the amount of bytes
transferred. It may possibly be used for other purposes as well.</li>
</ul>
</td>
</tr>
</tbody>
</table>
<p>You may read the contents of the current line in self._cur_line</p>
</dd></dl>

<dl class="attribute">
<dt id="git.util.RemoteProgress.x">
<code class="descname">x</code><em class="property"> = 8</em><a class="headerlink" href="#git.util.RemoteProgress.x" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="class">
<dt id="git.util.CallableRemoteProgress">
<em class="property">class </em><code class="descclassname">git.util.</code><code class="descname">CallableRemoteProgress</code><span class="sig-paren">(</span><em>fn</em><span class="sig-paren">)</span><a class="headerlink" href="#git.util.CallableRemoteProgress" title="Permalink to this definition">¶</a></dt>
<dd><p>An implementation forwarding updates to any callable</p>
<dl class="method">
<dt id="git.util.CallableRemoteProgress.__init__">
<code class="descname">__init__</code><span class="sig-paren">(</span><em>fn</em><span class="sig-paren">)</span><a class="headerlink" href="#git.util.CallableRemoteProgress.__init__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.util.CallableRemoteProgress.__module__">
<code class="descname">__module__</code><em class="property"> = 'git.util'</em><a class="headerlink" href="#git.util.CallableRemoteProgress.__module__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.util.CallableRemoteProgress.__slots__">
<code class="descname">__slots__</code><em class="property"> = '_callable'</em><a class="headerlink" href="#git.util.CallableRemoteProgress.__slots__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="git.util.CallableRemoteProgress.update">
<code class="descname">update</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#git.util.CallableRemoteProgress.update" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="function">
<dt id="git.util.rmtree">
<code class="descclassname">git.util.</code><code class="descname">rmtree</code><span class="sig-paren">(</span><em>path</em><span class="sig-paren">)</span><a class="headerlink" href="#git.util.rmtree" title="Permalink to this definition">¶</a></dt>
<dd><p>Remove the given recursively.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Note:</th><td class="field-body">we use shutil rmtree but adjust its behaviour to see whether files that
couldn&#8217;t be deleted are read-only. Windows will not remove them in that case</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="class">
<dt id="git.util.WaitGroup">
<em class="property">class </em><code class="descclassname">git.util.</code><code class="descname">WaitGroup</code><a class="headerlink" href="#git.util.WaitGroup" title="Permalink to this definition">¶</a></dt>
<dd><p>WaitGroup is like Go sync.WaitGroup.</p>
<p>Without all the useful corner cases.
By Peter Teichman, taken from <a class="reference external" href="https://gist.github.com/pteichman/84b92ae7cef0ab98f5a8">https://gist.github.com/pteichman/84b92ae7cef0ab98f5a8</a></p>
<dl class="attribute">
<dt id="git.util.WaitGroup.__dict__">
<code class="descname">__dict__</code><em class="property"> = dict_proxy({'__module__': 'git.util', 'done': &lt;function done at 0x10fdf6c80&gt;, '__dict__': &lt;attribute '__dict__' of 'WaitGroup' objects&gt;, 'wait': &lt;function wait at 0x10fdf6cf8&gt;, '__weakref__': &lt;attribute '__weakref__' of 'WaitGroup' objects&gt;, 'add': &lt;function add at 0x10fdf6c08&gt;, '__init__': &lt;function __init__ at 0x10fdf6b90&gt;, '__doc__': 'WaitGroup is like Go sync.WaitGroup.\n\n    Without all the useful corner cases.\n    By Peter Teichman, taken from https://gist.github.com/pteichman/84b92ae7cef0ab98f5a8\n    '})</em><a class="headerlink" href="#git.util.WaitGroup.__dict__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="git.util.WaitGroup.__init__">
<code class="descname">__init__</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.util.WaitGroup.__init__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.util.WaitGroup.__module__">
<code class="descname">__module__</code><em class="property"> = 'git.util'</em><a class="headerlink" href="#git.util.WaitGroup.__module__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="git.util.WaitGroup.__weakref__">
<code class="descname">__weakref__</code><a class="headerlink" href="#git.util.WaitGroup.__weakref__" title="Permalink to this definition">¶</a></dt>
<dd><p>list of weak references to the object (if defined)</p>
</dd></dl>

<dl class="method">
<dt id="git.util.WaitGroup.add">
<code class="descname">add</code><span class="sig-paren">(</span><em>n</em><span class="sig-paren">)</span><a class="headerlink" href="#git.util.WaitGroup.add" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="git.util.WaitGroup.done">
<code class="descname">done</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.util.WaitGroup.done" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="git.util.WaitGroup.wait">
<code class="descname">wait</code><span class="sig-paren">(</span><em>stderr=''</em><span class="sig-paren">)</span><a class="headerlink" href="#git.util.WaitGroup.wait" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="function">
<dt id="git.util.unbare_repo">
<code class="descclassname">git.util.</code><code class="descname">unbare_repo</code><span class="sig-paren">(</span><em>func</em><span class="sig-paren">)</span><a class="headerlink" href="#git.util.unbare_repo" title="Permalink to this definition">¶</a></dt>
<dd><p>Methods with this decorator raise InvalidGitRepositoryError if they
encounter a bare repository</p>
</dd></dl>

</div>
</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
        <div class="sphinxsidebarwrapper">
  <h3><a href="index.html">Table Of Contents</a></h3>
  <ul>
<li><a class="reference internal" href="#">API Reference</a><ul>
<li><a class="reference internal" href="#module-git.objects.base">Objects.Base</a></li>
<li><a class="reference internal" href="#module-git.objects.blob">Objects.Blob</a></li>
<li><a class="reference internal" href="#module-git.objects.commit">Objects.Commit</a></li>
<li><a class="reference internal" href="#module-git.objects.tag">Objects.Tag</a></li>
<li><a class="reference internal" href="#module-git.objects.tree">Objects.Tree</a></li>
<li><a class="reference internal" href="#module-git.objects.fun">Objects.Functions</a></li>
<li><a class="reference internal" href="#module-git.objects.submodule.base">Objects.Submodule.base</a></li>
<li><a class="reference internal" href="#module-git.objects.submodule.root">Objects.Submodule.root</a></li>
<li><a class="reference internal" href="#module-git.objects.submodule.util">Objects.Submodule.util</a></li>
<li><a class="reference internal" href="#module-git.objects.util">Objects.Util</a></li>
<li><a class="reference internal" href="#module-git.index.base">Index.Base</a></li>
<li><a class="reference internal" href="#module-git.index.fun">Index.Functions</a></li>
<li><a class="reference internal" href="#module-git.index.typ">Index.Types</a></li>
<li><a class="reference internal" href="#module-git.index.util">Index.Util</a></li>
<li><a class="reference internal" href="#module-git.cmd">GitCmd</a></li>
<li><a class="reference internal" href="#module-git.config">Config</a></li>
<li><a class="reference internal" href="#module-git.diff">Diff</a></li>
<li><a class="reference internal" href="#module-git.exc">Exceptions</a></li>
<li><a class="reference internal" href="#module-git.refs.symbolic">Refs.symbolic</a></li>
<li><a class="reference internal" href="#module-git.refs.reference">Refs.reference</a></li>
<li><a class="reference internal" href="#module-git.refs.head">Refs.head</a></li>
<li><a class="reference internal" href="#module-git.refs.tag">Refs.tag</a></li>
<li><a class="reference internal" href="#module-git.refs.remote">Refs.remote</a></li>
<li><a class="reference internal" href="#module-git.refs.log">Refs.log</a></li>
<li><a class="reference internal" href="#module-git.remote">Remote</a></li>
<li><a class="reference internal" href="#module-git.repo.base">Repo.Base</a></li>
<li><a class="reference internal" href="#module-git.repo.fun">Repo.Functions</a></li>
<li><a class="reference internal" href="#util">Util</a></li>
</ul>
</li>
</ul>
<div class="relations">
<h3>Related Topics</h3>
<ul>
  <li><a href="index.html">Documentation overview</a><ul>
      <li>Previous: <a href="tutorial.html" title="previous chapter">GitPython Tutorial</a></li>
      <li>Next: <a href="roadmap.html" title="next chapter">Roadmap</a></li>
  </ul></li>
</ul>
</div>
  <div role="note" aria-label="source link">
    <h3>This Page</h3>
    <ul class="this-page-menu">
      <li><a href="_sources/reference.txt"
            rel="nofollow">Show Source</a></li>
    </ul>
   </div>
<div id="searchbox" style="display: none" role="search">
  <h3>Quick search</h3>
    <form class="search" action="search.html" method="get">
      <input type="text" name="q" />
      <input type="submit" value="Go" />
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="footer">
      &copy;Copyright (C) 2008, 2009 Michael Trier and contributors, 2010-2015 Sebastian Thiel.
      
      |
      Powered by <a href="http://sphinx-doc.org/">Sphinx 1.4.1</a>
      &amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.7</a>
      
      |
      <a href="_sources/reference.txt"
          rel="nofollow">Page source</a>
    </div>

    

    
  </body>
</html>