[dev] Reindent issues

David Lamparter equinox at diac24.net
Tue Aug 22 12:15:27 EDT 2017


On Tue, Aug 22, 2017 at 04:06:25PM +0200, Bingen Eguzkitza wrote:
> I was trying to apply instructions here (rebase case):
> 
> https://github.com/FRRouting/frr/wiki/Reindenting
> 
> but for stable/3.0, and maybe I'm missing something, but it's not working
> as I would expect. To make it easy to reproduce, and to discard causes
> related to my branch, what I'm doing is:

The script doesn't recognise the tags for stable/3.0, I'll update it to
do that.

> $ git checkout reindent-3.0-before
> $ git checkout -b test_reindent
> $ git cherry-pick reindent-3.0-before

Shouldn't this be "git cherry-pick reindent-3.0-after" here?

> Now I have a new branch identical to reindent-3.0-after, can be checked
> with:
> 
> $ git diff test_reindent reindent-3.0-after
> 
> I do this so the script treats it as a new non-rebased branch. Then:
> 
> $ python git-reindent-branch.py test_reindent
> 
> I would expect that reindented branch is still identical to
> reindent-3.0-after, but it's not:

Ah, you need to get the .clang-format file from master too... where it
says this in the wiki:
git show master:git-reindent-branch.py > git-reindent-branch.py
you need to also do:
git show master:.clang-format > .clang-format
(same for indent.py really)

*updates the wiki*

> $ git diff --stat reindented-branch reindent-3.0-after
> 
> (...) <- see attached for details
> 
>  598 files changed, 269745 insertions(+), 244747 deletions(-)
> 
> How was the reindentation for stable-3.0 done? Was this script used?

Yes, I just had the .clang-format file around from master :)

Sorry for the incomplete instructions,


-David



More information about the dev mailing list