git-bundle: die if a given ref is not included in bundle
The earlier patch tried to be nice by just warning, but it seems more likely that the user wants to adjust the parameters. Also, it prevents a bundle containing _all_ revisions in the case when the user only gave one ref, but also rev-list options which excluded the ref. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
Johannes Schindelin committed
Mar 9, 2007 at 03:48 UTC
d58c6184e345b9c8c8bfe8cc3eb1bbfe2f5ee4f9
1 file changed
+2
-4
builtin-bundle.c
+2
-4
@@ -328,11 +328,9 @@ static int create_bundle(struct bundle_header *header, const char *path,
328
* other limiting options could have prevented all the tips
329
* from getting output.
330
*/
331
- if (!(e->item->flags & SHOWN)) {
332
- warn("ref '%s' is excluded by the rev-list options",
331
+ if (!(e->item->flags & SHOWN))
332
+ die("ref '%s' is excluded by the rev-list options",
333
e->name);
334
- continue;
335
- }
334
write_or_die(bundle_fd, sha1_to_hex(e->item->sha1), 40);
335
write_or_die(bundle_fd, " ", 1);
336
write_or_die(bundle_fd, ref, strlen(ref));