Git.pm: Better error handling

So far, errors just killed the whole program and in case of an error
inside of libgit it would be totally uncatchable. This patch makes
Git.pm throw standard Perl exceptions instead. In the future we might
subclass Error to Git::Error or something but for now Error::Simple
is more than enough.

Signed-off-by: Petr Baudis <pasky@suse.cz>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2 files changed
tree: 4966560d51c8e23cc3c9467c322d273fae945905
  1. arm/
  2. compat/
  3. contrib/
  4. Documentation/
  5. gitweb/
  6. mozilla-sha1/
  7. perl/
  8. ppc/
  9. t/
  10. templates/
  11. xdiff/
  12. .gitignore
  13. alloc.c
  14. base85.c
  15. blame.c
  16. blob.c
  17. blob.h
  18. builtin-add.c
  19. builtin-apply.c
  20. builtin-cat-file.c
  21. builtin-check-ref-format.c
  22. builtin-commit-tree.c
  23. builtin-count.c
  24. builtin-diff-files.c
  25. builtin-diff-index.c
  26. builtin-diff-stages.c
  27. builtin-diff-tree.c
  28. builtin-diff.c
  29. builtin-grep.c
  30. builtin-help.c
  31. builtin-init-db.c
  32. builtin-log.c
  33. builtin-ls-files.c
  34. builtin-ls-tree.c
  35. builtin-mailinfo.c
  36. builtin-mailsplit.c
  37. builtin-push.c
  38. builtin-read-tree.c
  39. builtin-rev-list.c
  40. builtin-rev-parse.c
  41. builtin-rm.c
  42. builtin-show-branch.c
  43. builtin-stripspace.c
  44. builtin-tar-tree.c
  45. builtin-update-index.c
  46. builtin-update-ref.c
  47. builtin-upload-tar.c
  48. builtin-write-tree.c
  49. builtin.h
  50. cache-tree.c
  51. cache-tree.h
  52. cache.h
  53. checkout-index.c
  54. combine-diff.c
  55. commit.c
  56. commit.h
  57. config.c
  58. connect.c
  59. convert-objects.c
  60. copy.c
  61. COPYING
  62. csum-file.c
  63. csum-file.h
  64. ctype.c
  65. daemon.c
  66. date.c
  67. delta.h
  68. describe.c
  69. diff-delta.c
  70. diff-lib.c
  71. diff.c
  72. diff.h
  73. diffcore-break.c
  74. diffcore-delta.c
  75. diffcore-order.c
  76. diffcore-pickaxe.c
  77. diffcore-rename.c
  78. diffcore.h
  79. dir.c
  80. dir.h
  81. dump-cache-tree.c
  82. entry.c
  83. environment.c
  84. exec_cmd.c
  85. exec_cmd.h
  86. fetch-clone.c
  87. fetch-pack.c
  88. fetch.c
  89. fetch.h
  90. fsck-objects.c
  91. generate-cmdlist.sh
  92. git-am.sh
  93. git-annotate.perl
  94. git-applymbox.sh
  95. git-applypatch.sh
  96. git-archimport.perl
  97. git-bisect.sh
  98. git-branch.sh
  99. git-checkout.sh
  100. git-cherry.sh
  101. git-clean.sh
  102. git-clone.sh
  103. git-commit.sh
  104. git-compat-util.h
  105. git-cvsexportcommit.perl
  106. git-cvsimport.perl
  107. git-cvsserver.perl
  108. git-fetch.sh
  109. git-fmt-merge-msg.perl
  110. git-lost-found.sh
  111. git-ls-remote.sh
  112. git-merge-octopus.sh
  113. git-merge-one-file.sh
  114. git-merge-ours.sh
  115. git-merge-recursive.py
  116. git-merge-resolve.sh
  117. git-merge-stupid.sh
  118. git-merge.sh
  119. git-mv.perl
  120. git-p4import.py
  121. git-parse-remote.sh
  122. git-prune.sh
  123. git-pull.sh
  124. git-push.sh
  125. git-quiltimport.sh
  126. git-rebase.sh
  127. git-relink.perl
  128. git-repack.sh
  129. git-request-pull.sh
  130. git-rerere.perl
  131. git-reset.sh
  132. git-resolve.sh
  133. git-revert.sh
  134. git-send-email.perl
  135. git-sh-setup.sh
  136. git-shortlog.perl
  137. git-svnimport.perl
  138. git-tag.sh
  139. git-verify-tag.sh
  140. GIT-VERSION-GEN
  141. git.c
  142. git.spec.in
  143. gitk
  144. gitMergeCommon.py
  145. hash-object.c
  146. http-fetch.c
  147. http-push.c
  148. http.c
  149. http.h
  150. ident.c
  151. imap-send.c
  152. index-pack.c
  153. INSTALL
  154. local-fetch.c
  155. lockfile.c
  156. log-tree.c
  157. log-tree.h
  158. Makefile
  159. merge-base.c
  160. merge-index.c
  161. merge-tree.c
  162. mktag.c
  163. mktree.c
  164. name-rev.c
  165. object-refs.c
  166. object.c
  167. object.h
  168. pack-check.c
  169. pack-objects.c
  170. pack-redundant.c
  171. pack.h
  172. pager.c
  173. patch-delta.c
  174. patch-id.c
  175. path.c
  176. peek-remote.c
  177. pkt-line.c
  178. pkt-line.h
  179. prune-packed.c
  180. quote.c
  181. quote.h
  182. read-cache.c
  183. README
  184. receive-pack.c
  185. refs.c
  186. refs.h
  187. repo-config.c
  188. revision.c
  189. revision.h
  190. rsh.c
  191. rsh.h
  192. run-command.c
  193. run-command.h
  194. send-pack.c
  195. server-info.c
  196. setup.c
  197. sha1_file.c
  198. sha1_name.c
  199. shell.c
  200. show-index.c
  201. ssh-fetch.c
  202. ssh-pull.c
  203. ssh-push.c
  204. ssh-upload.c
  205. strbuf.c
  206. strbuf.h
  207. symbolic-ref.c
  208. tag.c
  209. tag.h
  210. tar.h
  211. test-date.c
  212. test-delta.c
  213. tree-diff.c
  214. tree-walk.c
  215. tree-walk.h
  216. tree.c
  217. tree.h
  218. unpack-file.c
  219. unpack-objects.c
  220. update-server-info.c
  221. upload-pack.c
  222. usage.c
  223. var.c
  224. verify-pack.c
  225. xdiff-interface.c
  226. xdiff-interface.h