Skip to content

migrate more variables into repo_config_values

Tian Yuchen git 6 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v12 Latest10 patches 0 repliesNew
  2. v116 of 10 patches 3 repliesSuperseded
  3. v109 patches 8 repliesSuperseded
Earlier versions · 3
VersionPostedPatchesRepliesStatus
v99 patches12 repliesSuperseded
v89 patches3 repliesSuperseded
v79 patches3 repliesSuperseded

Changes in v12 from the cover letter

- Resending commit 7~10/10, which were not sent in V11 due to network issue.

- In commit 6/10, fix a declaration-after-statement error in apply.c

Patches in v12 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/10repository: introduce repo_config_values_clear()environment.c environment.h repository.c+15 -00 replies
2/10environment: move excludes_file into repo_config_valuesdir.c environment.c environment.h+19 -60 replies
3/10environment: move editor_program into repo_config_valueseditor.c environment.c environment.h+7 -60 replies
4/10environment: move pager_program into repo_config_valuesenvironment.c environment.h pager.c+26 -90 replies
5/10environment: move askpass_program into repo_config_valuesenvironment.c environment.h prompt.c+7 -60 replies
6/10environment: migrate apply_default_whitespace and apply_default_ignorewhitespaceapply.c environment.c environment.h+26 -120 replies
7/10environment: move push_default into repo_config_valuesbuiltin/push.c environment.c environment.h +1 more+32 -220 replies
8/10environment: move autorebase into repo_config_valuesbranch.c environment.c environment.h+14 -140 replies
9/10environment: move object_creation_mode into repo_config_valuesenvironment.c environment.h object-file.c+11 -100 replies
10/10repository: adjust the comment of config_values_private_repository.h+1 -10 replies

Reviews trailers per patch

None of the 10 patches has a Reviewed-by or Acked-by.

PatchChristian CouderAyush ChandekarOlamide Caleb Bello
1/10Mentored-by Mentored-by Mentored-by
2/10Mentored-by Mentored-by Mentored-by
3/10Mentored-by Mentored-by Mentored-by
4/10Mentored-by Mentored-by Mentored-by
5/10Mentored-by Mentored-by Mentored-by
6/10Mentored-by Mentored-by Mentored-by
7/10Mentored-by Mentored-by Mentored-by
8/10Mentored-by Mentored-by Mentored-by
9/10Mentored-by Mentored-by Mentored-by
10/10Mentored-by Mentored-by Mentored-by

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v12 thread

Cover letter [PATCH v12 00/10] migrate more variables into repo_config_values

Hi everyone,

This patch series continues the ongoing libification effort by migrating a batch of global configuration variables into struct repo_config_values.

What does this series do:

infrastructure & strings (commits 1-6):
Introduce 'repo_config_values_clear()' to manage the lifecycle of heap-allocated configuration strings. This infrastructure is utilized to migrate string variables, including 'excludes_file', 'apply' whitespace configs, and external programs including 'editor', 'pager', 'askpass'.

enums (commits 7-9):
Migrate enumerations 'push_default', 'autorebase', and 'object_creation_mode'. Care was taken to make these types available to the configuration structure without triggering circular header dependencies.

edit comment (commit 10):
Adjust the comment for config_values_private_ in repository.h.

RFC:

Commit 3~5. Is it really necessary to migrate _program variables?
https://lore.kernel.org/git/[email protected]/

Commit 6~9. Previous related discussions on 'git_branch_track'.
https://lore.kernel.org/git/CAD=f0L-mPX+KECUjXk-WBzEbTP7wCa8sB56GySQT0yh9mfUOWw@mail.gmail.com/

Note:

Since a new getter 'repo_excludes_file()' is introduced, as previously promised, once it is finally merged into 'master', there will be a patch to update and squash the comments.

Similarly, I've noticed that the classification and sorting of variables in 'repo_config_values' don't seem to be correct. There will also be a patch to fix this, and I think it will form a commit series along with the comment patch?

Changes since v11:

- Resending commit 7~10/10, which were not sent in V11 due to network issue.

- In commit 6/10, fix a declaration-after-statement error in apply.c

Special thanks to Pablo and Junio!

Tian Yuchen (10):
repository: introduce repo_config_values_clear()
environment: move excludes_file into repo_config_values
environment: move editor_program into repo_config_values
environment: move pager_program into repo_config_values
environment: move askpass_program into repo_config_values
environment: migrate apply_default_whitespace and
apply_default_ignorewhitespace
environment: move push_default into repo_config_values
environment: move autorebase into repo_config_values
environment: move object_creation_mode into repo_config_values
repository: adjust the comment of config_values_private_

 apply.c        | 28 ++++++++++++------
 branch.c       |  2 +-
 builtin/push.c | 10 ++++---
 dir.c          |  4 +--
 editor.c       |  4 +--
 environment.c  | 76 ++++++++++++++++++++++++++++++++-----------------
 environment.h  | 77 ++++++++++++++++++++++++++++++--------------------
 object-file.c  |  3 +-
 pager.c        | 32 +++++++++++++++------
 prompt.c       |  3 +-
 remote.c       |  2 +-
 repository.c   |  1 +
 repository.h   |  2 +-
 13 files changed, 158 insertions(+), 86 deletions(-)
Signature · 1 line
2.43.0