Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Schindelin <Johannes.Schindelin@gmx.de>2007-03-09 05:48:46 +0300
committerJunio C Hamano <junkio@cox.net>2007-03-09 09:58:03 +0300
commitd58c6184e345b9c8c8bfe8cc3eb1bbfe2f5ee4f9 (patch)
treec79862f6bbed9f6698289fd81f692bd760f69ad7 /builtin-bundle.c
parent263703fff38d252907d1c7ae9977038715e2e22f (diff)
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>
Diffstat (limited to 'builtin-bundle.c')
-rw-r--r--builtin-bundle.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/builtin-bundle.c b/builtin-bundle.c
index 33b533f821..ca3de60e44 100644
--- a/builtin-bundle.c
+++ b/builtin-bundle.c
@@ -328,11 +328,9 @@ static int create_bundle(struct bundle_header *header, const char *path,
* other limiting options could have prevented all the tips
* from getting output.
*/
- if (!(e->item->flags & SHOWN)) {
- warn("ref '%s' is excluded by the rev-list options",
+ if (!(e->item->flags & SHOWN))
+ die("ref '%s' is excluded by the rev-list options",
e->name);
- continue;
- }
write_or_die(bundle_fd, sha1_to_hex(e->item->sha1), 40);
write_or_die(bundle_fd, " ", 1);
write_or_die(bundle_fd, ref, strlen(ref));