config: properly delete or rename section containing multivars#6723
config: properly delete or rename section containing multivars#6723ethomson merged 2 commits intolibgit2:mainfrom
Conversation
Renaming a section or deleting its content removes each entry after copying it in its new place if needed. However, since each entry may be part of a multivar, deletion must only remove the exact entry that has just been copied.
|
Thanks @samueltardieu - this looks great on first glance, but I'd like to spend a few more minutes to give this a deeper review. Great first PR, I appreciate this. |
|
Hi @ethomson. Anything I need to do on my side? |
We can just append the escaped regex to the value buffer, we don't need create a new value buffer and then append _that_.
|
Hi @samueltardieu - sorry about the delay. This is a great fix. I took one more look and realized that we should be able to avoid the copy when constructing the escaped value. I think that we don't need to create the intermediate I pushed up a commit to your branch to do this - would you mind 👀 just to make sure that I didn't make any logical errors? Thanks again! 🙏 |
|
It is much better indeed. |
|
Thanks for the fix! |
Renaming a config section or deleting its content removes each entry after copying it in its new place if needed. However, since each entry may be part of a multivar, deletion must only remove the exact entry that has just been copied.
Fix #6722