From: "Paul Smith" <p...@mad-scientist.net>
Sent: Tuesday, March 26, 2013 9:11 PM
On Tue, 2013-03-26 at 20:46 +0000, Philip Oakley wrote:
> We accept that "git blame" across the reformat will not be useful.
> I'm going to lay down a label right before the reformat, so people
> can use
> that to trace back git blame before it happened. I also will use a
> special "code reformat" user ID for the reformat commit,
Is this user ID programmable? (see later)
I'm not sure what you mean; isn't it possible for pretty much anyone
declare a given author on commit? So, yes, if I understand the
The key point here is that this script should be able to record the
corrected tree as though it is a simple 'commit --amend' so that the
'User' can either be your special "code reformat" user, or it can be the
> What I really need is somehow to re-apply the changes from a branch
> top of the post-reformatted version, with only the actual changes
> involved being noted as "new", not the reformatting. However
> won't cut it because I need to apply the reformatting to the
> as well, to avoid massive conflicts.
After updating your master with you script, get developer to update
their own branch, but as a "filter-branch", with their own username.
They now have a corrected data set that can be rebased, or a
format-patch set generated, that summarises their changes which
be apply-able upstream.
This would work, I think, but then wouldn't it attribute all the
in their branch to the reformat user as well, in addition to the
The key is to ensure the script can be applied as a `git filter-branch`,
and that it can maintain the developer's user name.
Thus every commit on the developer's branch will be reformatted "by the
developer", so that:
a) they can rebase their branch to match your desired start point and
b) when their branch is merged it will slot in nicely
Maybe that's OK, or at least better than having each user appear to
reformat the majority of the code on each merge (for any outstanding
I presume you want any work-in-progress branch to be based on top of
your newly reformatted master!
Yes, that's the goal... the question is how to get there.
You received this message because you are subscribed to the Google Groups "Git for
human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email
For more options, visit https://groups.google.com/groups/opt_out.