git-bundle: only die if pack would be empty, warn if ref is skipped

A use case for git-bundle expected to be quite common is this:

	$ git bundle create daily.bundle --since=10.days.ago --all

The expected outcome is _not_ to error out if only a couple of the
refs were not changed during the last 10 days.

This patch complains loudly about refs which are skipped due to the
pack not containing the corresponding objects, but dies only if
no objects would be in the pack _at all_.

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