Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

config: properly delete or rename section containing multivars#6723

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
ethomson merged 2 commits intolibgit2:mainfromsamueltardieu:config-rename-multivar
Feb 17, 2024

Conversation

samueltardieu
Copy link
Contributor

@samueltardieusamueltardieu commentedJan 22, 2024
edited
Loading

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

Renaming a section or deleting its content removes each entry aftercopying it in its new place if needed. However, since each entrymay be part of a multivar, deletion must only remove the exact entrythat has just been copied.
@samueltardieusamueltardieu changed the titleconfig: properly rename section containing multivarsconfig: properly delete or rename section containing multivarsJan 23, 2024
@ethomson
Copy link
Member

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.

samueltardieu reacted with hooray emoji

@samueltardieu
Copy link
ContributorAuthor

Hi@ethomson. Anything I need to do on my side?

We can just append the escaped regex to the value buffer, we don't needcreate a new value buffer and then append _that_.
@ethomson
Copy link
Member

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 intermediatevalue str with the escaped regex — thegit_str_escape_regex function shouldappend to an existing buffer. So it should be safe to just putc the^, then escape the regex into the value string.

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! 🙏

samueltardieu reacted with thumbs up emoji

@samueltardieu
Copy link
ContributorAuthor

It is much better indeed.

@ethomsonethomson merged commit9e4e930 intolibgit2:mainFeb 17, 2024
@ethomson
Copy link
Member

Thanks for the fix!

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Cannot delete or rename a branch whose config section contains multivar entries
2 participants
@samueltardieu@ethomson

[8]ページ先頭

©2009-2025 Movatter.jp