[llvm-dev] RFC: changing variable naming rules in LLVM codebase & git-blame
JF Bastien via llvm-dev
llvm-dev at lists.llvm.org
Tue Jul 23 09:17:45 PDT 2019
> On Jul 23, 2019, at 8:30 AM, James Y Knight via llvm-dev <llvm-dev at lists.llvm.org> wrote:
>
> As a very frequent explorer of history, I really don't think this is
> as big an issue as it may seem. Even absent refactorings, you often
> run into the "wrong" commit when looking at blame (e.g., someone just
> added a comma rather than actually changing the code you care about),
> and have to look past that, to another previous commit.
>
> Any interactive blame tool ought to have an easy way to do this. For
> example, in emacs's annotation mode (which is what I use), you just
> press 'a' with the cursor on the line in question to re-annotate at
> the commit previous to that.
You might very well be right, but your answer sounds like you *think* it’ll work out. For a huge change like this I’d like to *know* for a fact that you’re right. Changing variable naming will touch every single line except comments, so it’s quite different from what we usually see today.
Artem mentions a new git feature that’ll do this automatically. Again: sounds great, do we *know* that it’ll work?
I think the onus is on people who care about doing this renaming to make sure issues such as this are actually non-issues. Maybe it’ll Just Work if you have the new feature Artem mentions. It’s the first time I hear of it, so I bet most people won’t know about it. That seems hostile to most LLVM developers. Maybe we need something in git-llvm to auto-ignore that huge commit? Or can it be in the repo’s git config?
Not to dive too deep into this git blame issue: it’s one of a few concerns I raised, and I have a few more I haven’t raised… This RFC seems like a huge change and really doesn’t seem ready.
> On Tue, Jul 23, 2019 at 11:25 AM Peter Waller via llvm-dev
> <llvm-dev at lists.llvm.org> wrote:
>>
>> On 7/22/19 6:34 PM, JF Bastien via llvm-dev wrote:
>>> * How do we expect to maintain git blame history, if at all?
>>
>> Hmm. I was hoping git-blame would have a feature which might allow
>> ignoring commits, but seemingly not. You can ignore whitespace changes
>> with -w, but of course that doesn't help for variable names.
>>
>> It seems the next best thing is to blame starting at a revision. At
>> least if there is "one big change", there is only one revision to
>> consider. With many smaller changes that would be harder.
>>
>> _______________________________________________
>> LLVM Developers mailing list
>> llvm-dev at lists.llvm.org
>> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
More information about the llvm-dev
mailing list