From: Ronan Pigott Date: Sat, 21 Sep 2024 18:06:09 GMT Subject: Re: BUG: refs.c:1933: reference backend is unknown Message-ID: <9fdb9561bb0ad85e55ca3253cc4db9b098641e30@rjp.ie> In-Reply-To: September 21, 2024 at 9:09 AM, "shejialuo" wrote: > The "git-archive(1)" command must accept at least one parameter as > > "archive.c::parse_archive_args" shows: > > static int parse_archive_args(...) > > { > > ... > > if (argc < 1) > > usage_with_options(archive_usage, opts); > > } > > So, it will print the usage and exit the program. I guess you omit some > > things for this bug report. Could you please give us more information to > > let us dive into this? The abort is reproducible exactly as written for me, but upon further examination it may depend on my config. Here is a minimal reproducer: $ GIT_CONFIG_NOSYSTEM=1 GIT_CONFIG_GLOBAL=/dev/null git --git-dir=notexist -c 'includeif.onbranch:test/**.path=/dev/null' archive > bt #0 __pthread_kill_implementation (threadid=, signo=signo@entry=6, no_tid=no_tid@entry=0) at pthread_kill.c:44 #1 0x00007ffff7d78463 in __pthread_kill_internal (threadid=, signo=6) at pthread_kill.c:78 #2 0x00007ffff7d1f120 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26 #3 0x00007ffff7d064c3 in __GI_abort () at abort.c:79 #4 0x000055555585385a in BUG_vfl (file=, line=, fmt=0x555555905baf "reference backend is unknown", params=0x7fffffffd120) at /usr/src/debug/git/git-2.46.1/usage.c:317 #5 BUG_fl (file=, line=, fmt=0x555555905baf "reference backend is unknown") at /usr/src/debug/git/git-2.46.1/usage.c:334 #6 0x00005555557ca9d2 in ref_store_init (repo=, format=, gitdir=, flags=) at /usr/src/debug/git/git-2.46.1/refs.c:1933 #7 ref_store_init (repo=0x5555559759a0 , format=, gitdir=, flags=15) at /usr/src/debug/git/git-2.46.1/refs.c:1923 #8 get_main_ref_store (r=0x5555559759a0 ) at /usr/src/debug/git/git-2.46.1/refs.c:1953 #9 0x00005555556dcdf6 in include_by_branch (cond=0x55555599f503 "test/**.path", cond_len=7) at /usr/src/debug/git/git-2.46.1/config.c:309 #10 include_condition_is_true (kvi=, inc=0x7fffffffd460, cond=0x55555599f503 "test/**.path", cond_len=7) at /usr/src/debug/git/git-2.46.1/config.c:409 #11 git_config_include (var=var@entry=0x55555599f4f0 "includeif.onbranch:test/**.path", value=value@entry=0x55555599fa62 "/dev/null", ctx=ctx@entry=0x7fffffffd368, data=data@entry=0x7fffffffd460) at /usr/src/debug/git/git-2.46.1/config.c:439 #12 0x00005555556d8753 in config_parse_pair (key=, value=0x55555599fa62 "/dev/null", kvi=kvi@entry=0x7fffffffd4a0, fn=fn@entry=0x5555556dcad0 , data=data@entry=0x7fffffffd460) at /usr/src/debug/git/git-2.46.1/config.c:617 #13 0x00005555556dc437 in parse_config_env_list (env=0x55555599fa40 "includeif.onbranch:test/**.path", kvi=0x7fffffffd4a0, fn=0x5555556dcad0 , data=0x7fffffffd460) at /usr/src/debug/git/git-2.46.1/config.c:700 #14 git_config_from_parameters (fn=0x5555556dcad0 , data=0x7fffffffd460) at /usr/src/debug/git/git-2.46.1/config.c:773 #15 do_git_config_sequence (opts=0x7fffffffd4b0, repo=0x0, fn=0x5555556dcad0 , data=0x7fffffffd460) at /usr/src/debug/git/git-2.46.1/config.c:2131 #16 config_with_options (fn=0x5555556dcad0 , fn@entry=0x555555790940 , data=0x7fffffffd460, data@entry=0x7fffffffd7a0, config_source=config_source@entry=0x0, repo=repo@entry=0x0, opts=opts@entry=0x7fffffffd660) at /usr/src/debug/git/git-2.46.1/config.c:2174 #17 0x00005555556dd110 in read_early_config (cb=0x555555790940 , data=0x7fffffffd7a0) at /usr/src/debug/git/git-2.46.1/config.c:2229 #18 0x000055555555ea58 in check_pager_config (cmd=) at /usr/src/debug/git/git-2.46.1/pager.c:261 #19 run_builtin (p=0x555555966a00 , argc=1, argv=0x7fffffffdd78) at /usr/src/debug/git/git-2.46.1/git.c:461 #20 handle_builtin (argc=1, argv=0x7fffffffdd78) at /usr/src/debug/git/git-2.46.1/git.c:732 #21 0x000055555555eaf9 in run_argv (argcp=0x7fffffffdb0c, argv=0x7fffffffdb30) at /usr/src/debug/git/git-2.46.1/git.c:796 #22 0x00005555555597eb in cmd_main (argc=, argv=) at /usr/src/debug/git/git-2.46.1/git.c:931 #23 main (argc=, argv=) at /usr/src/debug/git/git-2.46.1/common-main.c:64 Cheers, Ronan