Message ID | cover.1638859949.git.steadmon@google.com (mailing list archive) |
---|---|
Headers | show |
Series | branch: inherit tracking configs | expand |
Josh Steadmon <steadmon@google.com> writes: > I've addressed feedback from V4. Since 2/3 reviewers seemed to (at least > slightly) prefer handling multiple upstream branches in the existing > tracking setup, I've gone that direction rather than repurposing the > branch copy code. None of the other issues were controversial. > > In this version, I'd appreciate feedback mainly on patch 1: > * Is the combination of `git_config_set_gently()` + > `git_config_set_multivar_gently() the best way to write multiple > config entries for the same key? IIRC git_config_set_*() is Dscho's brainchild. If he is available to comment, it may be a valuable input. > * Does the reorganization of the BRANCH_CONFIG_VERBOSE output make > things more readable, or less? Should I try to simplify the output > here so that we don't end up with so many translatable variants of the > same message? Let me find time to take a look. > Also, a question specifically for Junio: this will conflict with > gc/branch-recurse-submodules; should I rebase on that, or wait till it > hits next, or just ignore it for now? Can you two work out the preferred plan, taking relative importance, priority, and difficulty between the topics into account, and report to us how you want to proceed and why you chose the route once you are done? Unless the plan you two come up with is outrageously bad, such a decision by stakeholders would be far more acceptable by the community than going by my gut feeling. In short, I'd prefer decentralization ;-) Having said that, I think this one is a simpler topic that is closer to become stable enough than the other one, so it could be that the rebases want to go the other direction. Thanks.
Junio C Hamano <gitster@pobox.com> writes: > Can you two work out the preferred plan, taking relative importance, > priority, and difficulty between the topics into account, and report > to us how you want to proceed and why you chose the route once you > are done? > > Unless the plan you two come up with is outrageously bad, such a > decision by stakeholders would be far more acceptable by the > community than going by my gut feeling. In short, I'd prefer > decentralization ;-) > > Having said that, I think this one is a simpler topic that is closer > to become stable enough than the other one, so it could be that the > rebases want to go the other direction. Josh and I have discussed this, and yes, we agree with your assessment. Rebasing my changes on top of this is also easier from a dependency perspective because this series has a very obvious interface that I can use. I'll send a re-roll soon. Thanks!
Hi, On Tue, 7 Dec 2021, Junio C Hamano wrote: > Josh Steadmon <steadmon@google.com> writes: > > > I've addressed feedback from V4. Since 2/3 reviewers seemed to (at least > > slightly) prefer handling multiple upstream branches in the existing > > tracking setup, I've gone that direction rather than repurposing the > > branch copy code. None of the other issues were controversial. > > > > In this version, I'd appreciate feedback mainly on patch 1: > > * Is the combination of `git_config_set_gently()` + > > `git_config_set_multivar_gently() the best way to write multiple > > config entries for the same key? > > IIRC git_config_set_*() is Dscho's brainchild. If he is available > to comment, it may be a valuable input. The `git_config_set_multivar_gently()` function was really only intended to add one key/value pair. Currently, there is no function to add multiple key/value pairs, and while it is slightly wasteful to lock the config multiple times to write a bunch of key/value pairs, it is not the worst in the world for a small use case like this one. So yes, for the moment I would go with the suggested design. One thing you might want to do is to avoid the extra `git_config_set_gently()` before the `for` loop, simply by passing `i == 0 ? 0 : CONFIG_FLAGS_MULTI_REPLACE` as `flags` parameter to the multivar version of the function. But that would optimize for code size rather than for readability, and I would actually prefer the more verbose version. Ciao, Dscho
On 2021.12.10 23:48, Johannes Schindelin wrote: > Hi, > > On Tue, 7 Dec 2021, Junio C Hamano wrote: > > > Josh Steadmon <steadmon@google.com> writes: > > > > > I've addressed feedback from V4. Since 2/3 reviewers seemed to (at least > > > slightly) prefer handling multiple upstream branches in the existing > > > tracking setup, I've gone that direction rather than repurposing the > > > branch copy code. None of the other issues were controversial. > > > > > > In this version, I'd appreciate feedback mainly on patch 1: > > > * Is the combination of `git_config_set_gently()` + > > > `git_config_set_multivar_gently() the best way to write multiple > > > config entries for the same key? > > > > IIRC git_config_set_*() is Dscho's brainchild. If he is available > > to comment, it may be a valuable input. > > The `git_config_set_multivar_gently()` function was really only intended > to add one key/value pair. > > Currently, there is no function to add multiple key/value pairs, and while > it is slightly wasteful to lock the config multiple times to write a bunch > of key/value pairs, it is not the worst in the world for a small use case > like this one. > > So yes, for the moment I would go with the suggested design. > > One thing you might want to do is to avoid the extra > `git_config_set_gently()` before the `for` loop, simply by passing `i == 0 > ? 0 : CONFIG_FLAGS_MULTI_REPLACE` as `flags` parameter to the multivar > version of the function. > > But that would optimize for code size rather than for readability, and I > would actually prefer the more verbose version. Sounds good, thanks for the advice! > Ciao, > Dscho