mbox series

[0/2] config: fix evaluating "onbranch" with nonexistent git dir

Message ID cover.1727171197.git.ps@pks.im (mailing list archive)
Headers show
Series config: fix evaluating "onbranch" with nonexistent git dir | expand

Message

Patrick Steinhardt Sept. 24, 2024, 10:05 a.m. UTC
Hi,

this small patch series fixes evaluating "includeIf.onbranch" conditions
when running outside of a repository with an invalid gitdir.

Thanks!

Patrick

Patrick Steinhardt (2):
  t1305: exercise edge cases of "onbranch" includes
  config: fix evaluating "onbranch" with nonexistent git dir

 config.c                  | 15 +++++++++------
 t/t1305-config-include.sh | 40 +++++++++++++++++++++++++++++++++++++++
 2 files changed, 49 insertions(+), 6 deletions(-)

Comments

shejialuo Sept. 24, 2024, 2:20 p.m. UTC | #1
On Tue, Sep 24, 2024 at 12:05:37PM +0200, Patrick Steinhardt wrote:
> Hi,
> 
> this small patch series fixes evaluating "includeIf.onbranch" conditions
> when running outside of a repository with an invalid gitdir.
> 
> Thanks!
> 
> Patrick
> 
> Patrick Steinhardt (2):
>   t1305: exercise edge cases of "onbranch" includes
>   config: fix evaluating "onbranch" with nonexistent git dir
> 
>  config.c                  | 15 +++++++++------
>  t/t1305-config-include.sh | 40 +++++++++++++++++++++++++++++++++++++++
>  2 files changed, 49 insertions(+), 6 deletions(-)
> 
> -- 
> 2.46.0.551.gc5ee8f2d1c.dirty
> 

Although I comment a lot in [PATCH 2/2], I think this series is good
enough. The reason why I comment on [PATCH 2/2] is I think we should
enhance this behavior in the future.

Thanks,
Jialuo