Skip to content

Commit

Permalink
git-bundle: die if a given ref is not included in bundle
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Johannes Schindelin authored and Junio C Hamano committed Mar 9, 2007
1 parent 263703f commit d58c618
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions builtin-bundle.c
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down

0 comments on commit d58c618

Please sign in to comment.