git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Yann Dirson <ydirson@altern.org>
To: Petr Baudis <pasky@suse.cz>
Cc: git@vger.kernel.org
Subject: [PATCH 1/3] cg-admin-rewritehist: catch git-rev-list returning no commit
Date: Sun, 11 Jun 2006 14:04:55 +0200	[thread overview]
Message-ID: <20060611120455.12116.14042.stgit@gandelf.nowhere.earth> (raw)
In-Reply-To: <20060611120431.12116.74005.stgit@gandelf.nowhere.earth>




Signed-off-by: Yann Dirson <ydirson@altern.org>
---

 cg-admin-rewritehist |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/cg-admin-rewritehist b/cg-admin-rewritehist
index 861c7f6..fe3f210 100755
--- a/cg-admin-rewritehist
+++ b/cg-admin-rewritehist
@@ -199,6 +199,10 @@ done
 git-rev-list --topo-order HEAD $startrev | tac >../revs
 commits=$(cat ../revs | wc -l)
 
+if [ $commits -eq 0 ]; then
+    die "Found nothing to rewrite"
+fi
+
 i=0
 while read commit; do
 	i=$((i+1))

       reply	other threads:[~2006-06-11 12:05 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20060611120431.12116.74005.stgit@gandelf.nowhere.earth>
2006-06-11 12:04 ` Yann Dirson [this message]
2006-06-17 23:21   ` [PATCH 1/3] cg-admin-rewritehist: catch git-rev-list returning no commit Petr Baudis
2006-06-11 12:04 ` [PATCH 2/3] cg-admin-rewritehist: catch errors in -r argument early Yann Dirson
2006-06-11 12:05 ` [PATCH 3/3] cg-admin-rewritehist: seed the map with the parent of the -r arg, not with itself Yann Dirson

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=20060611120455.12116.14042.stgit@gandelf.nowhere.earth \
    --to=ydirson@altern.org \
    --cc=git@vger.kernel.org \
    --cc=pasky@suse.cz \
    /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).