git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 2/3] git-bundle: die if a given ref is not included in bundle

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Mar 9, 2007, 02:48 UTC
Message-ID
<Pine.LNX.4.63.0703090348300.22628@wbgn013.biozentrum.uni-wuerzburg.de>

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>
---
	It really was a dumb idea not to error out there. Sorry.
 builtin-bundle.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/builtin-bundle.c b/builtin-bundle.c
index 33b533f..ca3de60 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));
-- 
1.5.0.3.2601.gc1e5-dirty
Next: Mark Levedahl
Message 1 of 21 in “git-bundle: die if a given ref is not included in bundle”
  1. 2/3 git-bundle: die if a given ref is not included in bundleJohannes Schindelin, Mar 9, 2007
  2. Mark LevedahlMar 9, 2007
  3. Junio C HamanoMar 9, 2007
  4. Mark LevedahlMar 9, 2007
  5. Mark LevedahlMar 9, 2007
  6. git-bundle: only die if pack would be empty, warn if ref is skippedJohannes Schindelin, Mar 9, 2007
  7. Mark LevedahlMar 10, 2007
  8. Junio C HamanoMar 9, 2007
  9. Mark LevedahlMar 10, 2007
  10. Johannes SchindelinMar 10, 2007
  11. Mark LevedahlMar 10, 2007
  12. Johannes SchindelinMar 10, 2007
  13. Mark LevedahlMar 10, 2007
  14. Johannes SchindelinMar 11, 2007
  15. Junio C HamanoMar 11, 2007
  16. Johannes SchindelinMar 11, 2007
  17. Mark LevedahlMar 11, 2007
  18. Junio C HamanoMar 11, 2007
  19. Johannes SchindelinMar 11, 2007
  20. Mark LevedahlMar 13, 2007
  21. git-bundle: die if the bundle is empty.Mark Levedahl, Mar 9, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.