git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Bug Report: Subtrees and GPG Signed Commits

From
Stephen R Guglielmo <srguglielmo@gmail.com>
Date
Jan 31, 2018, 12:33 UTC
Message-ID
<CADfK3RXOqB7wKnXCWxgyDeov-Y7rVQiWFUa_hKZk=j9ReY9JDQ@mail.gmail.com>
In-Reply-To
<CAHqTa-0kdkDUjH1nw=4JPAivtyL84zfZ5t8Dj1UYXPrMd7Poqw@mail.gmail.com>
On Tue, Jan 30, 2018 at 6:37 PM, Avery Pennarun <apenwarr@gmail.com> wrote:
Show 51 quoted lines
> On Tue, Jan 30, 2018 at 6:24 PM, Junio C Hamano <gitster@pobox.com> wrote:
>> Stefan Beller <sbeller@google.com> writes:
>>> There has not been feedback for a while on this thread.
>>> I think that is because subtrees are not in anyone's hot
>>> interest area currently.
>>>
>>> This is definitely the right place to submit&discuss bugs.
>>> Looking through "git log --format="%ae %s" -S subtree",
>>> it seems as if Avery (apenwarr@gmail.com) was mostly
>>> interested in developing subtrees, though I think he has
>>> moved on. Originally it was invented by Junio, who is
>>> the active maintainer of the project in 68faf68938
>>> (A new merge stragety 'subtree'., 2007-02-15)
>>
>> Thanks for trying to help, but I have *NOTHING* to do with the "git
>> subtree" subcommand (and I personally have no interest in it).  What
>> I did was a subtree merge strategy (i.e. "git merge -s subtree"),
>> which is totally a different thing.
>>
>> David Greene offered to take it over in 2015, and then we saw some
>> activity by David Aguilar in 2016, but otherwise the subcommand from
>> contrib/ has pretty much been dormant these days.
>
> Strictly speaking, the 'git subtree' command does in fact use 'git
> merge -s subtree' under the covers, so Junio is at least partly
> responsible for giving me the idea :)
>
> I actually have never looked into how signed commits work and although
> I still use git-subtree occasionally (it hasn't needed any
> maintenance, for my simple use cases), I have never used it with
> signed commits.
>
> git-subtree maintains a cache that maps commit ids in the "original
> project" with their equivalents in the "merged project."  If there's
> something magic about how commit ids work with signed commits, I could
> imagine that causing the "no a valid object name" problems.  Or,
> git-subtree in --squash mode actually generates new commit objects
> using some magic of its own.  If it were to accidentally copy a
> signature into a commit that no longer matches the original, I imagine
> that new object might get rejected.
>
> Unfortunately I don't have time to look into it.  The git-subtree code
> is pretty straightforward, though, so if Stephen has an hour or two to
> look deeper it's probably possible to fix it up.  The tool is not
> actually as magical and difficult as it might seem at first glance :)
>
> Sorry I can't help more.
>
> Good luck,
>
> Avery
Thanks all for the discussion/replies.

We use subtrees extensively in our environment right now. The "sub" repos (90+) are located on GitHub, while the "main/parent" repo is provided by a vendor on website hosting infrastructure.

I will take a look at: git/Documentation/CodingGuidelines git/Documentation/SubmittingPatches git/contrib/subtree/

Should I follow up in this thread with a patch (it might be a while)?

Thanks! Steve

Previous: Avery PennarunNext: Junio C Hamano
Message 7 of 12 in “Bug Report: Subtrees and GPG Signed Commits”
  1. Stephen R GuglielmoJan 6, 2018
  2. Stephen R GuglielmoJan 18, 2018
  3. Stephen R GuglielmoJan 30, 2018
  4. Stefan BellerJan 30, 2018
  5. Junio C HamanoJan 30, 2018
  6. Avery PennarunJan 30, 2018
  7. Stephen R GuglielmoJan 31, 2018
  8. Junio C HamanoFeb 2, 2018
  9. Stephen R GuglielmoFeb 5, 2018
  10. Stephen R GuglielmoFeb 5, 2018
  11. Junio C HamanoFeb 5, 2018
  12. Stephen R GuglielmoFeb 8, 2018

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.