[Bug 297694] git-arc: stage did not properly templatize commit message

[email protected]
Newsgroups gmane.os.freebsd.devel.ports.bugs
Message-ID <[email protected]/bugzilla/>
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=297694

            Bug ID: 297694
           Summary: git-arc: stage did not properly templatize commit
                    message
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: Ports Framework
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]

Problem:

$ git arc stage <branch>

Failed to apply template that should/would have included "Reviewed by" and
"Differential Revision"

Reproduction steps:

NB: Some or all of these steps may be required

1. Someone submits a patch to Phabricator
2. You, the maintainer, branch off main, patch, and commit into branch
3. then immediately checkout main and stage

Stage brings up $EDITOR and only contains the commit message, nothing else. No
Reviewed By, no Differential Revision

Context:

This happened for https://reviews.freebsd.org/D56060

The patch was submitted by [email protected]

I reviewed the patch and accepted it. I then waited for a second pair of eyes,
uzsolt. After uzsolt reviewed it and the submitter satisfied uzsolt, I was
subsequently satisfied that it was ready for commit (by me, maintainer).

I then did:

1. Approved in Phabricator via web
2. cd /usr/ports # on my dev box
3. git checkout main
4. git pull origin main
5. git checkout -b math/R-cran-acepack
6. git arc patch D56060
7. git status
8. git add math/R-cran-acepack/Makefile
9. git commit -m "math/R-cran-acepack: update 1.4.1 to 1.6.3"
10. git checkout main
11. git pull origin main # again, for good measure
12. git arc stage math/R-cran-acepack # $EDITOR comes up

And was in the editor was simply this:

math/R-cran-acepack: update 1.4.1 to 1.6.3

And that's not what I expected. What I expected to see was this:

math/R-cran-acepack: update 1.4.1 to 1.6.3

Reviewed by: uzsolt
Differential Revision: https://reviews.freebsd.org/D56060

But the last two lines above were missing.

Usually git arc stage is smart enough to find the differential revision by
title. The first line of the commit was exactly copy/paste the title of D56060

Now simply because someone else submitted the review I don't expect that to be
a blocker to having a proper template applied. Here's the commit that I ended
up making (which I think git arc stage should also handle the Submitted By as
well, but I had to type that by hand, along with the Reviewed By):

https://cgit.freebsd.org/ports/commit/?id=f6817b088dd84a3b0e69ab95d3d678504e8cfeec

commit f6817b088dd84a3b0e69ab95d3d678504e8cfeec
Author: Devin Teske <[email protected]>
Date:   Thu Aug 20 10:53:17 2026 -0700

    math/R-cran-acepack: update 1.4.1 to 1.6.3

    Submitted by: [email protected]
    Reviewed by:  uzsolt

Notice that in my haste, I forgot to add the Differential Revision line.

Something caused git arc stage to be incredibly spartan/terse here and I'm not
sure what, but it seems like a bug as I have truly become reliant on git arc to
do the needful repetitious lifting in staging the commit messages for me (it's
a huge time saver)

-- 
You are receiving this mail because:
You are on the CC list for the bug.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.