Re: [RFC] origin link for cherry-pick and revert

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Paolo Bonzini wrote:
>> Being able to subvert the authenticity of git blame by providing fake
>> origin information is not very appealing.

>You could use a dummy submodule to ensure that each commit pointed to
>the right set of notes.  It would force to create a separate commit
>whenever you modified the notes, which is actually not bad.

Possibly, yes.  But we'd have to be careful not to incur too much
overhead because every indirection will cost, especially since the
origin link sometimes is checked for on every commit during a treewalk.
The fact that it rarely exists means that it should be fast to find out
that there are no origin links (which obviously is the common case).

>Alternatively, the header of the commit can be modified to add a pointer
>to a tree object for the notes; I suppose this is more palatable than
>the origin link.

This won't work for the original notes concept, because it makes the
notes immutable after commit.  For the origin links this would be fine,
since they don't change once committed.
The problem with fitting the origin links in the notes is twofold:
- They become mutable, which is undesirable, I'd like to preserve
  history as is (just like parent links).
- There is a performance hit, since origin links need to be found not to
  exist on every commit (sometimes, depending on the operation of course).

>  The tree could be organized in directories+blobs like
>..git/objects to speed up the lookup.

Yes, that was already in the latest proposal for notes, I believe.

>I actually like the commit notes idea, but then I wonder: why are the
>author and committer part of the commit object?  How does the plumbing
>use them?  Isn't that metadata that could live in the "notes"?  And so,

It would fit with a non-mutable version of the notes.  Then again, we
already *have* the non-mutable version of the notes, it's called the
header of the commit message.

>why should the origin link have less privileges?

They both belong in the non-mutable notes, and those happen to live in
the header of the commit (which *is* the most efficient spot, of course).
-- 
Sincerely,
           Stephen R. van den Berg.
"There are three types of people in the world;
 those who can count, and those who can't."
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux