git 1.0.2 → 1.0.3

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of git might be problematic. Click here for more details.

Files changed (268) hide show
  1. data/README +69 -0
  2. data/doc/classes/Git.html +87 -6
  3. data/doc/classes/Git/Author.html +175 -0
  4. data/doc/classes/Git/Base.html +857 -297
  5. data/doc/classes/Git/Branch.html +118 -70
  6. data/doc/classes/Git/Branches.html +36 -36
  7. data/doc/classes/Git/Diff.html +64 -64
  8. data/doc/classes/Git/Diff/DiffFile.html +12 -12
  9. data/doc/classes/Git/Lib.html +560 -261
  10. data/doc/classes/Git/Object.html +19 -12
  11. data/doc/classes/Git/Object/AbstractObject.html +239 -66
  12. data/doc/classes/Git/Object/Blob.html +12 -11
  13. data/doc/classes/Git/Object/Commit.html +255 -10
  14. data/doc/classes/Git/Object/Tag.html +7 -33
  15. data/doc/classes/Git/Object/Tree.html +132 -10
  16. data/doc/classes/Git/Path.html +42 -18
  17. data/doc/classes/Git/Remote.html +42 -42
  18. data/doc/created.rid +1 -1
  19. data/doc/files/README.html +106 -1
  20. data/doc/files/lib/git/author_rb.html +101 -0
  21. data/doc/files/lib/git/base_rb.html +1 -1
  22. data/doc/files/lib/git/branch_rb.html +1 -1
  23. data/doc/files/lib/git/index_rb.html +1 -1
  24. data/doc/files/lib/git/lib_rb.html +8 -1
  25. data/doc/files/lib/git/object_rb.html +1 -1
  26. data/doc/files/lib/git/path_rb.html +1 -1
  27. data/doc/files/lib/git_rb.html +2 -1
  28. data/doc/fr_class_index.html +1 -0
  29. data/doc/fr_file_index.html +1 -0
  30. data/doc/fr_method_index.html +183 -134
  31. data/lib/git.rb +47 -1
  32. data/lib/git/base.rb +190 -9
  33. data/lib/git/branch.rb +9 -2
  34. data/lib/git/index.rb +1 -0
  35. data/lib/git/lib.rb +79 -3
  36. data/lib/git/object.rb +77 -34
  37. data/lib/git/path.rb +4 -0
  38. data/tests/files/working.git/objects/00/62cdf4c1e63069eececf54325535e91fd57c42 +0 -0
  39. data/tests/files/working.git/objects/00/ea60e1331b184386392037a7267dfb4a7c7d86 +0 -0
  40. data/tests/files/working.git/objects/01/0b7b79019cb510d8c5849704fd10541655916d +0 -0
  41. data/tests/files/working.git/objects/01/dd46ebe07fc30c10c85c2e926c70f2d7058a6b +0 -0
  42. data/tests/files/working.git/objects/02/b2a02844d00574c234d17bec6294e832f3c4c1 +0 -0
  43. data/tests/files/working.git/objects/06/f4e8a840d23fc0ab94895a5d16827a19f75fb7 +0 -0
  44. data/tests/files/working.git/objects/0b/2fe00801b62b7760c23d554796b05abc16af92 +0 -0
  45. data/tests/files/working.git/objects/0b/5262f6ee3552a99b7081a317e8289d6a4d8e72 +0 -0
  46. data/tests/files/working.git/objects/0d/2c47f07277b3ea30b0884f8e3acd68440507c8 +0 -0
  47. data/tests/files/working.git/objects/0d/519ca9c2eddc44431efe135d0fc8df00e0b975 +0 -0
  48. data/tests/files/working.git/objects/0f/845a0a981bc2f61354fcdd2b6eafe2b2c55c2d +3 -0
  49. data/tests/files/working.git/objects/0f/f4a0357c3d7221a2ef1e4c6b7d5c46d97fe250 +0 -0
  50. data/tests/files/working.git/objects/12/eb889f49f1464b32a51424d7724fb16f6c3a31 +0 -0
  51. data/tests/files/working.git/objects/15/34a65657edf4e5caaa5ce35652dca5e4c7d316 +0 -0
  52. data/tests/files/working.git/objects/15/378a1f3eafe4c5ab4f890883356df917ee5539 +2 -0
  53. data/tests/files/working.git/objects/16/9e6db43d4c09cd610179a7b9826483b4d94123 +0 -0
  54. data/tests/files/working.git/objects/16/d1f96acfd92d09c4f1f56d3441ac55dd30500e +0 -0
  55. data/tests/files/working.git/objects/16/ee5335538f11b4ffcc17b051f8d5db7570a055 +0 -0
  56. data/tests/files/working.git/objects/17/9ef0e0209e90af00f544ff414e0674dfb5f5c7 +0 -0
  57. data/tests/files/working.git/objects/19/9d2f8e60fddd1bb2a1b0bddedde35e5aa8b03f +0 -0
  58. data/tests/files/working.git/objects/1c/c8667014381e2788a94777532a788307f38d26 +1 -0
  59. data/tests/files/working.git/objects/1c/fcfba04eb4e461e9f930d22f528023ab1ddefc +0 -0
  60. data/tests/files/working.git/objects/1d/7be4117ded4534789d85c42ab579644cd3fa12 +0 -0
  61. data/tests/files/working.git/objects/1d/9e4767a95047ca5e395714985afaedb186f4cd +1 -0
  62. data/tests/files/working.git/objects/1f/09f2edb9c0d9275d15960771b363ca6940fbe3 +0 -0
  63. data/tests/files/working.git/objects/1f/691b879df15cf6742502ffc59833b4a40e7aef +0 -0
  64. data/tests/files/working.git/objects/23/751ef6c1fed1304ae1d07020aa73da6f2b93b0 +1 -0
  65. data/tests/files/working.git/objects/24/5582a71306d7360e40c07cd7d849a1aa14a31e +0 -0
  66. data/tests/files/working.git/objects/26/3e3c527004e7b742ed1f747c1bfb7e11825d7a +0 -0
  67. data/tests/files/working.git/objects/27/c0c003dda3e59ba236f53f6661faaf74432b5c +0 -0
  68. data/tests/files/working.git/objects/29/1b6be488d6abc586d3ee03ca61238766625a75 +0 -0
  69. data/tests/files/working.git/objects/2a/f6f7d51b7afdd404a871581ebb3b6ac07fb8cc +0 -0
  70. data/tests/files/working.git/objects/2c/ef51480d44dcc262d16be2812c692d940d5f29 +0 -0
  71. data/tests/files/working.git/objects/2e/20132e8fd40cb3e82248919a10900d31f1816a +0 -0
  72. data/tests/files/working.git/objects/2e/939fd37bbd2da971faa27c3e3de7d5aad40507 +0 -0
  73. data/tests/files/working.git/objects/2f/53e667d1d88e75b3fa300f9ab6e2d8ffd32a15 +0 -0
  74. data/tests/files/working.git/objects/32/4968b9dc40253f2c52a8e3856398c761dea856 +0 -0
  75. data/tests/files/working.git/objects/33/8ecb0183d507498aedb669b796b4f9e8880f00 +0 -0
  76. data/tests/files/working.git/objects/33/edabb4334cbe849a477a0d2893cdb768fa3091 +0 -0
  77. data/tests/files/working.git/objects/34/a566d193dc4702f03149969a2aad1443231560 +1 -0
  78. data/tests/files/working.git/objects/36/fe213c328fd280f33abe00069c4b92eb5a88d1 +0 -0
  79. data/tests/files/working.git/objects/39/66e9fa0e0b9fe9d3ef2fdaa6933f3d0bb82bc3 +0 -0
  80. data/tests/files/working.git/objects/3a/9f195756f5bd26b67c5e1fffd92d68d61be14e +2 -0
  81. data/tests/files/working.git/objects/3a/ac4b445017a8fc07502670ec2dbf744213dd48 +0 -0
  82. data/tests/files/working.git/objects/3b/6eeed9ce43ea893cf48d263da93448edae9f1c +0 -0
  83. data/tests/files/working.git/objects/3c/644f22b9b8edb06e7e298ecac8e71b133061f1 +0 -0
  84. data/tests/files/working.git/objects/3c/c71b13d906e445da52785ddeff40dad1163d49 +2 -0
  85. data/tests/files/working.git/objects/3c/f35bd14cf5f2dd08bbeef8698d700f3a038e5c +0 -0
  86. data/tests/files/working.git/objects/3d/331db92a8ead0565679efb76f328ae69ed1b77 +0 -0
  87. data/tests/files/working.git/objects/44/88516c3c936db58ea485ec2213dab9d13e6628 +0 -0
  88. data/tests/files/working.git/objects/44/987dd95c338fb573726541f270f1a7b55c9d51 +0 -0
  89. data/tests/files/working.git/objects/45/20c29b885e9db9b0df3c7bab7870157e1d00c3 +0 -0
  90. data/tests/files/working.git/objects/45/b983be36b73c0788dc9cbcb76cbb80fc7bb057 +0 -0
  91. data/tests/files/working.git/objects/46/00557506be20eb1501a4f15a52e684d4b9ee61 +0 -0
  92. data/tests/files/working.git/objects/46/a60232117527e7b57ac0dd5ea4af2cd3fdb696 +0 -0
  93. data/tests/files/working.git/objects/47/0f6a87fa51dd25f6db0f4725ae37791d449356 +0 -0
  94. data/tests/files/working.git/objects/47/2650d42fa9454e2e61e3da9f5c158b8af6d298 +0 -0
  95. data/tests/files/working.git/objects/47/8e5ee111572790b248eaa99140c5a8f728abc7 +0 -0
  96. data/tests/files/working.git/objects/48/bbf0db7e813affab7d8dd2842b8455ff9876be +0 -0
  97. data/tests/files/working.git/objects/49/b352299735fda3a333c69c6273178b0c3dfa08 +0 -0
  98. data/tests/files/working.git/objects/4a/1e3e4500962c3631a479726bf2e40469594cba +0 -0
  99. data/tests/files/working.git/objects/4a/2bee50944e9285e8f82216c9b0b8a7d3cdd315 +0 -0
  100. data/tests/files/working.git/objects/4a/4e676afe275afecf23130390fe96d0e6d00057 +0 -0
  101. data/tests/files/working.git/objects/4a/de99433ac3e4bcc874cd7de488de29399e9096 +1 -0
  102. data/tests/files/working.git/objects/4b/7c90536eaa830d8c1f6ff49a7885b581d6acef +1 -0
  103. data/tests/files/working.git/objects/4c/411dc8e6ea6fcba0ed56e84aa7707f881d24c7 +0 -0
  104. data/tests/files/working.git/objects/4c/ce9432b2f80461324a61611f6143f8544cd80f +1 -0
  105. data/tests/files/working.git/objects/4c/e44a75510cbfe200b131fdbcc56a86f1b2dc08 +0 -0
  106. data/tests/files/working.git/objects/4d/35ba97a858072c240d327e3ce30c28b333a1b0 +0 -0
  107. data/tests/files/working.git/objects/4d/ff9ef38ef09cbf0e36031bbee22b7cf0c7a8fc +1 -0
  108. data/tests/files/working.git/objects/4e/aafb1d843aec4f8f1612d03de46a08c2143ea9 +0 -0
  109. data/tests/files/working.git/objects/4e/ebc1b62c53241b7fbf7fb33b5230362595bfdd +0 -0
  110. data/tests/files/working.git/objects/4f/4065121cb78fe6116ae7e3075f5c5a446bd08b +0 -0
  111. data/tests/files/working.git/objects/50/3d77289b054742f507d8a8ce7cc51d3841d5b9 +0 -0
  112. data/tests/files/working.git/objects/52/4038b20b297f40d78e7d83e04e38049457312b +0 -0
  113. data/tests/files/working.git/objects/53/a72df554e585e239e41cb1fc498d5aee9bb164 +0 -0
  114. data/tests/files/working.git/objects/54/0200385c3b0b299c7a87ecf59ca94c32fbbe99 +0 -0
  115. data/tests/files/working.git/objects/54/5c81a2e8d1112d5f7356f840a22e8f6abcef8f +2 -0
  116. data/tests/files/working.git/objects/54/6bec6f8872efa41d5d97a369f669165ecda0de +0 -0
  117. data/tests/files/working.git/objects/54/7a4bae347658f0d9eed0d35d31b4561aea7cf8 +2 -0
  118. data/tests/files/working.git/objects/56/195ef83e9e20ca75dddef0630633fc8060ed11 +0 -0
  119. data/tests/files/working.git/objects/57/7ddd894033c46a5fcf2c6f3c4e71cc72f86909 +0 -0
  120. data/tests/files/working.git/objects/58/501cbd0fc5ce832f6b34d37243a520dc19a6cc +1 -0
  121. data/tests/files/working.git/objects/58/73a650a91eb238005444d2c637b451f687951b +0 -0
  122. data/tests/files/working.git/objects/5a/28efd2fcf55b7b58eb7cc66b5db836155bc2bb +0 -0
  123. data/tests/files/working.git/objects/5b/0be7da7cc9ecdb6c2de5f818c30a42fbd2c9fa +1 -0
  124. data/tests/files/working.git/objects/5c/16fb8b958b51f6008f9722b279b1fde0defb76 +3 -0
  125. data/tests/files/working.git/objects/5d/4606820736043f9eed2a6336661d6892c820a5 +0 -0
  126. data/tests/files/working.git/objects/5e/392652a881999392c2757cf9b783c5d47b67f7 +0 -0
  127. data/tests/files/working.git/objects/5e/53019b3238362144c2766f02a2c00d91fcc023 +2 -0
  128. data/tests/files/working.git/objects/62/70c7f48ca41e6fb41b745ddc1bffe521d83194 +2 -0
  129. data/tests/files/working.git/objects/62/7e1097cda3b2e3ad6ba4d3772c0985e1ff349c +0 -0
  130. data/tests/files/working.git/objects/62/bb94c53efae4d53fd0649d129baef4aca87af7 +3 -0
  131. data/tests/files/working.git/objects/62/c9331ffe97bb6388fb7968662b4e97d121e2da +0 -0
  132. data/tests/files/working.git/objects/63/1446ec50808846e31fff786c065e69da2c673b +0 -0
  133. data/tests/files/working.git/objects/64/d0c52ac4c061cf1705e3005dfd86fb70374a14 +0 -0
  134. data/tests/files/working.git/objects/66/80a909b0e02b297bedbe143ef789d297235358 +0 -0
  135. data/tests/files/working.git/objects/6c/2d312ebd67eed4c7e97e3923b3667764e7360e +0 -0
  136. data/tests/files/working.git/objects/6d/e8fb35c2e4a69addd030f2dbb4f73fd4742b5b +0 -0
  137. data/tests/files/working.git/objects/6e/d281c757a969ffe22f3dcfa5830c532479c726 +0 -0
  138. data/tests/files/working.git/objects/70/714b02913c1a249a5ab05021742f0bc7065df7 +0 -0
  139. data/tests/files/working.git/objects/71/894b736711ea0a5def4f536009364d07ee4db3 +2 -0
  140. data/tests/files/working.git/objects/71/c9a23879ff0ac8c49b92d107f3f89c6d1b2d92 +1 -0
  141. data/tests/files/working.git/objects/73/b171450704ea4350f9f884426389fe04c6cd51 +0 -0
  142. data/tests/files/working.git/objects/74/32b657191a10587335e74ae6f0966a7eed2976 +0 -0
  143. data/tests/files/working.git/objects/79/e5b9e6ee5a1e6c52676a6332fe9163adaa92cb +0 -0
  144. data/tests/files/working.git/objects/7c/076f209839d7f910e8c84e41cc94898287ef45 +0 -0
  145. data/tests/files/working.git/objects/7c/60c6ab64c74d52f973d18cd1933318a8d9ae2e +0 -0
  146. data/tests/files/working.git/objects/7c/ac4f8d519d524ed025732ee220f6451665a770 +0 -0
  147. data/tests/files/working.git/objects/7f/5625f6b3c7213287a12c89017361248ed88936 +0 -0
  148. data/tests/files/working.git/objects/7f/86d16e0254f64f784198c6a55ef9bf7adbe7ce +0 -0
  149. data/tests/files/working.git/objects/7f/bfee9f8882ada1ec45c4925baf5649d96c4a16 +0 -0
  150. data/tests/files/working.git/objects/81/25fbe8605d2884e732a185c9a24abcc0d12a1f +0 -0
  151. data/tests/files/working.git/objects/81/d4d5e9b6db474d0f432aa31d44bf690d841e94 +0 -0
  152. data/tests/files/working.git/objects/81/f545324202466d44115656ea463a5bb114345f +0 -0
  153. data/tests/files/working.git/objects/82/d331cf4d3d4ee537c4f866cab2633b46a8d090 +0 -0
  154. data/tests/files/working.git/objects/83/c6a1f0d7d8df18a9d9bfe917707aec37868418 +0 -0
  155. data/tests/files/working.git/objects/85/8f46dd7496faf7af72102ca15cccff832b5377 +0 -0
  156. data/tests/files/working.git/objects/87/c56502c73149f006631129f85dff697e000356 +0 -0
  157. data/tests/files/working.git/objects/88/cf23d06f519bec7b824acd52b87a729555f2e7 +0 -0
  158. data/tests/files/working.git/objects/8a/3fb747983bf2a7f4ef136af4bfcf7993a19307 +0 -0
  159. data/tests/files/working.git/objects/8b/00d915a0ee5aeb32e0b166e1054c2901338c9d +0 -0
  160. data/tests/files/working.git/objects/8c/e3ee48a7e7ec697a99ee33700ec624548ad9e8 +0 -0
  161. data/tests/files/working.git/objects/8d/ae07ab9d98b5fe04d4d7ed804cc36441b68dab +0 -0
  162. data/tests/files/working.git/objects/8d/c79ae7616abf1e2d4d5d97d566f2b2f6cee043 +0 -0
  163. data/tests/files/working.git/objects/92/4dec9203af851c3b3e564697ab3004b35b3c2f +0 -0
  164. data/tests/files/working.git/objects/93/06c056ba3ef9dca6f6365af38148c71196533a +0 -0
  165. data/tests/files/working.git/objects/93/5badc874edd62a8629aaf103418092c73f0a56 +1 -0
  166. data/tests/files/working.git/objects/94/c827875e2cadb8bc8d4cdd900f19aa9e8634c7 +0 -0
  167. data/tests/files/working.git/objects/95/ef665df6ebd69842c5e74a24cb8a12225dee3e +0 -0
  168. data/tests/files/working.git/objects/98/fb6a686563963b8f7e552d747158adbc1c2bd6 +0 -0
  169. data/tests/files/working.git/objects/99/3dd9b1cdeab53e305886c91dbcbc8929eff22e +1 -0
  170. data/tests/files/working.git/objects/9a/e1fbd7636c99d34fdd395cf9bb21ad51417ce7 +1 -0
  171. data/tests/files/working.git/objects/9b/5149aa4ace4ef69461803b0ccbb21139e12626 +0 -0
  172. data/tests/files/working.git/objects/9d/3ad2f09cb7a1d4f4c91182c96f2be537fbc4ff +0 -0
  173. data/tests/files/working.git/objects/9d/6f937544dc3b936d6ee1466d6e216ba18d5686 +0 -0
  174. data/tests/files/working.git/objects/9f/a43bcd45af28e109e6f7b9a6ccd26e8e193a63 +0 -0
  175. data/tests/files/working.git/objects/a0/b3f35b3c39cfb12c4cc819bffe1cf54efb3642 +2 -0
  176. data/tests/files/working.git/objects/a1/15413501949f4f09811fd1aaecf136c012c7d7 +0 -0
  177. data/tests/files/working.git/objects/a1/a3069efcc64330fb6c66004e69b870da3d6186 +0 -0
  178. data/tests/files/working.git/objects/a3/62d30d5fe1021cabc4c90f073ba2511d5a43a1 +0 -0
  179. data/tests/files/working.git/objects/a3/c1f067074cdc9aa998cb5f3cad46a6f17aab2d +0 -0
  180. data/tests/files/working.git/objects/a3/db7143944dcfa006fefe7fb49c48793cb29ade +2 -0
  181. data/tests/files/working.git/objects/a4/4a5e945176ff31be83ffca3e7c68a8b6a45ea5 +1 -0
  182. data/tests/files/working.git/objects/a5/1546fabf88ddef5a9fd91b3989dd8ccae2edf3 +0 -0
  183. data/tests/files/working.git/objects/a6/b25c4b27ee99f93fd611154202af5f9e3c99de +2 -0
  184. data/tests/files/working.git/objects/a7/88a1cba299638a2c898fcfaae1f69a1549853d +0 -0
  185. data/tests/files/working.git/objects/a8/98e8a6b143188022863bc1cab0b5f7514624ba +0 -0
  186. data/tests/files/working.git/objects/a8/b607b221454c4cd7bc7831b2d19712bb4ff888 +0 -0
  187. data/tests/files/working.git/objects/a9/e2d9b71b616531f04a65ae5b972ba5d1f2cb93 +0 -0
  188. data/tests/files/working.git/objects/a9/e2f17562ae78a75dc855bb3dc9e87364195dcf +0 -0
  189. data/tests/files/working.git/objects/ab/16bc1812fd6226780a841300a2432dfd0c6719 +0 -0
  190. data/tests/files/working.git/objects/ac/8f48bbb7b31c945ba6a4fbe6950d009a5d8373 +0 -0
  191. data/tests/files/working.git/objects/ae/21cabd23aee99a719fc828977c0df9e8b19363 +0 -0
  192. data/tests/files/working.git/objects/b0/3003311ad3fa368b475df58390353868e13c91 +2 -0
  193. data/tests/files/working.git/objects/b0/ee249c5e5cc9464f3bc0034ab05632dcb87a23 +0 -0
  194. data/tests/files/working.git/objects/b1/288f8beeaa6cf048c3a9f578d4e266fab8820e +0 -0
  195. data/tests/files/working.git/objects/b1/5336206c9040f4c52660b3f3c76ee02ccece56 +0 -0
  196. data/tests/files/working.git/objects/b1/b18f5bea24648a1b08e5bba88728c15ec3cb50 +2 -0
  197. data/tests/files/working.git/objects/b4/5724ee906d2561901208ba924add09ab95ccb3 +0 -0
  198. data/tests/files/working.git/objects/b5/d8fc3cb740eb643c66eb5f4a97345fdb806259 +0 -0
  199. data/tests/files/working.git/objects/b6/153b8fe540288d66b974ae05113338ab1a61f0 +0 -0
  200. data/tests/files/working.git/objects/b6/987bc1201ad19774c43c0ea8078f6f51d76bcb +0 -0
  201. data/tests/files/working.git/objects/b6/9e6acd87e5f9114ce6580b095ef1057a8fe5bb +0 -0
  202. data/tests/files/working.git/objects/b9/8f4909807c8c84a1dc1b62b4a339ae1777f369 +3 -0
  203. data/tests/files/working.git/objects/ba/492c62b6227d7f3507b4dcc6e6d5f13790eabf +0 -0
  204. data/tests/files/working.git/objects/ba/c335cb9dc058a477d04cde34c07d1f70d16fb9 +0 -0
  205. data/tests/files/working.git/objects/bb/0850568bb43049031a38b01ddb60e4a487f823 +0 -0
  206. data/tests/files/working.git/objects/be/b14380ef26540efcad06bedcd0e302b6bce70e +0 -0
  207. data/tests/files/working.git/objects/c1/3142dd26a1f6f38403a17f6c411cb621b9a1cd +0 -0
  208. data/tests/files/working.git/objects/c1/8b4e9b0829411705d7fa9a1570a20d88780817 +0 -0
  209. data/tests/files/working.git/objects/c5/a3fdb33f052b8f17dac83c533b62244226f4ba +0 -0
  210. data/tests/files/working.git/objects/c6/567e2feccce3893ae0aaac2bf97807338aa8d4 +0 -0
  211. data/tests/files/working.git/objects/cb/45eef6fa1ad913137d91c6b81d2b42d69094a6 +0 -0
  212. data/tests/files/working.git/objects/cd/0d59357b36a447ff27a7c176b46e0a319b42df +0 -0
  213. data/tests/files/working.git/objects/cd/4291452a61ff8b57cf5510addc8ddc5630748e +0 -0
  214. data/tests/files/working.git/objects/cf/7135368cc3bf4920ceeaeebd083e098cfad355 +4 -0
  215. data/tests/files/working.git/objects/cf/b9952c3a28831144a0fac7ea5a2d8517f466c4 +0 -0
  216. data/tests/files/working.git/objects/d0/0491fd7e5bb6fa28c517a0bb32b8b506539d4d +0 -0
  217. data/tests/files/working.git/objects/d1/4cbc09cc34fb6450b2e96432102be51c8292b8 +0 -0
  218. data/tests/files/working.git/objects/d3/d171221e87a30e059d638f155f899595d96b71 +0 -0
  219. data/tests/files/working.git/objects/d5/b9587b65731e25216743b0caca72051a760211 +2 -0
  220. data/tests/files/working.git/objects/d6/a3aab3e38bc16688b4e636a91e462434210878 +0 -0
  221. data/tests/files/working.git/objects/d6/f31c35d7e010e50568c0d605227028aa7bac66 +0 -0
  222. data/tests/files/working.git/objects/d7/875788aeafdd8e317880c00e3372f683cad91e +0 -0
  223. data/tests/files/working.git/objects/d7/d8a71a719e2a4ca501991a66dab47df804f6ad +0 -0
  224. data/tests/files/working.git/objects/d7/e844eec32d74a3d37c4ce02d7138658e1035d6 +0 -0
  225. data/tests/files/working.git/objects/da/597fb7fba247a5b59d917e90342cf4b9695905 +0 -0
  226. data/tests/files/working.git/objects/da/7b788b1575936a4381050610a37737c70b55a0 +1 -0
  227. data/tests/files/working.git/objects/de/996da0ef3dcee1a28aef9243aa3e255eb825b5 +0 -0
  228. data/tests/files/working.git/objects/de/d54b45e4d49816f6d4256e74d45ba2bb351357 +0 -0
  229. data/tests/files/working.git/objects/e3/6f723934fd1d67c7d21538751f0b1e941141db +0 -0
  230. data/tests/files/working.git/objects/e3/ebef76525fe9e6e8dc739934a08512dff777c0 +0 -0
  231. data/tests/files/working.git/objects/e5/0fa6835cb99747346f19fea5f1ba939da4205f +2 -0
  232. data/tests/files/working.git/objects/e5/650a5c9c4b5a4415195bfb01d4d8dccbc8221b +0 -0
  233. data/tests/files/working.git/objects/e5/76bdfc9ed4627ac954f9390cf7a6151ad2a73e +0 -0
  234. data/tests/files/working.git/objects/e7/ea5938f9c009d32235050bca991d0b9533e440 +0 -0
  235. data/tests/files/working.git/objects/e8/183f05f5db68b3934e93f4bf6bed2bb664e0b5 +0 -0
  236. data/tests/files/working.git/objects/e8/bd03b163f82fba4560c11839d49361a78dec85 +0 -0
  237. data/tests/files/working.git/objects/e9/0de8268373e4fd5ab13310b7745d47ec16813c +0 -0
  238. data/tests/files/working.git/objects/ec/16a327a6a98367d03369b4e998baf3db379313 +0 -0
  239. data/tests/files/working.git/objects/ec/1e3d44e160e18dbfbaa80b5b0780ccc03e678e +0 -0
  240. data/tests/files/working.git/objects/ed/551aa66cf0c6f1a078832f80899faff0ae88dc +0 -0
  241. data/tests/files/working.git/objects/f1/25480ee106989ec4d86554c0d5a1487ad4336a +1 -0
  242. data/tests/files/working.git/objects/f1/410f8735f6f73d3599eb9b5cdd2fb70373335c +3 -0
  243. data/tests/files/working.git/objects/f2/02cb755135d4263589602783b04fb32a079d88 +0 -0
  244. data/tests/files/working.git/objects/f2/ff401fb3fc81f8abb3ca15247aadc1e22b6288 +0 -0
  245. data/tests/files/working.git/objects/f5/501de98279c6454f510188873476f3ead0cee6 +4 -0
  246. data/tests/files/working.git/objects/f7/5f313ca30e534aa9c42463e85108e682d3a14a +0 -0
  247. data/tests/files/working.git/objects/f8/e9c6748331411c0d3511f90bd4e0a1a30acff0 +0 -0
  248. data/tests/files/working.git/objects/f9/bce8995109cfab475d043a7dd9156d5e574ed3 +0 -0
  249. data/tests/files/working.git/objects/fa/6312f71abb153ada6a0399ad710d21bb61e4d8 +0 -0
  250. data/tests/files/working.git/objects/fb/8e78840d79085abf50edebf5b9d6b73ee0fb4c +0 -0
  251. data/tests/files/working.git/objects/fc/b49fa99454f804799a12095292edbca48779ab +0 -0
  252. data/tests/files/working.git/objects/fe/b2ccf88397c2d93f381176067be2727eba330b +0 -0
  253. data/tests/files/working.git/refs/heads/git_grep +1 -0
  254. data/tests/files/working.git/refs/heads/master +1 -1
  255. data/tests/files/working.git/refs/heads/test +1 -0
  256. data/tests/files/working.git/refs/heads/test_branches +1 -0
  257. data/tests/files/working.git/refs/heads/test_object +1 -0
  258. data/tests/files/working.git/refs/tags/gitsearch1 +1 -0
  259. data/tests/files/working.git/refs/tags/v2.5 +1 -0
  260. data/tests/files/working.git/refs/tags/v2.6 +1 -0
  261. data/tests/files/working.git/refs/tags/v2.7 +1 -0
  262. data/tests/files/working.git/refs/tags/v2.8 +1 -0
  263. data/tests/units/test_archive.rb +55 -0
  264. data/tests/units/test_bare.rb +41 -0
  265. data/tests/units/test_index_ops.rb +1 -1
  266. data/tests/units/test_object.rb +23 -14
  267. data/tests/units/test_tree_ops.rb +121 -0
  268. metadata +372 -2
data/README CHANGED
@@ -19,6 +19,34 @@ but eventually I'll replace that with either C bindings
19
19
  to libgit or libgit-thin, or I'll write pure ruby
20
20
  handlers for at least some of the Git stuff.
21
21
 
22
+ = Major Objects
23
+
24
+ Git::Base - this is the object returned from a Git.open or Git.clone.
25
+ Most major actions are called from this object.
26
+
27
+ Git::Object - this is the base object for your tree, blob and commit objects,
28
+ returned from @git.gtree or @git.object calls. the Git::AbstractObject will
29
+ have most of the calls in common for all those objects.
30
+
31
+ Git::Diff - returns from a @git.diff command. It is an Enumerable that returns
32
+ Git::Diff:DiffFile objects from which you can get per file patches and insertion/deletion
33
+ statistics. You can also get total statistics from the Git::Diff object directly.
34
+
35
+ Git::Status - returns from a @git.status command. It is an Enumerable that returns
36
+ Git:Status::StatusFile objects for each object in git, which includes files in the working
37
+ directory, in the index and in the repository. Similar to running 'git status' on the command
38
+ line to determine untracked and changed files.
39
+
40
+ Git::Branches - Enumerable object that holds Git::Branch objects. You can call .local or .remote
41
+ on it to filter to just your local or remote branches.
42
+
43
+ Git::Remote - A reference to a remote repository that is tracked by this repository.
44
+
45
+ Git::Log - An Enumerable object that references all the Git::Object::Commit objects that encompass
46
+ your log query, which can be constructed through methods on the Git::Log object, like:
47
+
48
+ @git.log(20).object("HEAD^").since("2 weeks ago").between('v2.6', 'v2.7').each { |commit| [block] }
49
+
22
50
 
23
51
  = Examples
24
52
 
@@ -176,3 +204,44 @@ And here are the operations that will need to write to your git repository.
176
204
 
177
205
  g.push
178
206
  g.push(g.remote('name'))
207
+
208
+
209
+ Some examples of more low-level index and tree operations
210
+
211
+ g.with_temp_index do
212
+
213
+ g.read_tree(tree3) # calls self.index.read_tree
214
+ g.read_tree(tree1, :prefix => 'hi/')
215
+
216
+ c = g.commit_tree('message')
217
+ # or #
218
+ t = g.write_tree
219
+ c = g.commit_tree(t, :message => 'message', :parents => [sha1, sha2])
220
+
221
+ g.branch('branch_name').update_ref(c)
222
+ g.update_ref(branch, c)
223
+
224
+ g.with_temp_working do # new blank working directory
225
+ g.checkout
226
+ g.checkout(another_index)
227
+ g.commit # commits to temp_index
228
+ end
229
+ end
230
+
231
+ g.set_index('/path/to/index')
232
+
233
+
234
+ g.with_index(path) do
235
+ # calls set_index, then switches back after
236
+ end
237
+
238
+ g.with_working(dir) do
239
+ # calls set_working, then switches back after
240
+ end
241
+
242
+ g.with_temp_working(dir) do
243
+ g.checkout_index(:prefix => dir, :path_limiter => path)
244
+ # do file work
245
+ g.commit # commits to index
246
+ end
247
+
@@ -55,6 +55,10 @@
55
55
  <tr class="top-aligned-row">
56
56
  <td><strong>In:</strong></td>
57
57
  <td>
58
+ <a href="../files/lib/git/author_rb.html">
59
+ lib/git/author.rb
60
+ </a>
61
+ <br />
58
62
  <a href="../files/lib/git/base_rb.html">
59
63
  lib/git/base.rb
60
64
  </a>
@@ -124,6 +128,31 @@
124
128
 
125
129
  <div id="contextContent">
126
130
 
131
+ <div id="description">
132
+ <p>
133
+ <a href="Git.html">Git</a>/Ruby Library
134
+ </p>
135
+ <p>
136
+ This provides bindings for working with git in complex interactions,
137
+ including branching and merging, object inspection and manipulation,
138
+ history, patch generation and more. You should be able to do most
139
+ fundamental git operations with this library.
140
+ </p>
141
+ <p>
142
+ This module provides the basic functions to open a git reference to work
143
+ with. You can open a working directory, open a bare repository, initialize
144
+ a new repo or clone an existing remote repository.
145
+ </p>
146
+ <table>
147
+ <tr><td valign="top"><a href="Git/Author.html">Author</a>:</td><td>Scott Chacon (<a href="mailto:schacon@gmail.com">schacon@gmail.com</a>)
148
+
149
+ </td></tr>
150
+ <tr><td valign="top">License:</td><td>MIT License
151
+
152
+ </td></tr>
153
+ </table>
154
+
155
+ </div>
127
156
 
128
157
 
129
158
  </div>
@@ -149,7 +178,8 @@
149
178
  <div id="class-list">
150
179
  <h3 class="section-bar">Classes and Modules</h3>
151
180
 
152
- Class <a href="Git/Base.html" class="link">Git::Base</a><br />
181
+ Class <a href="Git/Author.html" class="link">Git::Author</a><br />
182
+ Class <a href="Git/Base.html" class="link">Git::Base</a><br />
153
183
  Class <a href="Git/Branch.html" class="link">Git::Branch</a><br />
154
184
  Class <a href="Git/Branches.html" class="link">Git::Branches</a><br />
155
185
  Class <a href="Git/Diff.html" class="link">Git::Diff</a><br />
@@ -175,7 +205,7 @@ Class <a href="Git/WorkingDirectory.html" class="link">Git::WorkingDirectory</a>
175
205
  <tr class="top-aligned-row context-row">
176
206
  <td class="context-item-name">VERSION</td>
177
207
  <td>=</td>
178
- <td class="context-item-value">'1.0.1'</td>
208
+ <td class="context-item-value">'1.0.3'</td>
179
209
  </tr>
180
210
  </table>
181
211
  </div>
@@ -200,11 +230,19 @@ Class <a href="Git/WorkingDirectory.html" class="link">Git::WorkingDirectory</a>
200
230
  </div>
201
231
 
202
232
  <div class="method-description">
233
+ <p>
234
+ open a bare repository
235
+ </p>
236
+ <p>
237
+ this takes the path to a bare git repo it expects not to be able to use a
238
+ working directory so you can&#8217;t checkout stuff, commit things, etc.
239
+ but you can do most read operations
240
+ </p>
203
241
  <p><a class="source-toggle" href="#"
204
242
  onclick="toggleCode('M000001-source');return false;">[Source]</a></p>
205
243
  <div class="method-source-code" id="M000001-source">
206
244
  <pre>
207
- <span class="ruby-comment cmt"># File lib/git.rb, line 36</span>
245
+ <span class="ruby-comment cmt"># File lib/git.rb, line 51</span>
208
246
  <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">bare</span>(<span class="ruby-identifier">git_dir</span>)
209
247
  <span class="ruby-constant">Base</span>.<span class="ruby-identifier">bare</span>(<span class="ruby-identifier">git_dir</span>)
210
248
  <span class="ruby-keyword kw">end</span>
@@ -223,11 +261,28 @@ Class <a href="Git/WorkingDirectory.html" class="link">Git::WorkingDirectory</a>
223
261
  </div>
224
262
 
225
263
  <div class="method-description">
264
+ <p>
265
+ clones a remote repository
266
+ </p>
267
+ <p>
268
+ options
269
+ </p>
270
+ <pre>
271
+ :bare =&gt; true (does a bare clone)
272
+ :repository =&gt; '/path/to/alt_git_dir'
273
+ :index =&gt; '/path/to/alt_index_file'
274
+ </pre>
275
+ <p>
276
+ example
277
+ </p>
278
+ <pre>
279
+ Git.clone('git://repo.or.cz/rubygit.git', 'clone.git', :bare =&gt; true)
280
+ </pre>
226
281
  <p><a class="source-toggle" href="#"
227
282
  onclick="toggleCode('M000004-source');return false;">[Source]</a></p>
228
283
  <div class="method-source-code" id="M000004-source">
229
284
  <pre>
230
- <span class="ruby-comment cmt"># File lib/git.rb, line 48</span>
285
+ <span class="ruby-comment cmt"># File lib/git.rb, line 88</span>
231
286
  <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">clone</span>(<span class="ruby-identifier">repository</span>, <span class="ruby-identifier">name</span>, <span class="ruby-identifier">options</span> = {})
232
287
  <span class="ruby-constant">Base</span>.<span class="ruby-identifier">clone</span>(<span class="ruby-identifier">repository</span>, <span class="ruby-identifier">name</span>, <span class="ruby-identifier">options</span>)
233
288
  <span class="ruby-keyword kw">end</span>
@@ -246,11 +301,21 @@ Class <a href="Git/WorkingDirectory.html" class="link">Git::WorkingDirectory</a>
246
301
  </div>
247
302
 
248
303
  <div class="method-description">
304
+ <p>
305
+ initialize a new git repository, defaults to the current working directory
306
+ </p>
307
+ <p>
308
+ options
309
+ </p>
310
+ <pre>
311
+ :repository =&gt; '/path/to/alt_git_dir'
312
+ :index =&gt; '/path/to/alt_index_file'
313
+ </pre>
249
314
  <p><a class="source-toggle" href="#"
250
315
  onclick="toggleCode('M000003-source');return false;">[Source]</a></p>
251
316
  <div class="method-source-code" id="M000003-source">
252
317
  <pre>
253
- <span class="ruby-comment cmt"># File lib/git.rb, line 44</span>
318
+ <span class="ruby-comment cmt"># File lib/git.rb, line 74</span>
254
319
  <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">init</span>(<span class="ruby-identifier">working_dir</span> = <span class="ruby-value str">'.'</span>, <span class="ruby-identifier">options</span> = {})
255
320
  <span class="ruby-constant">Base</span>.<span class="ruby-identifier">init</span>(<span class="ruby-identifier">working_dir</span>, <span class="ruby-identifier">options</span>)
256
321
  <span class="ruby-keyword kw">end</span>
@@ -269,11 +334,27 @@ Class <a href="Git/WorkingDirectory.html" class="link">Git::WorkingDirectory</a>
269
334
  </div>
270
335
 
271
336
  <div class="method-description">
337
+ <p>
338
+ open an existing git working directory
339
+ </p>
340
+ <p>
341
+ this will most likely be the most common way to create a git reference,
342
+ referring to a working directory. if not provided in the options, the
343
+ library will assume your git_dir and index are in the default place (.git/,
344
+ .git/index)
345
+ </p>
346
+ <p>
347
+ options
348
+ </p>
349
+ <pre>
350
+ :repository =&gt; '/path/to/alt_git_dir'
351
+ :index =&gt; '/path/to/alt_index_file'
352
+ </pre>
272
353
  <p><a class="source-toggle" href="#"
273
354
  onclick="toggleCode('M000002-source');return false;">[Source]</a></p>
274
355
  <div class="method-source-code" id="M000002-source">
275
356
  <pre>
276
- <span class="ruby-comment cmt"># File lib/git.rb, line 40</span>
357
+ <span class="ruby-comment cmt"># File lib/git.rb, line 65</span>
277
358
  <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">open</span>(<span class="ruby-identifier">working_dir</span>, <span class="ruby-identifier">options</span> = {})
278
359
  <span class="ruby-constant">Base</span>.<span class="ruby-identifier">open</span>(<span class="ruby-identifier">working_dir</span>, <span class="ruby-identifier">options</span>)
279
360
  <span class="ruby-keyword kw">end</span>
@@ -0,0 +1,175 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
+ <head>
8
+ <title>Class: Git::Author</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
+ <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
12
+ <script type="text/javascript">
13
+ // <![CDATA[
14
+
15
+ function popupCode( url ) {
16
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
+ }
18
+
19
+ function toggleCode( id ) {
20
+ if ( document.getElementById )
21
+ elem = document.getElementById( id );
22
+ else if ( document.all )
23
+ elem = eval( "document.all." + id );
24
+ else
25
+ return false;
26
+
27
+ elemStyle = elem.style;
28
+
29
+ if ( elemStyle.display != "block" ) {
30
+ elemStyle.display = "block"
31
+ } else {
32
+ elemStyle.display = "none"
33
+ }
34
+
35
+ return true;
36
+ }
37
+
38
+ // Make codeblocks hidden by default
39
+ document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
+
41
+ // ]]>
42
+ </script>
43
+
44
+ </head>
45
+ <body>
46
+
47
+
48
+
49
+ <div id="classHeader">
50
+ <table class="header-table">
51
+ <tr class="top-aligned-row">
52
+ <td><strong>Class</strong></td>
53
+ <td class="class-name-in-header">Git::Author</td>
54
+ </tr>
55
+ <tr class="top-aligned-row">
56
+ <td><strong>In:</strong></td>
57
+ <td>
58
+ <a href="../../files/lib/git/author_rb.html">
59
+ lib/git/author.rb
60
+ </a>
61
+ <br />
62
+ </td>
63
+ </tr>
64
+
65
+ <tr class="top-aligned-row">
66
+ <td><strong>Parent:</strong></td>
67
+ <td>
68
+ <a href="Object.html">
69
+ Object
70
+ </a>
71
+ </td>
72
+ </tr>
73
+ </table>
74
+ </div>
75
+ <!-- banner header -->
76
+
77
+ <div id="bodyContent">
78
+
79
+
80
+
81
+ <div id="contextContent">
82
+
83
+
84
+
85
+ </div>
86
+
87
+ <div id="method-list">
88
+ <h3 class="section-bar">Methods</h3>
89
+
90
+ <div class="name-list">
91
+ <a href="#M000024">new</a>&nbsp;&nbsp;
92
+ </div>
93
+ </div>
94
+
95
+ </div>
96
+
97
+
98
+ <!-- if includes -->
99
+
100
+ <div id="section">
101
+
102
+
103
+
104
+
105
+
106
+ <div id="attribute-list">
107
+ <h3 class="section-bar">Attributes</h3>
108
+
109
+ <div class="name-list">
110
+ <table>
111
+ <tr class="top-aligned-row context-row">
112
+ <td class="context-item-name">date</td>
113
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
114
+ <td class="context-item-desc"></td>
115
+ </tr>
116
+ <tr class="top-aligned-row context-row">
117
+ <td class="context-item-name">email</td>
118
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
119
+ <td class="context-item-desc"></td>
120
+ </tr>
121
+ <tr class="top-aligned-row context-row">
122
+ <td class="context-item-name">name</td>
123
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
124
+ <td class="context-item-desc"></td>
125
+ </tr>
126
+ </table>
127
+ </div>
128
+ </div>
129
+
130
+
131
+
132
+ <!-- if method_list -->
133
+ <div id="methods">
134
+ <h3 class="section-bar">Public Class methods</h3>
135
+
136
+ <div id="method-M000024" class="method-detail">
137
+ <a name="M000024"></a>
138
+
139
+ <div class="method-heading">
140
+ <a href="#M000024" class="method-signature">
141
+ <span class="method-name">new</span><span class="method-args">(author_string)</span>
142
+ </a>
143
+ </div>
144
+
145
+ <div class="method-description">
146
+ <p><a class="source-toggle" href="#"
147
+ onclick="toggleCode('M000024-source');return false;">[Source]</a></p>
148
+ <div class="method-source-code" id="M000024-source">
149
+ <pre>
150
+ <span class="ruby-comment cmt"># File lib/git/author.rb, line 5</span>
151
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">author_string</span>)
152
+ <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">m</span> = <span class="ruby-regexp re">/(.*?) &lt;(.*?)&gt; (\d+) (.*)/</span>.<span class="ruby-identifier">match</span>(<span class="ruby-identifier">author_string</span>)
153
+ <span class="ruby-ivar">@name</span> = <span class="ruby-identifier">m</span>[<span class="ruby-value">1</span>]
154
+ <span class="ruby-ivar">@email</span> = <span class="ruby-identifier">m</span>[<span class="ruby-value">2</span>]
155
+ <span class="ruby-ivar">@date</span> = <span class="ruby-constant">Time</span>.<span class="ruby-identifier">at</span>(<span class="ruby-identifier">m</span>[<span class="ruby-value">3</span>].<span class="ruby-identifier">to_i</span>)
156
+ <span class="ruby-keyword kw">end</span>
157
+ <span class="ruby-keyword kw">end</span>
158
+ </pre>
159
+ </div>
160
+ </div>
161
+ </div>
162
+
163
+
164
+ </div>
165
+
166
+
167
+ </div>
168
+
169
+
170
+ <div id="validator-badges">
171
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
172
+ </div>
173
+
174
+ </body>
175
+ </html>
@@ -88,48 +88,62 @@
88
88
  <h3 class="section-bar">Methods</h3>
89
89
 
90
90
  <div class="name-list">
91
- <a href="#M000100">add</a>&nbsp;&nbsp;
92
- <a href="#M000112">add_remote</a>&nbsp;&nbsp;
93
- <a href="#M000115">add_tag</a>&nbsp;&nbsp;
94
- <a href="#M000077">bare</a>&nbsp;&nbsp;
95
- <a href="#M000095">branch</a>&nbsp;&nbsp;
96
- <a href="#M000094">branches</a>&nbsp;&nbsp;
97
- <a href="#M000085">chdir</a>&nbsp;&nbsp;
98
- <a href="#M000106">checkout</a>&nbsp;&nbsp;
99
- <a href="#M000080">clone</a>&nbsp;&nbsp;
100
- <a href="#M000104">commit</a>&nbsp;&nbsp;
101
- <a href="#M000105">commit_all</a>&nbsp;&nbsp;
102
- <a href="#M000087">config</a>&nbsp;&nbsp;
103
- <a href="#M000118">current_branch</a>&nbsp;&nbsp;
104
- <a href="#M000099">diff</a>&nbsp;&nbsp;
105
- <a href="#M000082">dir</a>&nbsp;&nbsp;
106
- <a href="#M000107">fetch</a>&nbsp;&nbsp;
107
- <a href="#M000091">gblob</a>&nbsp;&nbsp;
108
- <a href="#M000090">gcommit</a>&nbsp;&nbsp;
109
- <a href="#M000098">grep</a>&nbsp;&nbsp;
110
- <a href="#M000089">gtree</a>&nbsp;&nbsp;
111
- <a href="#M000084">index</a>&nbsp;&nbsp;
112
- <a href="#M000079">init</a>&nbsp;&nbsp;
113
- <a href="#M000097">lib</a>&nbsp;&nbsp;
114
- <a href="#M000092">log</a>&nbsp;&nbsp;
115
- <a href="#M000109">merge</a>&nbsp;&nbsp;
116
- <a href="#M000081">new</a>&nbsp;&nbsp;
117
- <a href="#M000088">object</a>&nbsp;&nbsp;
118
- <a href="#M000078">open</a>&nbsp;&nbsp;
119
- <a href="#M000110">pull</a>&nbsp;&nbsp;
120
- <a href="#M000108">push</a>&nbsp;&nbsp;
121
- <a href="#M000096">remote</a>&nbsp;&nbsp;
122
- <a href="#M000111">remotes</a>&nbsp;&nbsp;
123
- <a href="#M000101">remove</a>&nbsp;&nbsp;
124
- <a href="#M000116">repack</a>&nbsp;&nbsp;
125
- <a href="#M000083">repo</a>&nbsp;&nbsp;
126
- <a href="#M000086">repo_size</a>&nbsp;&nbsp;
127
- <a href="#M000102">reset</a>&nbsp;&nbsp;
128
- <a href="#M000103">reset_hard</a>&nbsp;&nbsp;
129
- <a href="#M000117">revparse</a>&nbsp;&nbsp;
130
- <a href="#M000093">status</a>&nbsp;&nbsp;
131
- <a href="#M000114">tag</a>&nbsp;&nbsp;
132
- <a href="#M000113">tags</a>&nbsp;&nbsp;
91
+ <a href="#M000114">add</a>&nbsp;&nbsp;
92
+ <a href="#M000126">add_remote</a>&nbsp;&nbsp;
93
+ <a href="#M000129">add_tag</a>&nbsp;&nbsp;
94
+ <a href="#M000130">archive</a>&nbsp;&nbsp;
95
+ <a href="#M000089">bare</a>&nbsp;&nbsp;
96
+ <a href="#M000109">branch</a>&nbsp;&nbsp;
97
+ <a href="#M000108">branches</a>&nbsp;&nbsp;
98
+ <a href="#M000099">chdir</a>&nbsp;&nbsp;
99
+ <a href="#M000120">checkout</a>&nbsp;&nbsp;
100
+ <a href="#M000134">checkout_index</a>&nbsp;&nbsp;
101
+ <a href="#M000092">clone</a>&nbsp;&nbsp;
102
+ <a href="#M000118">commit</a>&nbsp;&nbsp;
103
+ <a href="#M000119">commit_all</a>&nbsp;&nbsp;
104
+ <a href="#M000137">commit_tree</a>&nbsp;&nbsp;
105
+ <a href="#M000101">config</a>&nbsp;&nbsp;
106
+ <a href="#M000144">current_branch</a>&nbsp;&nbsp;
107
+ <a href="#M000113">diff</a>&nbsp;&nbsp;
108
+ <a href="#M000094">dir</a>&nbsp;&nbsp;
109
+ <a href="#M000121">fetch</a>&nbsp;&nbsp;
110
+ <a href="#M000105">gblob</a>&nbsp;&nbsp;
111
+ <a href="#M000104">gcommit</a>&nbsp;&nbsp;
112
+ <a href="#M000112">grep</a>&nbsp;&nbsp;
113
+ <a href="#M000103">gtree</a>&nbsp;&nbsp;
114
+ <a href="#M000096">index</a>&nbsp;&nbsp;
115
+ <a href="#M000091">init</a>&nbsp;&nbsp;
116
+ <a href="#M000111">lib</a>&nbsp;&nbsp;
117
+ <a href="#M000106">log</a>&nbsp;&nbsp;
118
+ <a href="#M000140">ls_files</a>&nbsp;&nbsp;
119
+ <a href="#M000123">merge</a>&nbsp;&nbsp;
120
+ <a href="#M000093">new</a>&nbsp;&nbsp;
121
+ <a href="#M000102">object</a>&nbsp;&nbsp;
122
+ <a href="#M000090">open</a>&nbsp;&nbsp;
123
+ <a href="#M000124">pull</a>&nbsp;&nbsp;
124
+ <a href="#M000122">push</a>&nbsp;&nbsp;
125
+ <a href="#M000135">read_tree</a>&nbsp;&nbsp;
126
+ <a href="#M000110">remote</a>&nbsp;&nbsp;
127
+ <a href="#M000125">remotes</a>&nbsp;&nbsp;
128
+ <a href="#M000115">remove</a>&nbsp;&nbsp;
129
+ <a href="#M000131">repack</a>&nbsp;&nbsp;
130
+ <a href="#M000095">repo</a>&nbsp;&nbsp;
131
+ <a href="#M000100">repo_size</a>&nbsp;&nbsp;
132
+ <a href="#M000116">reset</a>&nbsp;&nbsp;
133
+ <a href="#M000117">reset_hard</a>&nbsp;&nbsp;
134
+ <a href="#M000143">revparse</a>&nbsp;&nbsp;
135
+ <a href="#M000098">set_index</a>&nbsp;&nbsp;
136
+ <a href="#M000097">set_working</a>&nbsp;&nbsp;
137
+ <a href="#M000107">status</a>&nbsp;&nbsp;
138
+ <a href="#M000128">tag</a>&nbsp;&nbsp;
139
+ <a href="#M000127">tags</a>&nbsp;&nbsp;
140
+ <a href="#M000139">update_ref</a>&nbsp;&nbsp;
141
+ <a href="#M000132">with_index</a>&nbsp;&nbsp;
142
+ <a href="#M000133">with_temp_index</a>&nbsp;&nbsp;
143
+ <a href="#M000142">with_temp_working</a>&nbsp;&nbsp;
144
+ <a href="#M000141">with_working</a>&nbsp;&nbsp;
145
+ <a href="#M000138">write_and_commit_tree</a>&nbsp;&nbsp;
146
+ <a href="#M000136">write_tree</a>&nbsp;&nbsp;
133
147
  </div>
134
148
  </div>
135
149
 
@@ -151,11 +165,11 @@
151
165
  <div id="methods">
152
166
  <h3 class="section-bar">Public Class methods</h3>
153
167
 
154
- <div id="method-M000077" class="method-detail">
155
- <a name="M000077"></a>
168
+ <div id="method-M000089" class="method-detail">
169
+ <a name="M000089"></a>
156
170
 
157
171
  <div class="method-heading">
158
- <a href="#M000077" class="method-signature">
172
+ <a href="#M000089" class="method-signature">
159
173
  <span class="method-name">bare</span><span class="method-args">(git_dir)</span>
160
174
  </a>
161
175
  </div>
@@ -166,10 +180,10 @@ opens a bare <a href="../Git.html">Git</a> <a
166
180
  href="Repository.html">Repository</a> - no working directory options
167
181
  </p>
168
182
  <p><a class="source-toggle" href="#"
169
- onclick="toggleCode('M000077-source');return false;">[Source]</a></p>
170
- <div class="method-source-code" id="M000077-source">
183
+ onclick="toggleCode('M000089-source');return false;">[Source]</a></p>
184
+ <div class="method-source-code" id="M000089-source">
171
185
  <pre>
172
- <span class="ruby-comment cmt"># File lib/git/base.rb, line 10</span>
186
+ <span class="ruby-comment cmt"># File lib/git/base.rb, line 12</span>
173
187
  <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">bare</span>(<span class="ruby-identifier">git_dir</span>)
174
188
  <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">new</span> <span class="ruby-identifier">:repository</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">git_dir</span>
175
189
  <span class="ruby-keyword kw">end</span>
@@ -178,11 +192,11 @@ href="Repository.html">Repository</a> - no working directory options
178
192
  </div>
179
193
  </div>
180
194
 
181
- <div id="method-M000080" class="method-detail">
182
- <a name="M000080"></a>
195
+ <div id="method-M000092" class="method-detail">
196
+ <a name="M000092"></a>
183
197
 
184
198
  <div class="method-heading">
185
- <a href="#M000080" class="method-signature">
199
+ <a href="#M000092" class="method-signature">
186
200
  <span class="method-name">clone</span><span class="method-args">(repository, name, opts = {})</span>
187
201
  </a>
188
202
  </div>
@@ -207,10 +221,10 @@ options:
207
221
  :index_file
208
222
  </pre>
209
223
  <p><a class="source-toggle" href="#"
210
- onclick="toggleCode('M000080-source');return false;">[Source]</a></p>
211
- <div class="method-source-code" id="M000080-source">
224
+ onclick="toggleCode('M000092-source');return false;">[Source]</a></p>
225
+ <div class="method-source-code" id="M000092-source">
212
226
  <pre>
213
- <span class="ruby-comment cmt"># File lib/git/base.rb, line 58</span>
227
+ <span class="ruby-comment cmt"># File lib/git/base.rb, line 60</span>
214
228
  <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">clone</span>(<span class="ruby-identifier">repository</span>, <span class="ruby-identifier">name</span>, <span class="ruby-identifier">opts</span> = {})
215
229
  <span class="ruby-comment cmt"># run git-clone </span>
216
230
  <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">new</span>(<span class="ruby-constant">Git</span><span class="ruby-operator">::</span><span class="ruby-constant">Lib</span>.<span class="ruby-identifier">new</span>.<span class="ruby-identifier">clone</span>(<span class="ruby-identifier">repository</span>, <span class="ruby-identifier">name</span>, <span class="ruby-identifier">opts</span>))
@@ -220,11 +234,11 @@ options:
220
234
  </div>
221
235
  </div>
222
236
 
223
- <div id="method-M000079" class="method-detail">
224
- <a name="M000079"></a>
237
+ <div id="method-M000091" class="method-detail">
238
+ <a name="M000091"></a>
225
239
 
226
240
  <div class="method-heading">
227
- <a href="#M000079" class="method-signature">
241
+ <a href="#M000091" class="method-signature">
228
242
  <span class="method-name">init</span><span class="method-args">(working_dir, opts = {})</span>
229
243
  </a>
230
244
  </div>
@@ -241,10 +255,10 @@ options:
241
255
  :index_file
242
256
  </pre>
243
257
  <p><a class="source-toggle" href="#"
244
- onclick="toggleCode('M000079-source');return false;">[Source]</a></p>
245
- <div class="method-source-code" id="M000079-source">
258
+ onclick="toggleCode('M000091-source');return false;">[Source]</a></p>
259
+ <div class="method-source-code" id="M000091-source">
246
260
  <pre>
247
- <span class="ruby-comment cmt"># File lib/git/base.rb, line 29</span>
261
+ <span class="ruby-comment cmt"># File lib/git/base.rb, line 31</span>
248
262
  <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">init</span>(<span class="ruby-identifier">working_dir</span>, <span class="ruby-identifier">opts</span> = {})
249
263
  <span class="ruby-identifier">default</span> = {<span class="ruby-identifier">:working_directory</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">working_dir</span>,
250
264
  <span class="ruby-identifier">:repository</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-identifier">working_dir</span>, <span class="ruby-value str">'.git'</span>)}
@@ -265,21 +279,21 @@ options:
265
279
  </div>
266
280
  </div>
267
281
 
268
- <div id="method-M000081" class="method-detail">
269
- <a name="M000081"></a>
282
+ <div id="method-M000093" class="method-detail">
283
+ <a name="M000093"></a>
270
284
 
271
285
  <div class="method-heading">
272
- <a href="#M000081" class="method-signature">
286
+ <a href="#M000093" class="method-signature">
273
287
  <span class="method-name">new</span><span class="method-args">(options = {})</span>
274
288
  </a>
275
289
  </div>
276
290
 
277
291
  <div class="method-description">
278
292
  <p><a class="source-toggle" href="#"
279
- onclick="toggleCode('M000081-source');return false;">[Source]</a></p>
280
- <div class="method-source-code" id="M000081-source">
293
+ onclick="toggleCode('M000093-source');return false;">[Source]</a></p>
294
+ <div class="method-source-code" id="M000093-source">
281
295
  <pre>
282
- <span class="ruby-comment cmt"># File lib/git/base.rb, line 63</span>
296
+ <span class="ruby-comment cmt"># File lib/git/base.rb, line 65</span>
283
297
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">options</span> = {})
284
298
  <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">working_dir</span> = <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:working_directory</span>]
285
299
  <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:repository</span>] = <span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-identifier">working_dir</span>, <span class="ruby-value str">'.git'</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">options</span>[<span class="ruby-identifier">:repository</span>]
@@ -295,11 +309,11 @@ options:
295
309
  </div>
296
310
  </div>
297
311
 
298
- <div id="method-M000078" class="method-detail">
299
- <a name="M000078"></a>
312
+ <div id="method-M000090" class="method-detail">
313
+ <a name="M000090"></a>
300
314
 
301
315
  <div class="method-heading">
302
- <a href="#M000078" class="method-signature">
316
+ <a href="#M000090" class="method-signature">
303
317
  <span class="method-name">open</span><span class="method-args">(working_dir, opts={})</span>
304
318
  </a>
305
319
  </div>
@@ -310,10 +324,10 @@ opens a new <a href="../Git.html">Git</a> Project from a working directory
310
324
  you can specify non-standard git_dir and index file in the options
311
325
  </p>
312
326
  <p><a class="source-toggle" href="#"
313
- onclick="toggleCode('M000078-source');return false;">[Source]</a></p>
314
- <div class="method-source-code" id="M000078-source">
327
+ onclick="toggleCode('M000090-source');return false;">[Source]</a></p>
328
+ <div class="method-source-code" id="M000090-source">
315
329
  <pre>
316
- <span class="ruby-comment cmt"># File lib/git/base.rb, line 16</span>
330
+ <span class="ruby-comment cmt"># File lib/git/base.rb, line 18</span>
317
331
  <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">open</span>(<span class="ruby-identifier">working_dir</span>, <span class="ruby-identifier">opts</span>={})
318
332
  <span class="ruby-identifier">default</span> = {<span class="ruby-identifier">:working_directory</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">working_dir</span>}
319
333
  <span class="ruby-identifier">git_options</span> = <span class="ruby-identifier">default</span>.<span class="ruby-identifier">merge</span>(<span class="ruby-identifier">opts</span>)
@@ -327,11 +341,11 @@ you can specify non-standard git_dir and index file in the options
327
341
 
328
342
  <h3 class="section-bar">Public Instance methods</h3>
329
343
 
330
- <div id="method-M000100" class="method-detail">
331
- <a name="M000100"></a>
344
+ <div id="method-M000114" class="method-detail">
345
+ <a name="M000114"></a>
332
346
 
333
347
  <div class="method-heading">
334
- <a href="#M000100" class="method-signature">
348
+ <a href="#M000114" class="method-signature">
335
349
  <span class="method-name">add</span><span class="method-args">(path = '.')</span>
336
350
  </a>
337
351
  </div>
@@ -341,10 +355,10 @@ you can specify non-standard git_dir and index file in the options
341
355
  adds files from the working directory to the git repository
342
356
  </p>
343
357
  <p><a class="source-toggle" href="#"
344
- onclick="toggleCode('M000100-source');return false;">[Source]</a></p>
345
- <div class="method-source-code" id="M000100-source">
358
+ onclick="toggleCode('M000114-source');return false;">[Source]</a></p>
359
+ <div class="method-source-code" id="M000114-source">
346
360
  <pre>
347
- <span class="ruby-comment cmt"># File lib/git/base.rb, line 162</span>
361
+ <span class="ruby-comment cmt"># File lib/git/base.rb, line 234</span>
348
362
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add</span>(<span class="ruby-identifier">path</span> = <span class="ruby-value str">'.'</span>)
349
363
  <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">lib</span>.<span class="ruby-identifier">add</span>(<span class="ruby-identifier">path</span>)
350
364
  <span class="ruby-keyword kw">end</span>
@@ -353,21 +367,30 @@ adds files from the working directory to the git repository
353
367
  </div>
354
368
  </div>
355
369
 
356
- <div id="method-M000112" class="method-detail">
357
- <a name="M000112"></a>
370
+ <div id="method-M000126" class="method-detail">
371
+ <a name="M000126"></a>
358
372
 
359
373
  <div class="method-heading">
360
- <a href="#M000112" class="method-signature">
374
+ <a href="#M000126" class="method-signature">
361
375
  <span class="method-name">add_remote</span><span class="method-args">(name, url, opts = {})</span>
362
376
  </a>
363
377
  </div>
364
378
 
365
379
  <div class="method-description">
380
+ <p>
381
+ adds a new remote to this repository url can be a git url or a <a
382
+ href="Base.html">Git::Base</a> object if it&#8217;s a local reference
383
+ </p>
384
+ <pre>
385
+ @git.add_remote('scotts_git', 'git://repo.or.cz/rubygit.git')
386
+ @git.fetch('scotts_git')
387
+ @git.merge('scotts_git/master')
388
+ </pre>
366
389
  <p><a class="source-toggle" href="#"
367
- onclick="toggleCode('M000112-source');return false;">[Source]</a></p>
368
- <div class="method-source-code" id="M000112-source">
390
+ onclick="toggleCode('M000126-source');return false;">[Source]</a></p>
391
+ <div class="method-source-code" id="M000126-source">
369
392
  <pre>
370
- <span class="ruby-comment cmt"># File lib/git/base.rb, line 213</span>
393
+ <span class="ruby-comment cmt"># File lib/git/base.rb, line 312</span>
371
394
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_remote</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">url</span>, <span class="ruby-identifier">opts</span> = {})
372
395
  <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">url</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Git</span><span class="ruby-operator">::</span><span class="ruby-constant">Base</span>)
373
396
  <span class="ruby-identifier">url</span> = <span class="ruby-identifier">url</span>.<span class="ruby-identifier">repo</span>.<span class="ruby-identifier">path</span>
@@ -380,21 +403,24 @@ adds files from the working directory to the git repository
380
403
  </div>
381
404
  </div>
382
405
 
383
- <div id="method-M000115" class="method-detail">
384
- <a name="M000115"></a>
406
+ <div id="method-M000129" class="method-detail">
407
+ <a name="M000129"></a>
385
408
 
386
409
  <div class="method-heading">
387
- <a href="#M000115" class="method-signature">
410
+ <a href="#M000129" class="method-signature">
388
411
  <span class="method-name">add_tag</span><span class="method-args">(tag_name)</span>
389
412
  </a>
390
413
  </div>
391
414
 
392
415
  <div class="method-description">
416
+ <p>
417
+ creates a new git tag (Git::Tag)
418
+ </p>
393
419
  <p><a class="source-toggle" href="#"
394
- onclick="toggleCode('M000115-source');return false;">[Source]</a></p>
395
- <div class="method-source-code" id="M000115-source">
420
+ onclick="toggleCode('M000129-source');return false;">[Source]</a></p>
421
+ <div class="method-source-code" id="M000129-source">
396
422
  <pre>
397
- <span class="ruby-comment cmt"># File lib/git/base.rb, line 229</span>
423
+ <span class="ruby-comment cmt"># File lib/git/base.rb, line 331</span>
398
424
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_tag</span>(<span class="ruby-identifier">tag_name</span>)
399
425
  <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">lib</span>.<span class="ruby-identifier">tag</span>(<span class="ruby-identifier">tag_name</span>)
400
426
  <span class="ruby-identifier">tag</span>(<span class="ruby-identifier">tag_name</span>)
@@ -404,21 +430,50 @@ adds files from the working directory to the git repository
404
430
  </div>
405
431
  </div>
406
432
 
407
- <div id="method-M000095" class="method-detail">
408
- <a name="M000095"></a>
433
+ <div id="method-M000130" class="method-detail">
434
+ <a name="M000130"></a>
409
435
 
410
436
  <div class="method-heading">
411
- <a href="#M000095" class="method-signature">
437
+ <a href="#M000130" class="method-signature">
438
+ <span class="method-name">archive</span><span class="method-args">(treeish, file = nil, opts = {})</span>
439
+ </a>
440
+ </div>
441
+
442
+ <div class="method-description">
443
+ <p>
444
+ creates an archive file of the given tree-ish
445
+ </p>
446
+ <p><a class="source-toggle" href="#"
447
+ onclick="toggleCode('M000130-source');return false;">[Source]</a></p>
448
+ <div class="method-source-code" id="M000130-source">
449
+ <pre>
450
+ <span class="ruby-comment cmt"># File lib/git/base.rb, line 337</span>
451
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">archive</span>(<span class="ruby-identifier">treeish</span>, <span class="ruby-identifier">file</span> = <span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">opts</span> = {})
452
+ <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">object</span>(<span class="ruby-identifier">treeish</span>).<span class="ruby-identifier">archive</span>(<span class="ruby-identifier">file</span>, <span class="ruby-identifier">opts</span>)
453
+ <span class="ruby-keyword kw">end</span>
454
+ </pre>
455
+ </div>
456
+ </div>
457
+ </div>
458
+
459
+ <div id="method-M000109" class="method-detail">
460
+ <a name="M000109"></a>
461
+
462
+ <div class="method-heading">
463
+ <a href="#M000109" class="method-signature">
412
464
  <span class="method-name">branch</span><span class="method-args">(branch_name = 'master')</span>
413
465
  </a>
414
466
  </div>
415
467
 
416
468
  <div class="method-description">
469
+ <p>
470
+ returns a <a href="Branch.html">Git::Branch</a> object for branch_name
471
+ </p>
417
472
  <p><a class="source-toggle" href="#"
418
- onclick="toggleCode('M000095-source');return false;">[Source]</a></p>
419
- <div class="method-source-code" id="M000095-source">
473
+ onclick="toggleCode('M000109-source');return false;">[Source]</a></p>
474
+ <div class="method-source-code" id="M000109-source">
420
475
  <pre>
421
- <span class="ruby-comment cmt"># File lib/git/base.rb, line 140</span>
476
+ <span class="ruby-comment cmt"># File lib/git/base.rb, line 189</span>
422
477
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">branch</span>(<span class="ruby-identifier">branch_name</span> = <span class="ruby-value str">'master'</span>)
423
478
  <span class="ruby-constant">Git</span><span class="ruby-operator">::</span><span class="ruby-constant">Branch</span>.<span class="ruby-identifier">new</span>(<span class="ruby-keyword kw">self</span>, <span class="ruby-identifier">branch_name</span>)
424
479
  <span class="ruby-keyword kw">end</span>
@@ -427,21 +482,25 @@ adds files from the working directory to the git repository
427
482
  </div>
428
483
  </div>
429
484
 
430
- <div id="method-M000094" class="method-detail">
431
- <a name="M000094"></a>
485
+ <div id="method-M000108" class="method-detail">
486
+ <a name="M000108"></a>
432
487
 
433
488
  <div class="method-heading">
434
- <a href="#M000094" class="method-signature">
489
+ <a href="#M000108" class="method-signature">
435
490
  <span class="method-name">branches</span><span class="method-args">()</span>
436
491
  </a>
437
492
  </div>
438
493
 
439
494
  <div class="method-description">
495
+ <p>
496
+ returns a <a href="Branches.html">Git::Branches</a> object of all the <a
497
+ href="Branch.html">Git::Branch</a> objects for this repo
498
+ </p>
440
499
  <p><a class="source-toggle" href="#"
441
- onclick="toggleCode('M000094-source');return false;">[Source]</a></p>
442
- <div class="method-source-code" id="M000094-source">
500
+ onclick="toggleCode('M000108-source');return false;">[Source]</a></p>
501
+ <div class="method-source-code" id="M000108-source">
443
502
  <pre>
444
- <span class="ruby-comment cmt"># File lib/git/base.rb, line 136</span>
503
+ <span class="ruby-comment cmt"># File lib/git/base.rb, line 184</span>
445
504
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">branches</span>
446
505
  <span class="ruby-constant">Git</span><span class="ruby-operator">::</span><span class="ruby-constant">Branches</span>.<span class="ruby-identifier">new</span>(<span class="ruby-keyword kw">self</span>)
447
506
  <span class="ruby-keyword kw">end</span>
@@ -450,21 +509,34 @@ adds files from the working directory to the git repository
450
509
  </div>
451
510
  </div>
452
511
 
453
- <div id="method-M000085" class="method-detail">
454
- <a name="M000085"></a>
512
+ <div id="method-M000099" class="method-detail">
513
+ <a name="M000099"></a>
455
514
 
456
515
  <div class="method-heading">
457
- <a href="#M000085" class="method-signature">
516
+ <a href="#M000099" class="method-signature">
458
517
  <span class="method-name">chdir</span><span class="method-args">() {|dir.path| ...}</span>
459
518
  </a>
460
519
  </div>
461
520
 
462
521
  <div class="method-description">
522
+ <p>
523
+ changes current working directory for a block to the git working directory
524
+ </p>
525
+ <p>
526
+ example
527
+ </p>
528
+ <pre>
529
+ @git.chdir do
530
+ # write files
531
+ @git.add
532
+ @git.commit('message')
533
+ end
534
+ </pre>
463
535
  <p><a class="source-toggle" href="#"
464
- onclick="toggleCode('M000085-source');return false;">[Source]</a></p>
465
- <div class="method-source-code" id="M000085-source">
536
+ onclick="toggleCode('M000099-source');return false;">[Source]</a></p>
537
+ <div class="method-source-code" id="M000099-source">
466
538
  <pre>
467
- <span class="ruby-comment cmt"># File lib/git/base.rb, line 87</span>
539
+ <span class="ruby-comment cmt"># File lib/git/base.rb, line 115</span>
468
540
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">chdir</span>
469
541
  <span class="ruby-constant">Dir</span>.<span class="ruby-identifier">chdir</span>(<span class="ruby-identifier">dir</span>.<span class="ruby-identifier">path</span>) <span class="ruby-keyword kw">do</span>
470
542
  <span class="ruby-keyword kw">yield</span> <span class="ruby-identifier">dir</span>.<span class="ruby-identifier">path</span>
@@ -475,21 +547,24 @@ adds files from the working directory to the git repository
475
547
  </div>
476
548
  </div>
477
549
 
478
- <div id="method-M000106" class="method-detail">
479
- <a name="M000106"></a>
550
+ <div id="method-M000120" class="method-detail">
551
+ <a name="M000120"></a>
480
552
 
481
553
  <div class="method-heading">
482
- <a href="#M000106" class="method-signature">
554
+ <a href="#M000120" class="method-signature">
483
555
  <span class="method-name">checkout</span><span class="method-args">(branch = 'master', opts = {})</span>
484
556
  </a>
485
557
  </div>
486
558
 
487
559
  <div class="method-description">
560
+ <p>
561
+ checks out a branch as the new git working directory
562
+ </p>
488
563
  <p><a class="source-toggle" href="#"
489
- onclick="toggleCode('M000106-source');return false;">[Source]</a></p>
490
- <div class="method-source-code" id="M000106-source">
564
+ onclick="toggleCode('M000120-source');return false;">[Source]</a></p>
565
+ <div class="method-source-code" id="M000120-source">
491
566
  <pre>
492
- <span class="ruby-comment cmt"># File lib/git/base.rb, line 188</span>
567
+ <span class="ruby-comment cmt"># File lib/git/base.rb, line 268</span>
493
568
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">checkout</span>(<span class="ruby-identifier">branch</span> = <span class="ruby-value str">'master'</span>, <span class="ruby-identifier">opts</span> = {})
494
569
  <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">lib</span>.<span class="ruby-identifier">checkout</span>(<span class="ruby-identifier">branch</span>, <span class="ruby-identifier">opts</span>)
495
570
  <span class="ruby-keyword kw">end</span>
@@ -498,21 +573,47 @@ adds files from the working directory to the git repository
498
573
  </div>
499
574
  </div>
500
575
 
501
- <div id="method-M000104" class="method-detail">
502
- <a name="M000104"></a>
576
+ <div id="method-M000134" class="method-detail">
577
+ <a name="M000134"></a>
503
578
 
504
579
  <div class="method-heading">
505
- <a href="#M000104" class="method-signature">
580
+ <a href="#M000134" class="method-signature">
581
+ <span class="method-name">checkout_index</span><span class="method-args">(opts = {})</span>
582
+ </a>
583
+ </div>
584
+
585
+ <div class="method-description">
586
+ <p><a class="source-toggle" href="#"
587
+ onclick="toggleCode('M000134-source');return false;">[Source]</a></p>
588
+ <div class="method-source-code" id="M000134-source">
589
+ <pre>
590
+ <span class="ruby-comment cmt"># File lib/git/base.rb, line 364</span>
591
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">checkout_index</span>(<span class="ruby-identifier">opts</span> = {})
592
+ <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">lib</span>.<span class="ruby-identifier">checkout_index</span>(<span class="ruby-identifier">opts</span>)
593
+ <span class="ruby-keyword kw">end</span>
594
+ </pre>
595
+ </div>
596
+ </div>
597
+ </div>
598
+
599
+ <div id="method-M000118" class="method-detail">
600
+ <a name="M000118"></a>
601
+
602
+ <div class="method-heading">
603
+ <a href="#M000118" class="method-signature">
506
604
  <span class="method-name">commit</span><span class="method-args">(message, opts = {})</span>
507
605
  </a>
508
606
  </div>
509
607
 
510
608
  <div class="method-description">
609
+ <p>
610
+ commits all pending changes in the index file to the git repository
611
+ </p>
511
612
  <p><a class="source-toggle" href="#"
512
- onclick="toggleCode('M000104-source');return false;">[Source]</a></p>
513
- <div class="method-source-code" id="M000104-source">
613
+ onclick="toggleCode('M000118-source');return false;">[Source]</a></p>
614
+ <div class="method-source-code" id="M000118-source">
514
615
  <pre>
515
- <span class="ruby-comment cmt"># File lib/git/base.rb, line 179</span>
616
+ <span class="ruby-comment cmt"># File lib/git/base.rb, line 255</span>
516
617
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">commit</span>(<span class="ruby-identifier">message</span>, <span class="ruby-identifier">opts</span> = {})
517
618
  <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">lib</span>.<span class="ruby-identifier">commit</span>(<span class="ruby-identifier">message</span>, <span class="ruby-identifier">opts</span>)
518
619
  <span class="ruby-keyword kw">end</span>
@@ -521,21 +622,26 @@ adds files from the working directory to the git repository
521
622
  </div>
522
623
  </div>
523
624
 
524
- <div id="method-M000105" class="method-detail">
525
- <a name="M000105"></a>
625
+ <div id="method-M000119" class="method-detail">
626
+ <a name="M000119"></a>
526
627
 
527
628
  <div class="method-heading">
528
- <a href="#M000105" class="method-signature">
629
+ <a href="#M000119" class="method-signature">
529
630
  <span class="method-name">commit_all</span><span class="method-args">(message, opts = {})</span>
530
631
  </a>
531
632
  </div>
532
633
 
533
634
  <div class="method-description">
635
+ <p>
636
+ commits all pending changes in the index file to the git repository, but
637
+ automatically adds all modified files without having to explicitly calling
638
+ @git.add() on them.
639
+ </p>
534
640
  <p><a class="source-toggle" href="#"
535
- onclick="toggleCode('M000105-source');return false;">[Source]</a></p>
536
- <div class="method-source-code" id="M000105-source">
641
+ onclick="toggleCode('M000119-source');return false;">[Source]</a></p>
642
+ <div class="method-source-code" id="M000119-source">
537
643
  <pre>
538
- <span class="ruby-comment cmt"># File lib/git/base.rb, line 183</span>
644
+ <span class="ruby-comment cmt"># File lib/git/base.rb, line 262</span>
539
645
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">commit_all</span>(<span class="ruby-identifier">message</span>, <span class="ruby-identifier">opts</span> = {})
540
646
  <span class="ruby-identifier">opts</span> = {<span class="ruby-identifier">:add_all</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-keyword kw">true</span>}.<span class="ruby-identifier">merge</span>(<span class="ruby-identifier">opts</span>)
541
647
  <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">lib</span>.<span class="ruby-identifier">commit</span>(<span class="ruby-identifier">message</span>, <span class="ruby-identifier">opts</span>)
@@ -545,11 +651,34 @@ adds files from the working directory to the git repository
545
651
  </div>
546
652
  </div>
547
653
 
548
- <div id="method-M000087" class="method-detail">
549
- <a name="M000087"></a>
654
+ <div id="method-M000137" class="method-detail">
655
+ <a name="M000137"></a>
656
+
657
+ <div class="method-heading">
658
+ <a href="#M000137" class="method-signature">
659
+ <span class="method-name">commit_tree</span><span class="method-args">(tree = nil, opts = {})</span>
660
+ </a>
661
+ </div>
662
+
663
+ <div class="method-description">
664
+ <p><a class="source-toggle" href="#"
665
+ onclick="toggleCode('M000137-source');return false;">[Source]</a></p>
666
+ <div class="method-source-code" id="M000137-source">
667
+ <pre>
668
+ <span class="ruby-comment cmt"># File lib/git/base.rb, line 376</span>
669
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">commit_tree</span>(<span class="ruby-identifier">tree</span> = <span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">opts</span> = {})
670
+ <span class="ruby-constant">Git</span><span class="ruby-operator">::</span><span class="ruby-constant">Object</span><span class="ruby-operator">::</span><span class="ruby-constant">Commit</span>.<span class="ruby-identifier">new</span>(<span class="ruby-keyword kw">self</span>, <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">lib</span>.<span class="ruby-identifier">commit_tree</span>(<span class="ruby-identifier">tree</span>, <span class="ruby-identifier">opts</span>))
671
+ <span class="ruby-keyword kw">end</span>
672
+ </pre>
673
+ </div>
674
+ </div>
675
+ </div>
676
+
677
+ <div id="method-M000101" class="method-detail">
678
+ <a name="M000101"></a>
550
679
 
551
680
  <div class="method-heading">
552
- <a href="#M000087" class="method-signature">
681
+ <a href="#M000101" class="method-signature">
553
682
  <span class="method-name">config</span><span class="method-args">(name = nil, value = nil)</span>
554
683
  </a>
555
684
  </div>
@@ -562,10 +691,10 @@ value g.config(&#8216;user.name&#8217;) # returns &#8216;Scott
562
691
  Chacon&#8217; g.config # returns whole config hash
563
692
  </p>
564
693
  <p><a class="source-toggle" href="#"
565
- onclick="toggleCode('M000087-source');return false;">[Source]</a></p>
566
- <div class="method-source-code" id="M000087-source">
694
+ onclick="toggleCode('M000101-source');return false;">[Source]</a></p>
695
+ <div class="method-source-code" id="M000101-source">
567
696
  <pre>
568
- <span class="ruby-comment cmt"># File lib/git/base.rb, line 105</span>
697
+ <span class="ruby-comment cmt"># File lib/git/base.rb, line 134</span>
569
698
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">config</span>(<span class="ruby-identifier">name</span> = <span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">value</span> = <span class="ruby-keyword kw">nil</span>)
570
699
  <span class="ruby-keyword kw">if</span>(<span class="ruby-identifier">name</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">value</span>)
571
700
  <span class="ruby-comment cmt"># set value</span>
@@ -583,21 +712,24 @@ Chacon&#8217; g.config # returns whole config hash
583
712
  </div>
584
713
  </div>
585
714
 
586
- <div id="method-M000118" class="method-detail">
587
- <a name="M000118"></a>
715
+ <div id="method-M000144" class="method-detail">
716
+ <a name="M000144"></a>
588
717
 
589
718
  <div class="method-heading">
590
- <a href="#M000118" class="method-signature">
719
+ <a href="#M000144" class="method-signature">
591
720
  <span class="method-name">current_branch</span><span class="method-args">()</span>
592
721
  </a>
593
722
  </div>
594
723
 
595
724
  <div class="method-description">
725
+ <p>
726
+ returns the name of the branch the working directory is currently on
727
+ </p>
596
728
  <p><a class="source-toggle" href="#"
597
- onclick="toggleCode('M000118-source');return false;">[Source]</a></p>
598
- <div class="method-source-code" id="M000118-source">
729
+ onclick="toggleCode('M000144-source');return false;">[Source]</a></p>
730
+ <div class="method-source-code" id="M000144-source">
599
731
  <pre>
600
- <span class="ruby-comment cmt"># File lib/git/base.rb, line 244</span>
732
+ <span class="ruby-comment cmt"># File lib/git/base.rb, line 425</span>
601
733
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">current_branch</span>
602
734
  <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">lib</span>.<span class="ruby-identifier">branch_current</span>
603
735
  <span class="ruby-keyword kw">end</span>
@@ -606,21 +738,24 @@ Chacon&#8217; g.config # returns whole config hash
606
738
  </div>
607
739
  </div>
608
740
 
609
- <div id="method-M000099" class="method-detail">
610
- <a name="M000099"></a>
741
+ <div id="method-M000113" class="method-detail">
742
+ <a name="M000113"></a>
611
743
 
612
744
  <div class="method-heading">
613
- <a href="#M000099" class="method-signature">
745
+ <a href="#M000113" class="method-signature">
614
746
  <span class="method-name">diff</span><span class="method-args">(objectish = 'HEAD', obj2 = nil)</span>
615
747
  </a>
616
748
  </div>
617
749
 
618
750
  <div class="method-description">
751
+ <p>
752
+ returns a <a href="Diff.html">Git::Diff</a> object
753
+ </p>
619
754
  <p><a class="source-toggle" href="#"
620
- onclick="toggleCode('M000099-source');return false;">[Source]</a></p>
621
- <div class="method-source-code" id="M000099-source">
755
+ onclick="toggleCode('M000113-source');return false;">[Source]</a></p>
756
+ <div class="method-source-code" id="M000113-source">
622
757
  <pre>
623
- <span class="ruby-comment cmt"># File lib/git/base.rb, line 157</span>
758
+ <span class="ruby-comment cmt"># File lib/git/base.rb, line 229</span>
624
759
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">diff</span>(<span class="ruby-identifier">objectish</span> = <span class="ruby-value str">'HEAD'</span>, <span class="ruby-identifier">obj2</span> = <span class="ruby-keyword kw">nil</span>)
625
760
  <span class="ruby-constant">Git</span><span class="ruby-operator">::</span><span class="ruby-constant">Diff</span>.<span class="ruby-identifier">new</span>(<span class="ruby-keyword kw">self</span>, <span class="ruby-identifier">objectish</span>, <span class="ruby-identifier">obj2</span>)
626
761
  <span class="ruby-keyword kw">end</span>
@@ -629,21 +764,28 @@ Chacon&#8217; g.config # returns whole config hash
629
764
  </div>
630
765
  </div>
631
766
 
632
- <div id="method-M000082" class="method-detail">
633
- <a name="M000082"></a>
767
+ <div id="method-M000094" class="method-detail">
768
+ <a name="M000094"></a>
634
769
 
635
770
  <div class="method-heading">
636
- <a href="#M000082" class="method-signature">
771
+ <a href="#M000094" class="method-signature">
637
772
  <span class="method-name">dir</span><span class="method-args">()</span>
638
773
  </a>
639
774
  </div>
640
775
 
641
776
  <div class="method-description">
777
+ <p>
778
+ returns a reference to the working directory
779
+ </p>
780
+ <pre>
781
+ @git.dir.path
782
+ @git.dir.writeable?
783
+ </pre>
642
784
  <p><a class="source-toggle" href="#"
643
- onclick="toggleCode('M000082-source');return false;">[Source]</a></p>
644
- <div class="method-source-code" id="M000082-source">
785
+ onclick="toggleCode('M000094-source');return false;">[Source]</a></p>
786
+ <div class="method-source-code" id="M000094-source">
645
787
  <pre>
646
- <span class="ruby-comment cmt"># File lib/git/base.rb, line 75</span>
788
+ <span class="ruby-comment cmt"># File lib/git/base.rb, line 80</span>
647
789
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">dir</span>
648
790
  <span class="ruby-ivar">@working_directory</span>
649
791
  <span class="ruby-keyword kw">end</span>
@@ -652,21 +794,25 @@ Chacon&#8217; g.config # returns whole config hash
652
794
  </div>
653
795
  </div>
654
796
 
655
- <div id="method-M000107" class="method-detail">
656
- <a name="M000107"></a>
797
+ <div id="method-M000121" class="method-detail">
798
+ <a name="M000121"></a>
657
799
 
658
800
  <div class="method-heading">
659
- <a href="#M000107" class="method-signature">
801
+ <a href="#M000121" class="method-signature">
660
802
  <span class="method-name">fetch</span><span class="method-args">(remote = 'origin')</span>
661
803
  </a>
662
804
  </div>
663
805
 
664
806
  <div class="method-description">
807
+ <p>
808
+ fetches changes from a remote branch - this does not modify the working
809
+ directory, it just gets the changes from the remote if there are any
810
+ </p>
665
811
  <p><a class="source-toggle" href="#"
666
- onclick="toggleCode('M000107-source');return false;">[Source]</a></p>
667
- <div class="method-source-code" id="M000107-source">
812
+ onclick="toggleCode('M000121-source');return false;">[Source]</a></p>
813
+ <div class="method-source-code" id="M000121-source">
668
814
  <pre>
669
- <span class="ruby-comment cmt"># File lib/git/base.rb, line 192</span>
815
+ <span class="ruby-comment cmt"># File lib/git/base.rb, line 274</span>
670
816
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">fetch</span>(<span class="ruby-identifier">remote</span> = <span class="ruby-value str">'origin'</span>)
671
817
  <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">lib</span>.<span class="ruby-identifier">fetch</span>(<span class="ruby-identifier">remote</span>)
672
818
  <span class="ruby-keyword kw">end</span>
@@ -675,49 +821,95 @@ Chacon&#8217; g.config # returns whole config hash
675
821
  </div>
676
822
  </div>
677
823
 
678
- <div id="method-M000091" class="method-detail">
679
- <a name="M000091"></a>
824
+ <div id="method-M000105" class="method-detail">
825
+ <a name="M000105"></a>
680
826
 
681
827
  <div class="method-heading">
828
+ <a href="#M000105" class="method-signature">
682
829
  <span class="method-name">gblob</span><span class="method-args">(objectish)</span>
830
+ </a>
683
831
  </div>
684
832
 
685
833
  <div class="method-description">
686
- <p>
687
- Alias for <a href="Base.html#M000088">object</a>
688
- </p>
834
+ <p><a class="source-toggle" href="#"
835
+ onclick="toggleCode('M000105-source');return false;">[Source]</a></p>
836
+ <div class="method-source-code" id="M000105-source">
837
+ <pre>
838
+ <span class="ruby-comment cmt"># File lib/git/base.rb, line 169</span>
839
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">gblob</span>(<span class="ruby-identifier">objectish</span>)
840
+ <span class="ruby-constant">Git</span><span class="ruby-operator">::</span><span class="ruby-constant">Object</span>.<span class="ruby-identifier">new</span>(<span class="ruby-keyword kw">self</span>, <span class="ruby-identifier">objectish</span>, <span class="ruby-value str">'blob'</span>)
841
+ <span class="ruby-keyword kw">end</span>
842
+ </pre>
843
+ </div>
689
844
  </div>
690
845
  </div>
691
846
 
692
- <div id="method-M000090" class="method-detail">
693
- <a name="M000090"></a>
847
+ <div id="method-M000104" class="method-detail">
848
+ <a name="M000104"></a>
694
849
 
695
850
  <div class="method-heading">
851
+ <a href="#M000104" class="method-signature">
696
852
  <span class="method-name">gcommit</span><span class="method-args">(objectish)</span>
853
+ </a>
697
854
  </div>
698
855
 
699
856
  <div class="method-description">
700
- <p>
701
- Alias for <a href="Base.html#M000088">object</a>
702
- </p>
857
+ <p><a class="source-toggle" href="#"
858
+ onclick="toggleCode('M000104-source');return false;">[Source]</a></p>
859
+ <div class="method-source-code" id="M000104-source">
860
+ <pre>
861
+ <span class="ruby-comment cmt"># File lib/git/base.rb, line 165</span>
862
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">gcommit</span>(<span class="ruby-identifier">objectish</span>)
863
+ <span class="ruby-constant">Git</span><span class="ruby-operator">::</span><span class="ruby-constant">Object</span>.<span class="ruby-identifier">new</span>(<span class="ruby-keyword kw">self</span>, <span class="ruby-identifier">objectish</span>, <span class="ruby-value str">'commit'</span>)
864
+ <span class="ruby-keyword kw">end</span>
865
+ </pre>
866
+ </div>
703
867
  </div>
704
868
  </div>
705
869
 
706
- <div id="method-M000098" class="method-detail">
707
- <a name="M000098"></a>
870
+ <div id="method-M000112" class="method-detail">
871
+ <a name="M000112"></a>
708
872
 
709
873
  <div class="method-heading">
710
- <a href="#M000098" class="method-signature">
874
+ <a href="#M000112" class="method-signature">
711
875
  <span class="method-name">grep</span><span class="method-args">(string)</span>
712
876
  </a>
713
877
  </div>
714
878
 
715
879
  <div class="method-description">
880
+ <p>
881
+ will run a grep for &#8216;string&#8217; on the HEAD of the git repository
882
+ </p>
883
+ <p>
884
+ to be more surgical in your grep, you can call grep() off a specific git
885
+ object. for example:
886
+ </p>
887
+ <pre>
888
+ @git.object(&quot;v2.3&quot;).grep('TODO')
889
+ </pre>
890
+ <p>
891
+ in any case, it returns a hash of arrays of the type:
892
+ </p>
893
+ <pre>
894
+ hsh[tree-ish] = [[line_no, match], [line_no, match2]]
895
+ hsh[tree-ish] = [[line_no, match], [line_no, match2]]
896
+ </pre>
897
+ <p>
898
+ so you might use it like this:
899
+ </p>
900
+ <pre>
901
+ @git.grep(&quot;TODO&quot;).each do |sha, arr|
902
+ puts &quot;in blob #{sha}:&quot;
903
+ arr.each do |match|
904
+ puts &quot;\t line #{match[0]}: '#{match[1]}'&quot;
905
+ end
906
+ end
907
+ </pre>
716
908
  <p><a class="source-toggle" href="#"
717
- onclick="toggleCode('M000098-source');return false;">[Source]</a></p>
718
- <div class="method-source-code" id="M000098-source">
909
+ onclick="toggleCode('M000112-source');return false;">[Source]</a></p>
910
+ <div class="method-source-code" id="M000112-source">
719
911
  <pre>
720
- <span class="ruby-comment cmt"># File lib/git/base.rb, line 153</span>
912
+ <span class="ruby-comment cmt"># File lib/git/base.rb, line 224</span>
721
913
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">grep</span>(<span class="ruby-identifier">string</span>)
722
914
  <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">object</span>(<span class="ruby-value str">'HEAD'</span>).<span class="ruby-identifier">grep</span>(<span class="ruby-identifier">string</span>)
723
915
  <span class="ruby-keyword kw">end</span>
@@ -726,35 +918,47 @@ Alias for <a href="Base.html#M000088">object</a>
726
918
  </div>
727
919
  </div>
728
920
 
729
- <div id="method-M000089" class="method-detail">
730
- <a name="M000089"></a>
921
+ <div id="method-M000103" class="method-detail">
922
+ <a name="M000103"></a>
731
923
 
732
924
  <div class="method-heading">
925
+ <a href="#M000103" class="method-signature">
733
926
  <span class="method-name">gtree</span><span class="method-args">(objectish)</span>
927
+ </a>
734
928
  </div>
735
929
 
736
930
  <div class="method-description">
737
- <p>
738
- Alias for <a href="Base.html#M000088">object</a>
739
- </p>
740
- </div>
741
- </div>
931
+ <p><a class="source-toggle" href="#"
932
+ onclick="toggleCode('M000103-source');return false;">[Source]</a></p>
933
+ <div class="method-source-code" id="M000103-source">
934
+ <pre>
935
+ <span class="ruby-comment cmt"># File lib/git/base.rb, line 161</span>
936
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">gtree</span>(<span class="ruby-identifier">objectish</span>)
937
+ <span class="ruby-constant">Git</span><span class="ruby-operator">::</span><span class="ruby-constant">Object</span>.<span class="ruby-identifier">new</span>(<span class="ruby-keyword kw">self</span>, <span class="ruby-identifier">objectish</span>, <span class="ruby-value str">'tree'</span>)
938
+ <span class="ruby-keyword kw">end</span>
939
+ </pre>
940
+ </div>
941
+ </div>
942
+ </div>
742
943
 
743
- <div id="method-M000084" class="method-detail">
744
- <a name="M000084"></a>
944
+ <div id="method-M000096" class="method-detail">
945
+ <a name="M000096"></a>
745
946
 
746
947
  <div class="method-heading">
747
- <a href="#M000084" class="method-signature">
948
+ <a href="#M000096" class="method-signature">
748
949
  <span class="method-name">index</span><span class="method-args">()</span>
749
950
  </a>
750
951
  </div>
751
952
 
752
953
  <div class="method-description">
954
+ <p>
955
+ returns reference to the git index file
956
+ </p>
753
957
  <p><a class="source-toggle" href="#"
754
- onclick="toggleCode('M000084-source');return false;">[Source]</a></p>
755
- <div class="method-source-code" id="M000084-source">
958
+ onclick="toggleCode('M000096-source');return false;">[Source]</a></p>
959
+ <div class="method-source-code" id="M000096-source">
756
960
  <pre>
757
- <span class="ruby-comment cmt"># File lib/git/base.rb, line 83</span>
961
+ <span class="ruby-comment cmt"># File lib/git/base.rb, line 91</span>
758
962
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">index</span>
759
963
  <span class="ruby-ivar">@index</span>
760
964
  <span class="ruby-keyword kw">end</span>
@@ -763,44 +967,53 @@ Alias for <a href="Base.html#M000088">object</a>
763
967
  </div>
764
968
  </div>
765
969
 
766
- <div id="method-M000097" class="method-detail">
767
- <a name="M000097"></a>
970
+ <div id="method-M000111" class="method-detail">
971
+ <a name="M000111"></a>
768
972
 
769
973
  <div class="method-heading">
770
- <a href="#M000097" class="method-signature">
974
+ <a href="#M000111" class="method-signature">
771
975
  <span class="method-name">lib</span><span class="method-args">()</span>
772
976
  </a>
773
977
  </div>
774
978
 
775
979
  <div class="method-description">
980
+ <p>
981
+ this is a convenience method for accessing the class that wraps all the
982
+ actual &#8216;git&#8217; forked system calls. At some point I hope to
983
+ replace the <a href="Lib.html">Git::Lib</a> class with one that uses native
984
+ methods or libgit C bindings
985
+ </p>
776
986
  <p><a class="source-toggle" href="#"
777
- onclick="toggleCode('M000097-source');return false;">[Source]</a></p>
778
- <div class="method-source-code" id="M000097-source">
987
+ onclick="toggleCode('M000111-source');return false;">[Source]</a></p>
988
+ <div class="method-source-code" id="M000111-source">
779
989
  <pre>
780
- <span class="ruby-comment cmt"># File lib/git/base.rb, line 149</span>
990
+ <span class="ruby-comment cmt"># File lib/git/base.rb, line 201</span>
781
991
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">lib</span>
782
- <span class="ruby-constant">Git</span><span class="ruby-operator">::</span><span class="ruby-constant">Lib</span>.<span class="ruby-identifier">new</span>(<span class="ruby-keyword kw">self</span>)
992
+ <span class="ruby-ivar">@lib</span> <span class="ruby-operator">||=</span> <span class="ruby-constant">Git</span><span class="ruby-operator">::</span><span class="ruby-constant">Lib</span>.<span class="ruby-identifier">new</span>(<span class="ruby-keyword kw">self</span>)
783
993
  <span class="ruby-keyword kw">end</span>
784
994
  </pre>
785
995
  </div>
786
996
  </div>
787
997
  </div>
788
998
 
789
- <div id="method-M000092" class="method-detail">
790
- <a name="M000092"></a>
999
+ <div id="method-M000106" class="method-detail">
1000
+ <a name="M000106"></a>
791
1001
 
792
1002
  <div class="method-heading">
793
- <a href="#M000092" class="method-signature">
1003
+ <a href="#M000106" class="method-signature">
794
1004
  <span class="method-name">log</span><span class="method-args">(count = 30)</span>
795
1005
  </a>
796
1006
  </div>
797
1007
 
798
1008
  <div class="method-description">
1009
+ <p>
1010
+ returns a <a href="Log.html">Git::Log</a> object with count commits
1011
+ </p>
799
1012
  <p><a class="source-toggle" href="#"
800
- onclick="toggleCode('M000092-source');return false;">[Source]</a></p>
801
- <div class="method-source-code" id="M000092-source">
1013
+ onclick="toggleCode('M000106-source');return false;">[Source]</a></p>
1014
+ <div class="method-source-code" id="M000106-source">
802
1015
  <pre>
803
- <span class="ruby-comment cmt"># File lib/git/base.rb, line 128</span>
1016
+ <span class="ruby-comment cmt"># File lib/git/base.rb, line 174</span>
804
1017
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">log</span>(<span class="ruby-identifier">count</span> = <span class="ruby-value">30</span>)
805
1018
  <span class="ruby-constant">Git</span><span class="ruby-operator">::</span><span class="ruby-constant">Log</span>.<span class="ruby-identifier">new</span>(<span class="ruby-keyword kw">self</span>, <span class="ruby-identifier">count</span>)
806
1019
  <span class="ruby-keyword kw">end</span>
@@ -809,21 +1022,51 @@ Alias for <a href="Base.html#M000088">object</a>
809
1022
  </div>
810
1023
  </div>
811
1024
 
812
- <div id="method-M000109" class="method-detail">
813
- <a name="M000109"></a>
1025
+ <div id="method-M000140" class="method-detail">
1026
+ <a name="M000140"></a>
814
1027
 
815
1028
  <div class="method-heading">
816
- <a href="#M000109" class="method-signature">
1029
+ <a href="#M000140" class="method-signature">
1030
+ <span class="method-name">ls_files</span><span class="method-args">()</span>
1031
+ </a>
1032
+ </div>
1033
+
1034
+ <div class="method-description">
1035
+ <p><a class="source-toggle" href="#"
1036
+ onclick="toggleCode('M000140-source');return false;">[Source]</a></p>
1037
+ <div class="method-source-code" id="M000140-source">
1038
+ <pre>
1039
+ <span class="ruby-comment cmt"># File lib/git/base.rb, line 390</span>
1040
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">ls_files</span>
1041
+ <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">lib</span>.<span class="ruby-identifier">ls_files</span>
1042
+ <span class="ruby-keyword kw">end</span>
1043
+ </pre>
1044
+ </div>
1045
+ </div>
1046
+ </div>
1047
+
1048
+ <div id="method-M000123" class="method-detail">
1049
+ <a name="M000123"></a>
1050
+
1051
+ <div class="method-heading">
1052
+ <a href="#M000123" class="method-signature">
817
1053
  <span class="method-name">merge</span><span class="method-args">(branch, message = 'merge')</span>
818
1054
  </a>
819
1055
  </div>
820
1056
 
821
1057
  <div class="method-description">
1058
+ <p>
1059
+ merges one or more branches into the current working branch
1060
+ </p>
1061
+ <p>
1062
+ you can specify more than one branch to merge by passing an array of
1063
+ branches
1064
+ </p>
822
1065
  <p><a class="source-toggle" href="#"
823
- onclick="toggleCode('M000109-source');return false;">[Source]</a></p>
824
- <div class="method-source-code" id="M000109-source">
1066
+ onclick="toggleCode('M000123-source');return false;">[Source]</a></p>
1067
+ <div class="method-source-code" id="M000123-source">
825
1068
  <pre>
826
- <span class="ruby-comment cmt"># File lib/git/base.rb, line 200</span>
1069
+ <span class="ruby-comment cmt"># File lib/git/base.rb, line 290</span>
827
1070
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">merge</span>(<span class="ruby-identifier">branch</span>, <span class="ruby-identifier">message</span> = <span class="ruby-value str">'merge'</span>)
828
1071
  <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">lib</span>.<span class="ruby-identifier">merge</span>(<span class="ruby-identifier">branch</span>, <span class="ruby-identifier">message</span>)
829
1072
  <span class="ruby-keyword kw">end</span>
@@ -832,24 +1075,32 @@ Alias for <a href="Base.html#M000088">object</a>
832
1075
  </div>
833
1076
  </div>
834
1077
 
835
- <div id="method-M000088" class="method-detail">
836
- <a name="M000088"></a>
1078
+ <div id="method-M000102" class="method-detail">
1079
+ <a name="M000102"></a>
837
1080
 
838
1081
  <div class="method-heading">
839
- <a href="#M000088" class="method-signature">
1082
+ <a href="#M000102" class="method-signature">
840
1083
  <span class="method-name">object</span><span class="method-args">(objectish)</span>
841
1084
  </a>
842
1085
  </div>
843
1086
 
844
1087
  <div class="method-description">
845
1088
  <p>
846
- factory methods
1089
+ returns a <a href="Object.html">Git::Object</a> of the appropriate type you
1090
+ can also call @git.gtree(&#8216;tree&#8217;), but that&#8217;s just for
1091
+ readability. If you call @git.gtree(&#8216;HEAD&#8217;) it will still
1092
+ return a <a href="Object/Commit.html">Git::Object::Commit</a> object.
1093
+ </p>
1094
+ <p>
1095
+ @git.object calls a factory method that will run a rev-parse on the
1096
+ objectish and determine the type of the object and return an appropriate
1097
+ object for that type
847
1098
  </p>
848
1099
  <p><a class="source-toggle" href="#"
849
- onclick="toggleCode('M000088-source');return false;">[Source]</a></p>
850
- <div class="method-source-code" id="M000088-source">
1100
+ onclick="toggleCode('M000102-source');return false;">[Source]</a></p>
1101
+ <div class="method-source-code" id="M000102-source">
851
1102
  <pre>
852
- <span class="ruby-comment cmt"># File lib/git/base.rb, line 120</span>
1103
+ <span class="ruby-comment cmt"># File lib/git/base.rb, line 157</span>
853
1104
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">object</span>(<span class="ruby-identifier">objectish</span>)
854
1105
  <span class="ruby-constant">Git</span><span class="ruby-operator">::</span><span class="ruby-constant">Object</span>.<span class="ruby-identifier">new</span>(<span class="ruby-keyword kw">self</span>, <span class="ruby-identifier">objectish</span>)
855
1106
  <span class="ruby-keyword kw">end</span>
@@ -858,21 +1109,25 @@ factory methods
858
1109
  </div>
859
1110
  </div>
860
1111
 
861
- <div id="method-M000110" class="method-detail">
862
- <a name="M000110"></a>
1112
+ <div id="method-M000124" class="method-detail">
1113
+ <a name="M000124"></a>
863
1114
 
864
1115
  <div class="method-heading">
865
- <a href="#M000110" class="method-signature">
1116
+ <a href="#M000124" class="method-signature">
866
1117
  <span class="method-name">pull</span><span class="method-args">(remote = 'origin', branch = 'master', message = 'origin pull')</span>
867
1118
  </a>
868
1119
  </div>
869
1120
 
870
1121
  <div class="method-description">
1122
+ <p>
1123
+ fetches a branch from a remote and merges it into the current working
1124
+ branch
1125
+ </p>
871
1126
  <p><a class="source-toggle" href="#"
872
- onclick="toggleCode('M000110-source');return false;">[Source]</a></p>
873
- <div class="method-source-code" id="M000110-source">
1127
+ onclick="toggleCode('M000124-source');return false;">[Source]</a></p>
1128
+ <div class="method-source-code" id="M000124-source">
874
1129
  <pre>
875
- <span class="ruby-comment cmt"># File lib/git/base.rb, line 204</span>
1130
+ <span class="ruby-comment cmt"># File lib/git/base.rb, line 295</span>
876
1131
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">pull</span>(<span class="ruby-identifier">remote</span> = <span class="ruby-value str">'origin'</span>, <span class="ruby-identifier">branch</span> = <span class="ruby-value str">'master'</span>, <span class="ruby-identifier">message</span> = <span class="ruby-value str">'origin pull'</span>)
877
1132
  <span class="ruby-identifier">fetch</span>(<span class="ruby-identifier">remote</span>)
878
1133
  <span class="ruby-identifier">merge</span>(<span class="ruby-identifier">branch</span>, <span class="ruby-identifier">message</span>)
@@ -882,21 +1137,29 @@ factory methods
882
1137
  </div>
883
1138
  </div>
884
1139
 
885
- <div id="method-M000108" class="method-detail">
886
- <a name="M000108"></a>
1140
+ <div id="method-M000122" class="method-detail">
1141
+ <a name="M000122"></a>
887
1142
 
888
1143
  <div class="method-heading">
889
- <a href="#M000108" class="method-signature">
1144
+ <a href="#M000122" class="method-signature">
890
1145
  <span class="method-name">push</span><span class="method-args">(remote = 'origin', branch = 'master')</span>
891
1146
  </a>
892
1147
  </div>
893
1148
 
894
1149
  <div class="method-description">
1150
+ <p>
1151
+ pushes changes to a remote repository - easiest if this is a cloned
1152
+ repository, otherwise you may have to run something like this first to
1153
+ setup the push parameters:
1154
+ </p>
1155
+ <pre>
1156
+ @git.config('remote.remote-name.push', 'refs/heads/master:refs/heads/master')
1157
+ </pre>
895
1158
  <p><a class="source-toggle" href="#"
896
- onclick="toggleCode('M000108-source');return false;">[Source]</a></p>
897
- <div class="method-source-code" id="M000108-source">
1159
+ onclick="toggleCode('M000122-source');return false;">[Source]</a></p>
1160
+ <div class="method-source-code" id="M000122-source">
898
1161
  <pre>
899
- <span class="ruby-comment cmt"># File lib/git/base.rb, line 196</span>
1162
+ <span class="ruby-comment cmt"># File lib/git/base.rb, line 283</span>
900
1163
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">push</span>(<span class="ruby-identifier">remote</span> = <span class="ruby-value str">'origin'</span>, <span class="ruby-identifier">branch</span> = <span class="ruby-value str">'master'</span>)
901
1164
  <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">lib</span>.<span class="ruby-identifier">push</span>(<span class="ruby-identifier">remote</span>, <span class="ruby-identifier">branch</span>)
902
1165
  <span class="ruby-keyword kw">end</span>
@@ -905,21 +1168,47 @@ factory methods
905
1168
  </div>
906
1169
  </div>
907
1170
 
908
- <div id="method-M000096" class="method-detail">
909
- <a name="M000096"></a>
1171
+ <div id="method-M000135" class="method-detail">
1172
+ <a name="M000135"></a>
910
1173
 
911
1174
  <div class="method-heading">
912
- <a href="#M000096" class="method-signature">
1175
+ <a href="#M000135" class="method-signature">
1176
+ <span class="method-name">read_tree</span><span class="method-args">(treeish, opts = {})</span>
1177
+ </a>
1178
+ </div>
1179
+
1180
+ <div class="method-description">
1181
+ <p><a class="source-toggle" href="#"
1182
+ onclick="toggleCode('M000135-source');return false;">[Source]</a></p>
1183
+ <div class="method-source-code" id="M000135-source">
1184
+ <pre>
1185
+ <span class="ruby-comment cmt"># File lib/git/base.rb, line 368</span>
1186
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">read_tree</span>(<span class="ruby-identifier">treeish</span>, <span class="ruby-identifier">opts</span> = {})
1187
+ <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">lib</span>.<span class="ruby-identifier">read_tree</span>(<span class="ruby-identifier">treeish</span>, <span class="ruby-identifier">opts</span>)
1188
+ <span class="ruby-keyword kw">end</span>
1189
+ </pre>
1190
+ </div>
1191
+ </div>
1192
+ </div>
1193
+
1194
+ <div id="method-M000110" class="method-detail">
1195
+ <a name="M000110"></a>
1196
+
1197
+ <div class="method-heading">
1198
+ <a href="#M000110" class="method-signature">
913
1199
  <span class="method-name">remote</span><span class="method-args">(remote_name = 'origin')</span>
914
1200
  </a>
915
1201
  </div>
916
1202
 
917
1203
  <div class="method-description">
1204
+ <p>
1205
+ returns a <a href="Remote.html">Git::Remote</a> object
1206
+ </p>
918
1207
  <p><a class="source-toggle" href="#"
919
- onclick="toggleCode('M000096-source');return false;">[Source]</a></p>
920
- <div class="method-source-code" id="M000096-source">
1208
+ onclick="toggleCode('M000110-source');return false;">[Source]</a></p>
1209
+ <div class="method-source-code" id="M000110-source">
921
1210
  <pre>
922
- <span class="ruby-comment cmt"># File lib/git/base.rb, line 144</span>
1211
+ <span class="ruby-comment cmt"># File lib/git/base.rb, line 194</span>
923
1212
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">remote</span>(<span class="ruby-identifier">remote_name</span> = <span class="ruby-value str">'origin'</span>)
924
1213
  <span class="ruby-constant">Git</span><span class="ruby-operator">::</span><span class="ruby-constant">Remote</span>.<span class="ruby-identifier">new</span>(<span class="ruby-keyword kw">self</span>, <span class="ruby-identifier">remote_name</span>)
925
1214
  <span class="ruby-keyword kw">end</span>
@@ -928,21 +1217,25 @@ factory methods
928
1217
  </div>
929
1218
  </div>
930
1219
 
931
- <div id="method-M000111" class="method-detail">
932
- <a name="M000111"></a>
1220
+ <div id="method-M000125" class="method-detail">
1221
+ <a name="M000125"></a>
933
1222
 
934
1223
  <div class="method-heading">
935
- <a href="#M000111" class="method-signature">
1224
+ <a href="#M000125" class="method-signature">
936
1225
  <span class="method-name">remotes</span><span class="method-args">()</span>
937
1226
  </a>
938
1227
  </div>
939
1228
 
940
1229
  <div class="method-description">
1230
+ <p>
1231
+ returns an array of <a href="../Git.html">Git</a>:<a
1232
+ href="Remote.html">Remote</a> objects
1233
+ </p>
941
1234
  <p><a class="source-toggle" href="#"
942
- onclick="toggleCode('M000111-source');return false;">[Source]</a></p>
943
- <div class="method-source-code" id="M000111-source">
1235
+ onclick="toggleCode('M000125-source');return false;">[Source]</a></p>
1236
+ <div class="method-source-code" id="M000125-source">
944
1237
  <pre>
945
- <span class="ruby-comment cmt"># File lib/git/base.rb, line 209</span>
1238
+ <span class="ruby-comment cmt"># File lib/git/base.rb, line 301</span>
946
1239
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">remotes</span>
947
1240
  <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">lib</span>.<span class="ruby-identifier">remotes</span>.<span class="ruby-identifier">map</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">r</span><span class="ruby-operator">|</span> <span class="ruby-constant">Git</span><span class="ruby-operator">::</span><span class="ruby-constant">Remote</span>.<span class="ruby-identifier">new</span>(<span class="ruby-keyword kw">self</span>, <span class="ruby-identifier">r</span>) }
948
1241
  <span class="ruby-keyword kw">end</span>
@@ -951,21 +1244,24 @@ factory methods
951
1244
  </div>
952
1245
  </div>
953
1246
 
954
- <div id="method-M000101" class="method-detail">
955
- <a name="M000101"></a>
1247
+ <div id="method-M000115" class="method-detail">
1248
+ <a name="M000115"></a>
956
1249
 
957
1250
  <div class="method-heading">
958
- <a href="#M000101" class="method-signature">
1251
+ <a href="#M000115" class="method-signature">
959
1252
  <span class="method-name">remove</span><span class="method-args">(path = '.', opts = {})</span>
960
1253
  </a>
961
1254
  </div>
962
1255
 
963
1256
  <div class="method-description">
1257
+ <p>
1258
+ removes file(s) from the git repository
1259
+ </p>
964
1260
  <p><a class="source-toggle" href="#"
965
- onclick="toggleCode('M000101-source');return false;">[Source]</a></p>
966
- <div class="method-source-code" id="M000101-source">
1261
+ onclick="toggleCode('M000115-source');return false;">[Source]</a></p>
1262
+ <div class="method-source-code" id="M000115-source">
967
1263
  <pre>
968
- <span class="ruby-comment cmt"># File lib/git/base.rb, line 166</span>
1264
+ <span class="ruby-comment cmt"># File lib/git/base.rb, line 239</span>
969
1265
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">remove</span>(<span class="ruby-identifier">path</span> = <span class="ruby-value str">'.'</span>, <span class="ruby-identifier">opts</span> = {})
970
1266
  <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">lib</span>.<span class="ruby-identifier">remove</span>(<span class="ruby-identifier">path</span>, <span class="ruby-identifier">opts</span>)
971
1267
  <span class="ruby-keyword kw">end</span>
@@ -974,24 +1270,24 @@ factory methods
974
1270
  </div>
975
1271
  </div>
976
1272
 
977
- <div id="method-M000116" class="method-detail">
978
- <a name="M000116"></a>
1273
+ <div id="method-M000131" class="method-detail">
1274
+ <a name="M000131"></a>
979
1275
 
980
1276
  <div class="method-heading">
981
- <a href="#M000116" class="method-signature">
1277
+ <a href="#M000131" class="method-signature">
982
1278
  <span class="method-name">repack</span><span class="method-args">()</span>
983
1279
  </a>
984
1280
  </div>
985
1281
 
986
1282
  <div class="method-description">
987
1283
  <p>
988
- convenience methods
1284
+ repacks the repository
989
1285
  </p>
990
1286
  <p><a class="source-toggle" href="#"
991
- onclick="toggleCode('M000116-source');return false;">[Source]</a></p>
992
- <div class="method-source-code" id="M000116-source">
1287
+ onclick="toggleCode('M000131-source');return false;">[Source]</a></p>
1288
+ <div class="method-source-code" id="M000131-source">
993
1289
  <pre>
994
- <span class="ruby-comment cmt"># File lib/git/base.rb, line 236</span>
1290
+ <span class="ruby-comment cmt"># File lib/git/base.rb, line 342</span>
995
1291
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">repack</span>
996
1292
  <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">lib</span>.<span class="ruby-identifier">repack</span>
997
1293
  <span class="ruby-keyword kw">end</span>
@@ -1000,21 +1296,27 @@ convenience methods
1000
1296
  </div>
1001
1297
  </div>
1002
1298
 
1003
- <div id="method-M000083" class="method-detail">
1004
- <a name="M000083"></a>
1299
+ <div id="method-M000095" class="method-detail">
1300
+ <a name="M000095"></a>
1005
1301
 
1006
1302
  <div class="method-heading">
1007
- <a href="#M000083" class="method-signature">
1303
+ <a href="#M000095" class="method-signature">
1008
1304
  <span class="method-name">repo</span><span class="method-args">()</span>
1009
1305
  </a>
1010
1306
  </div>
1011
1307
 
1012
1308
  <div class="method-description">
1309
+ <p>
1310
+ returns reference to the git repository directory
1311
+ </p>
1312
+ <pre>
1313
+ @git.dir.path
1314
+ </pre>
1013
1315
  <p><a class="source-toggle" href="#"
1014
- onclick="toggleCode('M000083-source');return false;">[Source]</a></p>
1015
- <div class="method-source-code" id="M000083-source">
1316
+ onclick="toggleCode('M000095-source');return false;">[Source]</a></p>
1317
+ <div class="method-source-code" id="M000095-source">
1016
1318
  <pre>
1017
- <span class="ruby-comment cmt"># File lib/git/base.rb, line 79</span>
1319
+ <span class="ruby-comment cmt"># File lib/git/base.rb, line 86</span>
1018
1320
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">repo</span>
1019
1321
  <span class="ruby-ivar">@repository</span>
1020
1322
  <span class="ruby-keyword kw">end</span>
@@ -1023,21 +1325,24 @@ convenience methods
1023
1325
  </div>
1024
1326
  </div>
1025
1327
 
1026
- <div id="method-M000086" class="method-detail">
1027
- <a name="M000086"></a>
1328
+ <div id="method-M000100" class="method-detail">
1329
+ <a name="M000100"></a>
1028
1330
 
1029
1331
  <div class="method-heading">
1030
- <a href="#M000086" class="method-signature">
1332
+ <a href="#M000100" class="method-signature">
1031
1333
  <span class="method-name">repo_size</span><span class="method-args">()</span>
1032
1334
  </a>
1033
1335
  </div>
1034
1336
 
1035
1337
  <div class="method-description">
1338
+ <p>
1339
+ returns the repository size in bytes
1340
+ </p>
1036
1341
  <p><a class="source-toggle" href="#"
1037
- onclick="toggleCode('M000086-source');return false;">[Source]</a></p>
1038
- <div class="method-source-code" id="M000086-source">
1342
+ onclick="toggleCode('M000100-source');return false;">[Source]</a></p>
1343
+ <div class="method-source-code" id="M000100-source">
1039
1344
  <pre>
1040
- <span class="ruby-comment cmt"># File lib/git/base.rb, line 93</span>
1345
+ <span class="ruby-comment cmt"># File lib/git/base.rb, line 122</span>
1041
1346
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">repo_size</span>
1042
1347
  <span class="ruby-identifier">size</span> = <span class="ruby-value">0</span>
1043
1348
  <span class="ruby-constant">Dir</span>.<span class="ruby-identifier">chdir</span>(<span class="ruby-identifier">repo</span>.<span class="ruby-identifier">path</span>) <span class="ruby-keyword kw">do</span>
@@ -1050,21 +1355,24 @@ convenience methods
1050
1355
  </div>
1051
1356
  </div>
1052
1357
 
1053
- <div id="method-M000102" class="method-detail">
1054
- <a name="M000102"></a>
1358
+ <div id="method-M000116" class="method-detail">
1359
+ <a name="M000116"></a>
1055
1360
 
1056
1361
  <div class="method-heading">
1057
- <a href="#M000102" class="method-signature">
1362
+ <a href="#M000116" class="method-signature">
1058
1363
  <span class="method-name">reset</span><span class="method-args">(commitish = nil, opts = {})</span>
1059
1364
  </a>
1060
1365
  </div>
1061
1366
 
1062
1367
  <div class="method-description">
1368
+ <p>
1369
+ resets the working directory to the provided commitish
1370
+ </p>
1063
1371
  <p><a class="source-toggle" href="#"
1064
- onclick="toggleCode('M000102-source');return false;">[Source]</a></p>
1065
- <div class="method-source-code" id="M000102-source">
1372
+ onclick="toggleCode('M000116-source');return false;">[Source]</a></p>
1373
+ <div class="method-source-code" id="M000116-source">
1066
1374
  <pre>
1067
- <span class="ruby-comment cmt"># File lib/git/base.rb, line 170</span>
1375
+ <span class="ruby-comment cmt"># File lib/git/base.rb, line 244</span>
1068
1376
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">reset</span>(<span class="ruby-identifier">commitish</span> = <span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">opts</span> = {})
1069
1377
  <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">lib</span>.<span class="ruby-identifier">reset</span>(<span class="ruby-identifier">commitish</span>, <span class="ruby-identifier">opts</span>)
1070
1378
  <span class="ruby-keyword kw">end</span>
@@ -1073,21 +1381,25 @@ convenience methods
1073
1381
  </div>
1074
1382
  </div>
1075
1383
 
1076
- <div id="method-M000103" class="method-detail">
1077
- <a name="M000103"></a>
1384
+ <div id="method-M000117" class="method-detail">
1385
+ <a name="M000117"></a>
1078
1386
 
1079
1387
  <div class="method-heading">
1080
- <a href="#M000103" class="method-signature">
1388
+ <a href="#M000117" class="method-signature">
1081
1389
  <span class="method-name">reset_hard</span><span class="method-args">(commitish = nil, opts = {})</span>
1082
1390
  </a>
1083
1391
  </div>
1084
1392
 
1085
1393
  <div class="method-description">
1394
+ <p>
1395
+ resets the working directory to the commitish with
1396
+ &#8217;&#8212;hard&#8217;
1397
+ </p>
1086
1398
  <p><a class="source-toggle" href="#"
1087
- onclick="toggleCode('M000103-source');return false;">[Source]</a></p>
1088
- <div class="method-source-code" id="M000103-source">
1399
+ onclick="toggleCode('M000117-source');return false;">[Source]</a></p>
1400
+ <div class="method-source-code" id="M000117-source">
1089
1401
  <pre>
1090
- <span class="ruby-comment cmt"># File lib/git/base.rb, line 174</span>
1402
+ <span class="ruby-comment cmt"># File lib/git/base.rb, line 249</span>
1091
1403
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">reset_hard</span>(<span class="ruby-identifier">commitish</span> = <span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">opts</span> = {})
1092
1404
  <span class="ruby-identifier">opts</span> = {<span class="ruby-identifier">:hard</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-keyword kw">true</span>}.<span class="ruby-identifier">merge</span>(<span class="ruby-identifier">opts</span>)
1093
1405
  <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">lib</span>.<span class="ruby-identifier">reset</span>(<span class="ruby-identifier">commitish</span>, <span class="ruby-identifier">opts</span>)
@@ -1097,21 +1409,29 @@ convenience methods
1097
1409
  </div>
1098
1410
  </div>
1099
1411
 
1100
- <div id="method-M000117" class="method-detail">
1101
- <a name="M000117"></a>
1412
+ <div id="method-M000143" class="method-detail">
1413
+ <a name="M000143"></a>
1102
1414
 
1103
1415
  <div class="method-heading">
1104
- <a href="#M000117" class="method-signature">
1416
+ <a href="#M000143" class="method-signature">
1105
1417
  <span class="method-name">revparse</span><span class="method-args">(objectish)</span>
1106
1418
  </a>
1107
1419
  </div>
1108
1420
 
1109
1421
  <div class="method-description">
1422
+ <p>
1423
+ runs git rev-parse to convert the objectish to a full sha
1424
+ </p>
1425
+ <pre>
1426
+ @git.revparse(&quot;HEAD^^&quot;)
1427
+ @git.revparse('v2.4^{tree}')
1428
+ @git.revparse('v2.4:/doc/index.html')
1429
+ </pre>
1110
1430
  <p><a class="source-toggle" href="#"
1111
- onclick="toggleCode('M000117-source');return false;">[Source]</a></p>
1112
- <div class="method-source-code" id="M000117-source">
1431
+ onclick="toggleCode('M000143-source');return false;">[Source]</a></p>
1432
+ <div class="method-source-code" id="M000143-source">
1113
1433
  <pre>
1114
- <span class="ruby-comment cmt"># File lib/git/base.rb, line 240</span>
1434
+ <span class="ruby-comment cmt"># File lib/git/base.rb, line 420</span>
1115
1435
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">revparse</span>(<span class="ruby-identifier">objectish</span>)
1116
1436
  <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">lib</span>.<span class="ruby-identifier">revparse</span>(<span class="ruby-identifier">objectish</span>)
1117
1437
  <span class="ruby-keyword kw">end</span>
@@ -1120,21 +1440,72 @@ convenience methods
1120
1440
  </div>
1121
1441
  </div>
1122
1442
 
1123
- <div id="method-M000093" class="method-detail">
1124
- <a name="M000093"></a>
1443
+ <div id="method-M000098" class="method-detail">
1444
+ <a name="M000098"></a>
1125
1445
 
1126
1446
  <div class="method-heading">
1127
- <a href="#M000093" class="method-signature">
1447
+ <a href="#M000098" class="method-signature">
1448
+ <span class="method-name">set_index</span><span class="method-args">(index_file, check = true)</span>
1449
+ </a>
1450
+ </div>
1451
+
1452
+ <div class="method-description">
1453
+ <p><a class="source-toggle" href="#"
1454
+ onclick="toggleCode('M000098-source');return false;">[Source]</a></p>
1455
+ <div class="method-source-code" id="M000098-source">
1456
+ <pre>
1457
+ <span class="ruby-comment cmt"># File lib/git/base.rb, line 101</span>
1458
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">set_index</span>(<span class="ruby-identifier">index_file</span>, <span class="ruby-identifier">check</span> = <span class="ruby-keyword kw">true</span>)
1459
+ <span class="ruby-ivar">@lib</span> = <span class="ruby-keyword kw">nil</span>
1460
+ <span class="ruby-ivar">@index</span> = <span class="ruby-constant">Git</span><span class="ruby-operator">::</span><span class="ruby-constant">Index</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">index_file</span>.<span class="ruby-identifier">to_s</span>, <span class="ruby-identifier">check</span>)
1461
+ <span class="ruby-keyword kw">end</span>
1462
+ </pre>
1463
+ </div>
1464
+ </div>
1465
+ </div>
1466
+
1467
+ <div id="method-M000097" class="method-detail">
1468
+ <a name="M000097"></a>
1469
+
1470
+ <div class="method-heading">
1471
+ <a href="#M000097" class="method-signature">
1472
+ <span class="method-name">set_working</span><span class="method-args">(work_dir, check = true)</span>
1473
+ </a>
1474
+ </div>
1475
+
1476
+ <div class="method-description">
1477
+ <p><a class="source-toggle" href="#"
1478
+ onclick="toggleCode('M000097-source');return false;">[Source]</a></p>
1479
+ <div class="method-source-code" id="M000097-source">
1480
+ <pre>
1481
+ <span class="ruby-comment cmt"># File lib/git/base.rb, line 96</span>
1482
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">set_working</span>(<span class="ruby-identifier">work_dir</span>, <span class="ruby-identifier">check</span> = <span class="ruby-keyword kw">true</span>)
1483
+ <span class="ruby-ivar">@lib</span> = <span class="ruby-keyword kw">nil</span>
1484
+ <span class="ruby-ivar">@working_directory</span> = <span class="ruby-constant">Git</span><span class="ruby-operator">::</span><span class="ruby-constant">WorkingDirectory</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">work_dir</span>.<span class="ruby-identifier">to_s</span>, <span class="ruby-identifier">check</span>)
1485
+ <span class="ruby-keyword kw">end</span>
1486
+ </pre>
1487
+ </div>
1488
+ </div>
1489
+ </div>
1490
+
1491
+ <div id="method-M000107" class="method-detail">
1492
+ <a name="M000107"></a>
1493
+
1494
+ <div class="method-heading">
1495
+ <a href="#M000107" class="method-signature">
1128
1496
  <span class="method-name">status</span><span class="method-args">()</span>
1129
1497
  </a>
1130
1498
  </div>
1131
1499
 
1132
1500
  <div class="method-description">
1501
+ <p>
1502
+ returns a <a href="Status.html">Git::Status</a> object
1503
+ </p>
1133
1504
  <p><a class="source-toggle" href="#"
1134
- onclick="toggleCode('M000093-source');return false;">[Source]</a></p>
1135
- <div class="method-source-code" id="M000093-source">
1505
+ onclick="toggleCode('M000107-source');return false;">[Source]</a></p>
1506
+ <div class="method-source-code" id="M000107-source">
1136
1507
  <pre>
1137
- <span class="ruby-comment cmt"># File lib/git/base.rb, line 132</span>
1508
+ <span class="ruby-comment cmt"># File lib/git/base.rb, line 179</span>
1138
1509
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">status</span>
1139
1510
  <span class="ruby-constant">Git</span><span class="ruby-operator">::</span><span class="ruby-constant">Status</span>.<span class="ruby-identifier">new</span>(<span class="ruby-keyword kw">self</span>)
1140
1511
  <span class="ruby-keyword kw">end</span>
@@ -1143,44 +1514,50 @@ convenience methods
1143
1514
  </div>
1144
1515
  </div>
1145
1516
 
1146
- <div id="method-M000114" class="method-detail">
1147
- <a name="M000114"></a>
1517
+ <div id="method-M000128" class="method-detail">
1518
+ <a name="M000128"></a>
1148
1519
 
1149
1520
  <div class="method-heading">
1150
- <a href="#M000114" class="method-signature">
1521
+ <a href="#M000128" class="method-signature">
1151
1522
  <span class="method-name">tag</span><span class="method-args">(tag_name)</span>
1152
1523
  </a>
1153
1524
  </div>
1154
1525
 
1155
1526
  <div class="method-description">
1527
+ <p>
1528
+ returns a Git::Tag object
1529
+ </p>
1156
1530
  <p><a class="source-toggle" href="#"
1157
- onclick="toggleCode('M000114-source');return false;">[Source]</a></p>
1158
- <div class="method-source-code" id="M000114-source">
1531
+ onclick="toggleCode('M000128-source');return false;">[Source]</a></p>
1532
+ <div class="method-source-code" id="M000128-source">
1159
1533
  <pre>
1160
- <span class="ruby-comment cmt"># File lib/git/base.rb, line 225</span>
1534
+ <span class="ruby-comment cmt"># File lib/git/base.rb, line 326</span>
1161
1535
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">tag</span>(<span class="ruby-identifier">tag_name</span>)
1162
- <span class="ruby-constant">Git</span><span class="ruby-operator">::</span><span class="ruby-constant">Object</span>.<span class="ruby-identifier">new</span>(<span class="ruby-keyword kw">self</span>, <span class="ruby-identifier">tag_name</span>, <span class="ruby-keyword kw">true</span>)
1536
+ <span class="ruby-constant">Git</span><span class="ruby-operator">::</span><span class="ruby-constant">Object</span>.<span class="ruby-identifier">new</span>(<span class="ruby-keyword kw">self</span>, <span class="ruby-identifier">tag_name</span>, <span class="ruby-value str">'tag'</span>, <span class="ruby-keyword kw">true</span>)
1163
1537
  <span class="ruby-keyword kw">end</span>
1164
1538
  </pre>
1165
1539
  </div>
1166
1540
  </div>
1167
1541
  </div>
1168
1542
 
1169
- <div id="method-M000113" class="method-detail">
1170
- <a name="M000113"></a>
1543
+ <div id="method-M000127" class="method-detail">
1544
+ <a name="M000127"></a>
1171
1545
 
1172
1546
  <div class="method-heading">
1173
- <a href="#M000113" class="method-signature">
1547
+ <a href="#M000127" class="method-signature">
1174
1548
  <span class="method-name">tags</span><span class="method-args">()</span>
1175
1549
  </a>
1176
1550
  </div>
1177
1551
 
1178
1552
  <div class="method-description">
1553
+ <p>
1554
+ returns an array of all Git::Tag objects for this repository
1555
+ </p>
1179
1556
  <p><a class="source-toggle" href="#"
1180
- onclick="toggleCode('M000113-source');return false;">[Source]</a></p>
1181
- <div class="method-source-code" id="M000113-source">
1557
+ onclick="toggleCode('M000127-source');return false;">[Source]</a></p>
1558
+ <div class="method-source-code" id="M000127-source">
1182
1559
  <pre>
1183
- <span class="ruby-comment cmt"># File lib/git/base.rb, line 221</span>
1560
+ <span class="ruby-comment cmt"># File lib/git/base.rb, line 321</span>
1184
1561
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">tags</span>
1185
1562
  <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">lib</span>.<span class="ruby-identifier">tags</span>.<span class="ruby-identifier">map</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">r</span><span class="ruby-operator">|</span> <span class="ruby-identifier">tag</span>(<span class="ruby-identifier">r</span>) }
1186
1563
  <span class="ruby-keyword kw">end</span>
@@ -1189,6 +1566,189 @@ convenience methods
1189
1566
  </div>
1190
1567
  </div>
1191
1568
 
1569
+ <div id="method-M000139" class="method-detail">
1570
+ <a name="M000139"></a>
1571
+
1572
+ <div class="method-heading">
1573
+ <a href="#M000139" class="method-signature">
1574
+ <span class="method-name">update_ref</span><span class="method-args">(branch, commit)</span>
1575
+ </a>
1576
+ </div>
1577
+
1578
+ <div class="method-description">
1579
+ <p><a class="source-toggle" href="#"
1580
+ onclick="toggleCode('M000139-source');return false;">[Source]</a></p>
1581
+ <div class="method-source-code" id="M000139-source">
1582
+ <pre>
1583
+ <span class="ruby-comment cmt"># File lib/git/base.rb, line 385</span>
1584
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">update_ref</span>(<span class="ruby-identifier">branch</span>, <span class="ruby-identifier">commit</span>)
1585
+ <span class="ruby-identifier">branch</span>(<span class="ruby-identifier">branch</span>).<span class="ruby-identifier">update_ref</span>(<span class="ruby-identifier">commit</span>)
1586
+ <span class="ruby-keyword kw">end</span>
1587
+ </pre>
1588
+ </div>
1589
+ </div>
1590
+ </div>
1591
+
1592
+ <div id="method-M000132" class="method-detail">
1593
+ <a name="M000132"></a>
1594
+
1595
+ <div class="method-heading">
1596
+ <a href="#M000132" class="method-signature">
1597
+ <span class="method-name">with_index</span><span class="method-args">(new_index) {|@index| ...}</span>
1598
+ </a>
1599
+ </div>
1600
+
1601
+ <div class="method-description">
1602
+ <p>
1603
+ LOWER LEVEL INDEX OPERATIONS ##
1604
+ </p>
1605
+ <p><a class="source-toggle" href="#"
1606
+ onclick="toggleCode('M000132-source');return false;">[Source]</a></p>
1607
+ <div class="method-source-code" id="M000132-source">
1608
+ <pre>
1609
+ <span class="ruby-comment cmt"># File lib/git/base.rb, line 349</span>
1610
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">with_index</span>(<span class="ruby-identifier">new_index</span>)
1611
+ <span class="ruby-identifier">old_index</span> = <span class="ruby-ivar">@index</span>
1612
+ <span class="ruby-identifier">set_index</span>(<span class="ruby-identifier">new_index</span>, <span class="ruby-keyword kw">false</span>)
1613
+ <span class="ruby-identifier">return_value</span> = <span class="ruby-keyword kw">yield</span> <span class="ruby-ivar">@index</span>
1614
+ <span class="ruby-identifier">set_index</span>(<span class="ruby-identifier">old_index</span>)
1615
+ <span class="ruby-identifier">return_value</span>
1616
+ <span class="ruby-keyword kw">end</span>
1617
+ </pre>
1618
+ </div>
1619
+ </div>
1620
+ </div>
1621
+
1622
+ <div id="method-M000133" class="method-detail">
1623
+ <a name="M000133"></a>
1624
+
1625
+ <div class="method-heading">
1626
+ <a href="#M000133" class="method-signature">
1627
+ <span class="method-name">with_temp_index</span><span class="method-args">(&amp;blk)</span>
1628
+ </a>
1629
+ </div>
1630
+
1631
+ <div class="method-description">
1632
+ <p><a class="source-toggle" href="#"
1633
+ onclick="toggleCode('M000133-source');return false;">[Source]</a></p>
1634
+ <div class="method-source-code" id="M000133-source">
1635
+ <pre>
1636
+ <span class="ruby-comment cmt"># File lib/git/base.rb, line 357</span>
1637
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">with_temp_index</span> <span class="ruby-operator">&amp;</span><span class="ruby-identifier">blk</span>
1638
+ <span class="ruby-identifier">tempfile</span> = <span class="ruby-constant">Tempfile</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value str">'temp-index'</span>)
1639
+ <span class="ruby-identifier">temp_path</span> = <span class="ruby-identifier">tempfile</span>.<span class="ruby-identifier">path</span>
1640
+ <span class="ruby-identifier">tempfile</span>.<span class="ruby-identifier">unlink</span>
1641
+ <span class="ruby-identifier">with_index</span>(<span class="ruby-identifier">temp_path</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">blk</span>)
1642
+ <span class="ruby-keyword kw">end</span>
1643
+ </pre>
1644
+ </div>
1645
+ </div>
1646
+ </div>
1647
+
1648
+ <div id="method-M000142" class="method-detail">
1649
+ <a name="M000142"></a>
1650
+
1651
+ <div class="method-heading">
1652
+ <a href="#M000142" class="method-signature">
1653
+ <span class="method-name">with_temp_working</span><span class="method-args">(&amp;blk)</span>
1654
+ </a>
1655
+ </div>
1656
+
1657
+ <div class="method-description">
1658
+ <p><a class="source-toggle" href="#"
1659
+ onclick="toggleCode('M000142-source');return false;">[Source]</a></p>
1660
+ <div class="method-source-code" id="M000142-source">
1661
+ <pre>
1662
+ <span class="ruby-comment cmt"># File lib/git/base.rb, line 405</span>
1663
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">with_temp_working</span> <span class="ruby-operator">&amp;</span><span class="ruby-identifier">blk</span>
1664
+ <span class="ruby-identifier">tempfile</span> = <span class="ruby-constant">Tempfile</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value str">&quot;temp-workdir&quot;</span>)
1665
+ <span class="ruby-identifier">temp_dir</span> = <span class="ruby-identifier">tempfile</span>.<span class="ruby-identifier">path</span>
1666
+ <span class="ruby-identifier">tempfile</span>.<span class="ruby-identifier">unlink</span>
1667
+ <span class="ruby-constant">Dir</span>.<span class="ruby-identifier">mkdir</span>(<span class="ruby-identifier">temp_dir</span>, <span class="ruby-value">0700</span>)
1668
+ <span class="ruby-identifier">with_working</span>(<span class="ruby-identifier">temp_dir</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">blk</span>)
1669
+ <span class="ruby-keyword kw">end</span>
1670
+ </pre>
1671
+ </div>
1672
+ </div>
1673
+ </div>
1674
+
1675
+ <div id="method-M000141" class="method-detail">
1676
+ <a name="M000141"></a>
1677
+
1678
+ <div class="method-heading">
1679
+ <a href="#M000141" class="method-signature">
1680
+ <span class="method-name">with_working</span><span class="method-args">(work_dir) {|@working_directory| ...}</span>
1681
+ </a>
1682
+ </div>
1683
+
1684
+ <div class="method-description">
1685
+ <p><a class="source-toggle" href="#"
1686
+ onclick="toggleCode('M000141-source');return false;">[Source]</a></p>
1687
+ <div class="method-source-code" id="M000141-source">
1688
+ <pre>
1689
+ <span class="ruby-comment cmt"># File lib/git/base.rb, line 394</span>
1690
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">with_working</span>(<span class="ruby-identifier">work_dir</span>)
1691
+ <span class="ruby-identifier">return_value</span> = <span class="ruby-keyword kw">false</span>
1692
+ <span class="ruby-identifier">old_working</span> = <span class="ruby-ivar">@working_directory</span>
1693
+ <span class="ruby-identifier">set_working</span>(<span class="ruby-identifier">work_dir</span>)
1694
+ <span class="ruby-constant">Dir</span>.<span class="ruby-identifier">chdir</span> <span class="ruby-identifier">work_dir</span> <span class="ruby-keyword kw">do</span>
1695
+ <span class="ruby-identifier">return_value</span> = <span class="ruby-keyword kw">yield</span> <span class="ruby-ivar">@working_directory</span>
1696
+ <span class="ruby-keyword kw">end</span>
1697
+ <span class="ruby-identifier">set_working</span>(<span class="ruby-identifier">old_working</span>)
1698
+ <span class="ruby-identifier">return_value</span>
1699
+ <span class="ruby-keyword kw">end</span>
1700
+ </pre>
1701
+ </div>
1702
+ </div>
1703
+ </div>
1704
+
1705
+ <div id="method-M000138" class="method-detail">
1706
+ <a name="M000138"></a>
1707
+
1708
+ <div class="method-heading">
1709
+ <a href="#M000138" class="method-signature">
1710
+ <span class="method-name">write_and_commit_tree</span><span class="method-args">(opts = {})</span>
1711
+ </a>
1712
+ </div>
1713
+
1714
+ <div class="method-description">
1715
+ <p><a class="source-toggle" href="#"
1716
+ onclick="toggleCode('M000138-source');return false;">[Source]</a></p>
1717
+ <div class="method-source-code" id="M000138-source">
1718
+ <pre>
1719
+ <span class="ruby-comment cmt"># File lib/git/base.rb, line 380</span>
1720
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">write_and_commit_tree</span>(<span class="ruby-identifier">opts</span> = {})
1721
+ <span class="ruby-identifier">tree</span> = <span class="ruby-identifier">write_tree</span>
1722
+ <span class="ruby-identifier">commit_tree</span>(<span class="ruby-identifier">tree</span>, <span class="ruby-identifier">opts</span>)
1723
+ <span class="ruby-keyword kw">end</span>
1724
+ </pre>
1725
+ </div>
1726
+ </div>
1727
+ </div>
1728
+
1729
+ <div id="method-M000136" class="method-detail">
1730
+ <a name="M000136"></a>
1731
+
1732
+ <div class="method-heading">
1733
+ <a href="#M000136" class="method-signature">
1734
+ <span class="method-name">write_tree</span><span class="method-args">()</span>
1735
+ </a>
1736
+ </div>
1737
+
1738
+ <div class="method-description">
1739
+ <p><a class="source-toggle" href="#"
1740
+ onclick="toggleCode('M000136-source');return false;">[Source]</a></p>
1741
+ <div class="method-source-code" id="M000136-source">
1742
+ <pre>
1743
+ <span class="ruby-comment cmt"># File lib/git/base.rb, line 372</span>
1744
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">write_tree</span>
1745
+ <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">lib</span>.<span class="ruby-identifier">write_tree</span>
1746
+ <span class="ruby-keyword kw">end</span>
1747
+ </pre>
1748
+ </div>
1749
+ </div>
1750
+ </div>
1751
+
1192
1752
 
1193
1753
  </div>
1194
1754