git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mark Levedahl <mlevedahl@gmail.com>
To: Junio C Hamano <junkio@cox.net>
Cc: Johannes Schindelin <Johannes.Schindelin@gmx.de>, git@vger.kernel.org
Subject: Re: [PATCH 2/3] git-bundle: die if a given ref is not included in bundle
Date: Fri, 09 Mar 2007 10:36:16 -0500	[thread overview]
Message-ID: <45F17EF0.5060008@gmail.com> (raw)
In-Reply-To: <7vejny7umx.fsf@assigned-by-dhcp.cox.net>

Junio C Hamano wrote:
> If I were doing a nightly script, I would probably be doing
> something like this:
>
> 	#!/bin/sh
> 	yesterday=$(git bundle list-heads yesterday.bdl | sed -e 's/ .*//')
> 	git bundle create today.bdl --all --not $yesterday
> 	# mail it out
Thinking about this further, the above has a problem (or should, but see 
below). Consider a case where master is not updated since yesterday. 
Effectively, the above becomes

git bundle create today.bdl  master <other-refs> --not master <other-refs>

As ref master is excluded, the bundle creation should die because master 
cannot be included. Experimenting with next (299fcfbdcb5afd85) however, 
I get:

git>git bundle create t.bdl master --not master
Generating pack...
Done counting 0 objects.
Writing 0 objects.
Total 0 (delta 0), reused 0 (delta 0)
git>git ls-remote t.bdl
git>

e.g, an empty bundle is created without any error or warning. This is 
the one case I believe an error should result: there is no use to 
sending (or even creating) an empty bundle.

As a date limited bundle containing all updated refs is my basic use, I 
really want this case to not be hard, and it definitely should not 
require externally maintained history or scripting to create. Absent the 
"die if any ref wasn't updated in the given date range" logic, and 
adding always die if the resulting bundle is empty, git bundle in next 
accomplishes what I want.

Mark

  parent reply	other threads:[~2007-03-09 15:36 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-09  2:48 [PATCH 2/3] git-bundle: die if a given ref is not included in bundle Johannes Schindelin
2007-03-09  3:17 ` Mark Levedahl
2007-03-09  7:17   ` Junio C Hamano
2007-03-09 13:40     ` Mark Levedahl
2007-03-09 15:36     ` Mark Levedahl [this message]
2007-03-09 16:30       ` [PATCH] git-bundle: only die if pack would be empty, warn if ref is skipped Johannes Schindelin
2007-03-10  5:44         ` Mark Levedahl
2007-03-09 23:37       ` [PATCH 2/3] git-bundle: die if a given ref is not included in bundle Junio C Hamano
2007-03-10  5:48         ` Mark Levedahl
2007-03-10 15:39         ` Johannes Schindelin
2007-03-10 16:14           ` Mark Levedahl
2007-03-10 16:53             ` Johannes Schindelin
2007-03-10 18:30               ` Mark Levedahl
2007-03-11  1:08                 ` Johannes Schindelin
2007-03-11  1:29                   ` Junio C Hamano
2007-03-11  1:54                     ` Johannes Schindelin
2007-03-11 14:51                       ` Mark Levedahl
2007-03-11 19:58                         ` Junio C Hamano
2007-03-11 22:28                         ` Johannes Schindelin
2007-03-13  3:16                           ` Mark Levedahl
2007-03-09  3:51 ` [PATCH] git-bundle: die if the bundle is empty Mark Levedahl

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=45F17EF0.5060008@gmail.com \
    --to=mlevedahl@gmail.com \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=junkio@cox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).