From: Peter Foley <pefoley2@pefoley.com>
To: tools@linux.kernel.org
Subject: Better error message when trying to use auto-to-cc on an empty branch
Date: Wed, 11 Jan 2023 20:51:32 -0800 [thread overview]
Message-ID: <CAOFdcFNhD0EKnRwjCG+duttF+zxeEjv7qx31abSyg03csn6B5w@mail.gmail.com> (raw)
Hi,
I was poking around at
https://people.kernel.org/monsieuricon/sending-a-kernel-patch-with-b4-part-1
and ran into a corner case.
I had an existing commit that I wanted to try out b4 with, so I ran
"b4 prep -n kconfig" on top of the commit.
I then immediately ran b4 prep -c and got this:
b4 prep -c
Will collect To: addresses using get_maintainer.pl
Will collect Cc: addresses using get_maintainer.pl
Traceback (most recent call last):
File "/home/peter/.local/bin/b4", line 8, in <module>
sys.exit(cmd())
File "/home/peter/.local/lib/python3.10/site-packages/b4/command.py",
line 359, in cmd
cmdargs.func(cmdargs)
File "/home/peter/.local/lib/python3.10/site-packages/b4/command.py",
line 76, in cmd_prep
b4.ez.cmd_prep(cmdargs)
File "/home/peter/.local/lib/python3.10/site-packages/b4/ez.py",
line 1902, in cmd_prep
return auto_to_cc()
File "/home/peter/.local/lib/python3.10/site-packages/b4/ez.py",
line 1824, in auto_to_cc
tos, ccs, tag_msg, patches = get_prep_branch_as_patches()
File "/home/peter/.local/lib/python3.10/site-packages/b4/ez.py",
line 1143, in get_prep_branch_as_patches
patches = b4.git_range_to_patches(None, start_commit, 'HEAD',
File "/home/peter/.local/lib/python3.10/site-packages/b4/__init__.py",
line 2766, in git_range_to_patches
raise RuntimeError(f'Could not run rev-list {start}..{end}')
RuntimeError: Could not run rev-list
17d982ccd4b5d7b274578eec3ca5d903de594d77..HEAD
I eventually figured out that the problem was the commit order (the
cover letter should have been the ancestor of my commit), so I was
able to just git rebase -i and swap the two commits. At that point
things worked fine, but it would be nice if the error message was a
little more obvious.
Reporting here per the request on
https://b4.docs.kernel.org/en/latest/index.html
Thanks,
Peter Foley
reply other threads:[~2023-01-12 4:51 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=CAOFdcFNhD0EKnRwjCG+duttF+zxeEjv7qx31abSyg03csn6B5w@mail.gmail.com \
--to=pefoley2@pefoley.com \
--cc=tools@linux.kernel.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).