public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Andrew Burgess <aburgess@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/gdb] gdb-17.2-rebase-f44: disable more features when using 'git format-patch'
Date: Sun, 28 Jun 2026 00:00:49 GMT	[thread overview]
Message-ID: <178260484954.1.13449549645584233275.rpms-gdb-e1f49fc4946f@fedoraproject.org> (raw)

            A new commit has been pushed.

            Repo   : rpms/gdb
            Branch : gdb-17.2-rebase-f44
            Commit : e1f49fc4946f45c2690239b0b2ca5416d1e0cf52
            Author : Andrew Burgess <aburgess@redhat.com>
            Date   : 2022-12-01T14:13:48+00:00
            Stats  : +4/-1 in 1 file(s)
            URL    : https://src.fedoraproject.org/rpms/gdb/c/e1f49fc4946f45c2690239b0b2ca5416d1e0cf52?branch=gdb-17.2-rebase-f44

            Log:
            disable more features when using 'git format-patch'

In my .gitconfig I have this:

  [format]
          useAutoBase = true
          thread = shallow

As a consequence, when I run generate-patches-from-git-repo.sh I see
two problems, first, I see lots of errors like this:

  fatal: failed to get upstream, if you want to record base commit automatically,
  please use git branch --set-upstream-to to track a remote branch.
  Or you could specify base commit by --base=<base-commit-id> manually

These are caused by the use of the useAutoBase option.

If I disable useAutoBase, and regenerate the patches, I see that every
patch changes, with the addition of a line like this:

  Message-Id: <some message id string here...>

This is caused by the use of the thread option.

Rather than forcing me to not have these settings in my .gitconfig, I
propose that we add --no-base and --no-thread to our invocation of
'git format-patch' in generate-patches-from-git-repo.sh, this fixes
both of the above problems.

With these new options the 'git format-patch' line was getting pretty
long, so I've wrapped it to make it more readable.

---
diff --git a/generate-patches-from-git-repo.sh b/generate-patches-from-git-repo.sh
index 7947c8a..52537ca 100755
--- a/generate-patches-from-git-repo.sh
+++ b/generate-patches-from-git-repo.sh
@@ -83,7 +83,10 @@ for c in `git rev-list --reverse ${common_ancestor}..HEAD` ; do
     # before, even if nothing has changed.  This is bad, so we replace
     # the commit hash by something constant (the string
     # "FEDORA_PATCHES").
-    git format-patch --no-signature --no-stat --keep-subject -1 --stdout $c | sed -e '1 s/^From [0-9a-f]\+ \(.*\)/From FEDORA_PATCHES \1/' -e '/^index [0-9a-f]\+\.\.[0-9a-f]\+.*$/d' > $orig_dir/$fname
+    git format-patch --no-base --no-thread --no-signature --no-stat \
+        --keep-subject -1 --stdout $c \
+        | sed -e '1 s/^From [0-9a-f]\+ \(.*\)/From FEDORA_PATCHES \1/' \
+              -e '/^index [0-9a-f]\+\.\.[0-9a-f]\+.*$/d' > $orig_dir/$fname
     (cd $orig_dir && git add $fname)
 
     cat >> $temp_PATCH_file <<EOF

                 reply	other threads:[~2026-06-28  0:00 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=178260484954.1.13449549645584233275.rpms-gdb-e1f49fc4946f@fedoraproject.org \
    --to=aburgess@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