[PATCH 8/8] bundle_create: Do not exit when given no revs to bundle
- From
Jonathan Nieder <jrnieder@gmail.com>
- Date
- Jun 26, 2010, 06:31 UTC
- Message-ID
- <20100626063158.GI15881@burratino>
- In-Reply-To
- <20100626061735.GA15881@burratino>
Return an error instead to help with the libification effort.
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> --- That’s the end of the series. Thanks for reading.
I was a bit torn about whether to present this as a request for comment or a patch series ready for application. On one hand it fixes a bug; on the other hand, I have very little confidence that it works well in the presence of arbitrary rev-list options. Thoughts and testing would be very welcome.
Good night, Jonathan
bundle.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/bundle.c b/bundle.c index 7aff369..7dd3f65 100644 --- a/bundle.c +++ b/bundle.c @@ -349,7 +349,7 @@ static int bundle_list_refs(int bundle_fd, struct rev_info *revs) free(ref); } if (!ref_count) - die("Refusing to create empty bundle."); + return error("Refusing to create empty bundle."); return 0; }
-- 1.7.1.198.g8d802