Re: [RFC/PATCH 1/2] commit: add parse_commit_repl() to replace commits at parsing time
- From
Nguyen Thai Ngoc Duy <pclouds@gmail.com>
- Date
- Aug 18, 2010, 04:37 UTC
- Message-ID
- <AANLkTimZOOMnbbu_gHoeE2Bo_uDajN6Nw64eOtRFfVmM@mail.gmail.com>
- In-Reply-To
- <20100818042459.GD21185@burratino>
On Wed, Aug 18, 2010 at 2:24 PM, Jonathan Nieder <jrnieder@gmail.com> wrote:
Show 10 quoted lines
> Christian Couder wrote: > >> The downside is that the sha1 will not be >> consistent with the content anymore and that it will be more difficult to >> realize that an object has been replaced as there will be no sha1 change to be >> seen. > > Maybe in the long run it would make sense to keep a "replaced" flag > and use it to mark the replace objects specially in some user-facing > commands (like log --format=medium).
Sounds good (if uses really need to know that). It can be used for commit grafts too.
You would need to find an available bit flag first though. Currently object.flags is used for different purposes and its bit definitions are not centralized. So it's hard to find a "good" bit that no one uses yet, to become the "replaced" bit. OK I'm getting off-topic now.
-- Duy