public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Sergio Durigan Junior <sergiodj@sergiodj.net>
To: git-commits@fedoraproject.org
Subject: [rpms/gdb] gdb-17.2-rebase-f44: Make generate-patches-from-git-repo.sh use "_git_upstream_commit" instead of "origin/master" for "git merge-base".
Date: Sat, 27 Jun 2026 23:58:30 GMT	[thread overview]
Message-ID: <178260471057.1.5592171031931620175.rpms-gdb-82f299dd3bff@fedoraproject.org> (raw)

A new commit has been pushed.

Repo   : rpms/gdb
Branch : gdb-17.2-rebase-f44
Commit : 82f299dd3bff6e7c8cb1bd679255bad0c54df56b
Author : Sergio Durigan Junior <sergiodj@sergiodj.net>
Date   : 2018-02-05T13:01:55-05:00
Stats  : +18/-6 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/gdb/c/82f299dd3bff6e7c8cb1bd679255bad0c54df56b?branch=gdb-17.2-rebase-f44

Log:
Make generate-patches-from-git-repo.sh use "_git_upstream_commit" instead of "origin/master" for "git merge-base".

---
diff --git a/README.local-patches b/README.local-patches
index c1c7ab3..ea7162a 100644
--- a/README.local-patches
+++ b/README.local-patches
@@ -94,3 +94,12 @@ control files.  These control files are:
   - _git_upstream_commit: This file contains the last upstream commit
     against which the patches were rebased.  It is used when importing
     the patches into the git repository.
+
+NOTE: If you did a rebase against a newer upstream version, you need
+to specify the commit/tag/branch against which you rebased:
+
+  $ sh generate-patches-from-git-repo.sh <REPOSITORY_DIR> <COMMIT_OR_TAG_OR_BRANCH>
+
+For example, if you rebased against "gdb-8.1-release":
+
+  $ sh generate-patches-from-git-repo.sh <REPOSITORY_DIR> gdb-8.1-release

diff --git a/generate-patches-from-git-repo.sh b/generate-patches-from-git-repo.sh
index ded0659..97e0408 100755
--- a/generate-patches-from-git-repo.sh
+++ b/generate-patches-from-git-repo.sh
@@ -14,14 +14,15 @@ usage ()
 $0 -- Generate .patch files for a RPM package from a git repository
 
 Usage:
-  $0 <REPOSITORY> [<COMMIT_OR_TAG>]
+  $0 <REPOSITORY> [<COMMIT_OR_TAG_OR_BRANCH>]
 
 <REPOSITORY> is the directory where the rebase was performed.
 
-<COMMIT_OR_TAG> is the commit or tag against which the rebase was
-performed.  It is optional, and if not provided "origin/master" will
-be used.  This script will then use 'git merge-base' to find the most
-recent common ancestor between HEAD and COMMIT_OR_TAG.
+<COMMIT_OR_TAG_OR_BRANCH> is the commit or tag or branch against which
+the rebase was performed.  It generally just needs to be provided if
+the file "_git_upstream_commit" doesn't exist, or if you are doing a
+rebase.  This script will then use 'git merge-base' to find the most
+recent common ancestor between HEAD and COMMIT_OR_TAG_OR_BRANCH.
 
 Options are:
 
@@ -35,11 +36,13 @@ test -f gdb.spec || die "This script needs to run from the same directory as gdb
 test -z $1 && die "You need to specify the repository."
 test "$1" = "-h" && usage
 
-commit_or_tag="origin/master"
+commit_or_tag="`cat _git_upstream_commit`"
 if test ! -z "$2" ; then
     commit_or_tag="$2"
 fi
 
+test -z $commit_or_tag && die "Because the '_git_upstream_commit' file doesn't exist, you need to specify a commit/tag/branch."
+
 test -d $1 || die "$1 is not a directory."
 
 # Remove all the current patches

                 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=178260471057.1.5592171031931620175.rpms-gdb-82f299dd3bff@fedoraproject.org \
    --to=sergiodj@sergiodj.net \
    --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