]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Merge branch 'dk/help-all'
authorJunio C Hamano <gitster@pobox.com>
Mon, 25 Aug 2025 21:22:00 +0000 (14:22 -0700)
committerJunio C Hamano <gitster@pobox.com>
Mon, 25 Aug 2025 21:22:00 +0000 (14:22 -0700)
"git cmd --help-all" now works outside repositories.

* dk/help-all:
  builtin: also setup gently for --help-all
  parse-options: refactor flags for usage_with_options_internal

1  2 
git.c
parse-options.c
t/t1517-outside-repo.sh

diff --cc git.c
Simple merge
diff --cc parse-options.c
Simple merge
index 5ce0ceb1769a28058e7e31f323b11312a32165f7,e34321dd446abfcbcfc7bb827ac90bf99b54f775..1c69d52c76eb48f39d092817ae756498dd8b17a2
                test_expect_code 129 nongit git $cmd -h >usage &&
                test_grep "[Uu]sage: git $cmd " usage
        '
+       test_$expect_outcome $prereq "'git $cmd --help-all' outside a repository" '
+               test_expect_code 129 nongit git $cmd --help-all >usage &&
+               test_grep "[Uu]sage: git $cmd " usage
+       '
  done
  
 +test_expect_success 'fmt-merge-msg does not crash with -h' '
 +      test_expect_code 129 git fmt-merge-msg -h >usage &&
 +      test_grep "[Uu]sage: git fmt-merge-msg " usage &&
 +      test_expect_code 129 nongit git fmt-merge-msg -h >usage &&
 +      test_grep "[Uu]sage: git fmt-merge-msg " usage
 +'
 +
  test_done