public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Sergio Durigan Junior <sergiodj@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/gdb] gdb-17.2-rebase-f44: Improve error handling on generate-* scripts
Date: Sat, 27 Jun 2026 23:58:52 GMT	[thread overview]
Message-ID: <178260473222.1.8777229842979680380.rpms-gdb-2e649f71e0bc@fedoraproject.org> (raw)

A new commit has been pushed.

Repo   : rpms/gdb
Branch : gdb-17.2-rebase-f44
Commit : 2e649f71e0bc00324654788b7c9c1c7efe5490d9
Author : Sergio Durigan Junior <sergiodj@redhat.com>
Date   : 2018-07-25T17:35:59-04:00
Stats  : +10/-0 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/gdb/c/2e649f71e0bc00324654788b7c9c1c7efe5490d9?branch=gdb-17.2-rebase-f44

Log:
Improve error handling on generate-* scripts

---
diff --git a/generate-git-repo-from-patches.sh b/generate-git-repo-from-patches.sh
index 8f68477..490cca9 100755
--- a/generate-git-repo-from-patches.sh
+++ b/generate-git-repo-from-patches.sh
@@ -35,8 +35,14 @@ test -f _git_upstream_commit || die "Cannot find _git_upstream_commit file."
 test -f _patch_order || die "Cannot find _patch_order file."
 
 last_ancestor_commit=`cat _git_upstream_commit`
+
 cd $1
+
+git name-rev $last_ancestor_commit
+test $? -eq 0 || die "Could not find $last_ancestor_commit in the repository $1.  Did you run 'git fetch'?"
+
 git checkout $last_ancestor_commit
 for p in `cat ../_patch_order` ; do
     git am ../$p
+    test $? -eq 0 || die "Could not apply patch '$p'."
 done

diff --git a/generate-patches-from-git-repo.sh b/generate-patches-from-git-repo.sh
index 3d454b7..faa64a2 100755
--- a/generate-patches-from-git-repo.sh
+++ b/generate-patches-from-git-repo.sh
@@ -51,6 +51,10 @@ for f in `cat _patch_order` ; do
 done
 
 cd $1
+
+git name-rev $commit_or_tag
+test $? -eq 0 || die "Could not find $commit_or_tag in the repository.  Did you run 'git fetch'?"
+
 idx=1
 common_ancestor=`git merge-base HEAD $commit_or_tag`
 

                 reply	other threads:[~2026-06-27 23:58 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=178260473222.1.8777229842979680380.rpms-gdb-2e649f71e0bc@fedoraproject.org \
    --to=sergiodj@redhat.com \
    --cc=git-commits@fedoraproject.org \
    /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