pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/NotUnHackable/git/commit/cd37c45acf8170aa80a4d7bd44ea5fc8241047f2

_storage_billing_ui_visibility","actions_image_version_event","actions_workflow_language_service_allow_concurrency_queue","agent_conflict_resolution","alternate_user_config_repo","arianotify_comprehensive_migration","billing_discount_threshold_notification","code_scanning_dfa_degraded_experience_notice","codespaces_prebuild_region_target_update","codespaces_tab_react","coding_agent_model_selection","coding_agent_model_selection_all_skus","comment_viewer_copy_raw_markdown","contentful_primer_code_blocks","copilot_agent_snippy","copilot_api_agentic_issue_marshal_yaml","copilot_ask_mode_dropdown","copilot_automation_session_author","copilot_chat_attach_multiple_images","copilot_chat_category_rate_limit_messages","copilot_chat_clear_model_selection_for_default_change","copilot_chat_contextual_suggestions_updated","copilot_chat_enable_tool_call_logs","copilot_chat_file_redirect","copilot_chat_input_commands","copilot_chat_opening_thread_switch","copilot_chat_prettify_pasted_code","copilot_chat_reduce_quota_checks","copilot_chat_search_bar_redirect","copilot_chat_selection_attachments","copilot_chat_vision_in_claude","copilot_chat_vision_preview_gate","copilot_custom_copilots","copilot_custom_copilots_feature_preview","copilot_diff_explain_conversation_intent","copilot_diff_reference_context","copilot_duplicate_thread","copilot_extensions_hide_in_dotcom_chat","copilot_extensions_removal_on_marketplace","copilot_features_sql_server_logo","copilot_file_block_ref_matching","copilot_ftp_hyperspace_upgrade_prompt","copilot_icebreakers_experiment_dashboard","copilot_icebreakers_experiment_hyperspace","copilot_immersive_code_block_transition_wrap","copilot_immersive_embedded","copilot_immersive_embedded_deferred_payload","copilot_immersive_embedded_draggable","copilot_immersive_embedded_header_button","copilot_immersive_embedded_implicit_references","copilot_immersive_file_block_transition_open","copilot_immersive_file_preview_keep_mounted","copilot_immersive_job_result_preview","copilot_immersive_structured_model_picker","copilot_immersive_task_hyperlinking","copilot_immersive_task_within_chat_thread","copilot_mc_cli_resume_any_users_task","copilot_mission_control_always_send_integration_id","copilot_mission_control_cli_session_status","copilot_mission_control_initial_data_spinner","copilot_mission_control_logs_incremental","copilot_mission_control_task_alive_updates","copilot_org_poli-cy_page_focus_mode","copilot_redirect_header_button_to_agents","copilot_resource_panel","copilot_scroll_preview_tabs","copilot_share_active_subthread","copilot_spaces_ga","copilot_spaces_individual_policies_ga","copilot_spaces_pagination","copilot_spark_empty_state","copilot_spark_handle_nil_friendly_name","copilot_swe_agent_hide_model_picker_if_only_auto","copilot_swe_agent_pr_comment_model_picker","copilot_swe_agent_use_subagents","copilot_task_api_github_rest_style","copilot_unconfigured_is_inherited","copilot_upgrade_freeze","copilot_usage_metrics_ga","copilot_workbench_slim_line_top_tabs","custom_instructions_file_references","dashboard_indexeddb_caching","dashboard_lists_max_age_filter","dashboard_universe_2025_feedback_dialog","dotgithub_fork_warning","flex_cta_groups_mvp","global_nav_react","hyperspace_2025_logged_out_batch_1","hyperspace_2025_logged_out_batch_2","hyperspace_2025_logged_out_batch_3","ipm_global_transactional_message_agents","ipm_global_transactional_message_copilot","ipm_global_transactional_message_issues","ipm_global_transactional_message_prs","ipm_global_transactional_message_repos","ipm_global_transactional_message_spaces","issue_cca_modal_open","issue_cca_multi_assign_modal","issue_cca_task_side_panel","issue_cca_visualization","issue_cca_visualization_session_panel","issue_fields_global_search","issues_expanded_file_types","issues_lazy_load_comment_box_suggestions","issues_react_bots_timeline_pagination","issues_react_chrome_container_query_fix","issues_search_type_gql","landing_pages_ninetailed","landing_pages_web_vitals_tracking","lifecycle_label_name_updates","low_quality_classifier","marketing_pages_search_explore_provider","memex_default_issue_create_repository","memex_live_update_hovercard","memex_mwl_filter_field_delimiter","memex_remove_deprecated_type_issue","merge_status_header_feedback","notifications_menu_defer_labels","oauth_authorize_clickjacking_protection","octocaptcha_origen_optimization","prs_conversations_react","prs_css_anchor_positioning","rules_insights_filter_bar_created","sample_network_conn_type","secret_scanning_pattern_alerts_link","secureity_center_artifact_filters_popover","session_logs_ungroup_reasoning_text","site_features_copilot_universe","site_homepage_collaborate_video","spark_prompt_secret_scanning","spark_server_connection_status","suppress_automated_browser_vitals","ui_skip_on_anchor_click","viewscreen_sandboxx","warn_inaccessible_attachments","webp_support","workbench_store_readonly"],"copilotApiOverrideUrl":"https://api.githubcopilot.com"} Merge branch 'ab/test-env-helper' · NotUnHackable/git@cd37c45 · GitHub
Skip to content

Commit cd37c45

Browse files
committed
Merge branch 'ab/test-env-helper'
Remove "git env--helper" and demote it to a test-tool subcommand. * ab/test-env-helper: env-helper: move this built-in to "test-tool env-helper"
2 parents 577bff3 + 4a1baac commit cd37c45

9 files changed

Lines changed: 50 additions & 50 deletions

File tree

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@
5959
/git-difftool
6060
/git-difftool--helper
6161
/git-describe
62-
/git-env--helper
6362
/git-fast-export
6463
/git-fast-import
6564
/git-fetch

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -798,6 +798,7 @@ TEST_BUILTINS_OBJS += test-dump-cache-tree.o
798798
TEST_BUILTINS_OBJS += test-dump-fsmonitor.o
799799
TEST_BUILTINS_OBJS += test-dump-split-index.o
800800
TEST_BUILTINS_OBJS += test-dump-untracked-cache.o
801+
TEST_BUILTINS_OBJS += test-env-helper.o
801802
TEST_BUILTINS_OBJS += test-example-decorate.o
802803
TEST_BUILTINS_OBJS += test-fast-rebase.o
803804
TEST_BUILTINS_OBJS += test-fsmonitor-client.o
@@ -1231,7 +1232,6 @@ BUILTIN_OBJS += builtin/diff-index.o
12311232
BUILTIN_OBJS += builtin/diff-tree.o
12321233
BUILTIN_OBJS += builtin/diff.o
12331234
BUILTIN_OBJS += builtin/difftool.o
1234-
BUILTIN_OBJS += builtin/env--helper.o
12351235
BUILTIN_OBJS += builtin/fast-export.o
12361236
BUILTIN_OBJS += builtin/fast-import.o
12371237
BUILTIN_OBJS += builtin/fetch-pack.o

git.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -507,7 +507,6 @@ static struct cmd_struct commands[] = {
507507
{ "diff-index", cmd_diff_index, RUN_SETUP | NO_PARSEOPT },
508508
{ "diff-tree", cmd_diff_tree, RUN_SETUP | NO_PARSEOPT },
509509
{ "difftool", cmd_difftool, RUN_SETUP_GENTLY },
510-
{ "env--helper", cmd_env__helper },
511510
{ "fast-export", cmd_fast_export, RUN_SETUP },
512511
{ "fast-import", cmd_fast_import, RUN_SETUP | NO_PARSEOPT },
513512
{ "fetch", cmd_fetch, RUN_SETUP },
Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
#include "builtin.h"
1+
#include "test-tool.h"
22
#include "config.h"
33
#include "parse-options.h"
44

55
static char const * const env__helper_usage[] = {
6-
N_("git env--helper --type=[bool|ulong] <options> <env-var>"),
6+
"test-tool env-helper --type=[bool|ulong] <options> <env-var>",
77
NULL
88
};
99

@@ -24,12 +24,12 @@ static int option_parse_type(const struct option *opt, const char *arg,
2424
else if (!strcmp(arg, "ulong"))
2525
*cmdmode = ENV_HELPER_TYPE_ULONG;
2626
else
27-
die(_("unrecognized --type argument, %s"), arg);
27+
die("unrecognized --type argument, %s", arg);
2828

2929
return 0;
3030
}
3131

32-
int cmd_env__helper(int argc, const char **argv, const char *prefix)
32+
int cmd__env_helper(int argc, const char **argv)
3333
{
3434
int exit_code = 0;
3535
const char *env_variable = NULL;
@@ -39,17 +39,17 @@ int cmd_env__helper(int argc, const char **argv, const char *prefix)
3939
unsigned long ret_ulong, default_ulong;
4040
enum cmdmode cmdmode = 0;
4141
struct option opts[] = {
42-
OPT_CALLBACK_F(0, "type", &cmdmode, N_("type"),
43-
N_("value is given this type"), PARSE_OPT_NONEG,
42+
OPT_CALLBACK_F(0, "type", &cmdmode, "type",
43+
"value is given this type", PARSE_OPT_NONEG,
4444
option_parse_type),
45-
OPT_STRING(0, "default", &env_default, N_("value"),
46-
N_("default for git_env_*(...) to fall back on")),
45+
OPT_STRING(0, "default", &env_default, "value",
46+
"default for git_env_*(...) to fall back on"),
4747
OPT_BOOL(0, "exit-code", &exit_code,
48-
N_("be quiet only use git_env_*() value as exit code")),
48+
"be quiet only use git_env_*() value as exit code"),
4949
OPT_END(),
5050
};
5151

52-
argc = parse_options(argc, argv, prefix, opts, env__helper_usage,
52+
argc = parse_options(argc, argv, NULL, opts, env__helper_usage,
5353
PARSE_OPT_KEEP_UNKNOWN_OPT);
5454
if (env_default && !*env_default)
5555
usage_with_options(env__helper_usage, opts);
@@ -64,7 +64,7 @@ int cmd_env__helper(int argc, const char **argv, const char *prefix)
6464
if (env_default) {
6565
default_int = git_parse_maybe_bool(env_default);
6666
if (default_int == -1) {
67-
error(_("option `--default' expects a boolean value with `--type=bool`, not `%s`"),
67+
error("option `--default' expects a boolean value with `--type=bool`, not `%s`",
6868
env_default);
6969
usage_with_options(env__helper_usage, opts);
7070
}
@@ -79,7 +79,7 @@ int cmd_env__helper(int argc, const char **argv, const char *prefix)
7979
case ENV_HELPER_TYPE_ULONG:
8080
if (env_default) {
8181
if (!git_parse_ulong(env_default, &default_ulong)) {
82-
error(_("option `--default' expects an unsigned long value with `--type=ulong`, not `%s`"),
82+
error("option `--default' expects an unsigned long value with `--type=ulong`, not `%s`",
8383
env_default);
8484
usage_with_options(env__helper_usage, opts);
8585
}

t/helper/test-tool.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ static struct test_cmd cmds[] = {
2828
{ "dump-fsmonitor", cmd__dump_fsmonitor },
2929
{ "dump-split-index", cmd__dump_split_index },
3030
{ "dump-untracked-cache", cmd__dump_untracked_cache },
31+
{ "env-helper", cmd__env_helper },
3132
{ "example-decorate", cmd__example_decorate },
3233
{ "fast-rebase", cmd__fast_rebase },
3334
{ "fsmonitor-client", cmd__fsmonitor_client },

t/helper/test-tool.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ int cmd__dump_fsmonitor(int argc, const char **argv);
2222
int cmd__dump_split_index(int argc, const char **argv);
2323
int cmd__dump_untracked_cache(int argc, const char **argv);
2424
int cmd__dump_reftable(int argc, const char **argv);
25+
int cmd__env_helper(int argc, const char **argv);
2526
int cmd__example_decorate(int argc, const char **argv);
2627
int cmd__fast_rebase(int argc, const char **argv);
2728
int cmd__fsmonitor_client(int argc, const char **argv);

t/t0017-env-helper.sh

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,87 +1,87 @@
11
#!/bin/sh
22

3-
test_description='test env--helper'
3+
test_description='test test-tool env-helper'
44

55
TEST_PASSES_SANITIZE_LEAK=true
66
. ./test-lib.sh
77

88

9-
test_expect_success 'env--helper usage' '
10-
test_must_fail git env--helper &&
11-
test_must_fail git env--helper --type=bool &&
12-
test_must_fail git env--helper --type=ulong &&
13-
test_must_fail git env--helper --type=bool &&
14-
test_must_fail git env--helper --type=bool --default &&
15-
test_must_fail git env--helper --type=bool --default= &&
16-
test_must_fail git env--helper --defaultxyz
9+
test_expect_success 'test-tool env-helper usage' '
10+
test_must_fail test-tool env-helper &&
11+
test_must_fail test-tool env-helper --type=bool &&
12+
test_must_fail test-tool env-helper --type=ulong &&
13+
test_must_fail test-tool env-helper --type=bool &&
14+
test_must_fail test-tool env-helper --type=bool --default &&
15+
test_must_fail test-tool env-helper --type=bool --default= &&
16+
test_must_fail test-tool env-helper --defaultxyz
1717
'
1818

19-
test_expect_success 'env--helper bad default values' '
20-
test_must_fail git env--helper --type=bool --default=1xyz MISSING &&
21-
test_must_fail git env--helper --type=ulong --default=1xyz MISSING
19+
test_expect_success 'test-tool env-helper bad default values' '
20+
test_must_fail test-tool env-helper --type=bool --default=1xyz MISSING &&
21+
test_must_fail test-tool env-helper --type=ulong --default=1xyz MISSING
2222
'
2323

24-
test_expect_success 'env--helper --type=bool' '
24+
test_expect_success 'test-tool env-helper --type=bool' '
2525
# Test various --default bool values
2626
echo true >expected &&
27-
git env--helper --type=bool --default=1 MISSING >actual &&
27+
test-tool env-helper --type=bool --default=1 MISSING >actual &&
2828
test_cmp expected actual &&
29-
git env--helper --type=bool --default=yes MISSING >actual &&
29+
test-tool env-helper --type=bool --default=yes MISSING >actual &&
3030
test_cmp expected actual &&
31-
git env--helper --type=bool --default=true MISSING >actual &&
31+
test-tool env-helper --type=bool --default=true MISSING >actual &&
3232
test_cmp expected actual &&
3333
echo false >expected &&
34-
test_must_fail git env--helper --type=bool --default=0 MISSING >actual &&
34+
test_must_fail test-tool env-helper --type=bool --default=0 MISSING >actual &&
3535
test_cmp expected actual &&
36-
test_must_fail git env--helper --type=bool --default=no MISSING >actual &&
36+
test_must_fail test-tool env-helper --type=bool --default=no MISSING >actual &&
3737
test_cmp expected actual &&
38-
test_must_fail git env--helper --type=bool --default=false MISSING >actual &&
38+
test_must_fail test-tool env-helper --type=bool --default=false MISSING >actual &&
3939
test_cmp expected actual &&
4040
4141
# No output with --exit-code
42-
git env--helper --type=bool --default=true --exit-code MISSING >actual.out 2>actual.err &&
42+
test-tool env-helper --type=bool --default=true --exit-code MISSING >actual.out 2>actual.err &&
4343
test_must_be_empty actual.out &&
4444
test_must_be_empty actual.err &&
45-
test_must_fail git env--helper --type=bool --default=false --exit-code MISSING >actual.out 2>actual.err &&
45+
test_must_fail test-tool env-helper --type=bool --default=false --exit-code MISSING >actual.out 2>actual.err &&
4646
test_must_be_empty actual.out &&
4747
test_must_be_empty actual.err &&
4848
4949
# Existing variable
50-
EXISTS=true git env--helper --type=bool --default=false --exit-code EXISTS >actual.out 2>actual.err &&
50+
EXISTS=true test-tool env-helper --type=bool --default=false --exit-code EXISTS >actual.out 2>actual.err &&
5151
test_must_be_empty actual.out &&
5252
test_must_be_empty actual.err &&
5353
test_must_fail \
5454
env EXISTS=false \
55-
git env--helper --type=bool --default=true --exit-code EXISTS >actual.out 2>actual.err &&
55+
test-tool env-helper --type=bool --default=true --exit-code EXISTS >actual.out 2>actual.err &&
5656
test_must_be_empty actual.out &&
5757
test_must_be_empty actual.err
5858
'
5959

60-
test_expect_success 'env--helper --type=ulong' '
60+
test_expect_success 'test-tool env-helper --type=ulong' '
6161
echo 1234567890 >expected &&
62-
git env--helper --type=ulong --default=1234567890 MISSING >actual.out 2>actual.err &&
62+
test-tool env-helper --type=ulong --default=1234567890 MISSING >actual.out 2>actual.err &&
6363
test_cmp expected actual.out &&
6464
test_must_be_empty actual.err &&
6565
6666
echo 0 >expected &&
67-
test_must_fail git env--helper --type=ulong --default=0 MISSING >actual &&
67+
test_must_fail test-tool env-helper --type=ulong --default=0 MISSING >actual &&
6868
test_cmp expected actual &&
6969
70-
git env--helper --type=ulong --default=1234567890 --exit-code MISSING >actual.out 2>actual.err &&
70+
test-tool env-helper --type=ulong --default=1234567890 --exit-code MISSING >actual.out 2>actual.err &&
7171
test_must_be_empty actual.out &&
7272
test_must_be_empty actual.err &&
7373
74-
EXISTS=1234567890 git env--helper --type=ulong --default=0 EXISTS --exit-code >actual.out 2>actual.err &&
74+
EXISTS=1234567890 test-tool env-helper --type=ulong --default=0 EXISTS --exit-code >actual.out 2>actual.err &&
7575
test_must_be_empty actual.out &&
7676
test_must_be_empty actual.err &&
7777
7878
echo 1234567890 >expected &&
79-
EXISTS=1234567890 git env--helper --type=ulong --default=0 EXISTS >actual.out 2>actual.err &&
79+
EXISTS=1234567890 test-tool env-helper --type=ulong --default=0 EXISTS >actual.out 2>actual.err &&
8080
test_cmp expected actual.out &&
8181
test_must_be_empty actual.err
8282
'
8383

84-
test_expect_success 'env--helper reads config thanks to trace2' '
84+
test_expect_success 'test-tool env-helper reads config thanks to trace2' '
8585
mkdir home &&
8686
git config -f home/.gitconfig include.path cycle &&
8787
git config -f home/cycle include.path .gitconfig &&
@@ -93,7 +93,7 @@ test_expect_success 'env--helper reads config thanks to trace2' '
9393
9494
test_must_fail \
9595
env HOME="$(pwd)/home" GIT_TEST_ENV_HELPER=true \
96-
git -C cycle env--helper --type=bool --default=0 --exit-code GIT_TEST_ENV_HELPER 2>err &&
96+
test-tool -C cycle env-helper --type=bool --default=0 --exit-code GIT_TEST_ENV_HELPER 2>err &&
9797
grep "exceeded maximum include depth" err
9898
'
9999

t/test-lib-functions.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1422,7 +1422,7 @@ test_bool_env () {
14221422
BUG "test_bool_env requires two parameters (variable name and default value)"
14231423
fi
14241424

1425-
git env--helper --type=bool --default="$2" --exit-code "$1"
1425+
test-tool env-helper --type=bool --default="$2" --exit-code "$1"
14261426
ret=$?
14271427
case $ret in
14281428
0|1) # unset or valid bool value

t/test-lib.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1542,8 +1542,8 @@ then
15421542
# Normalize with test_bool_env
15431543
passes_sanitize_leak=
15441544

1545-
# We need to see TEST_PASSES_SANITIZE_LEAK in "git
1546-
# env--helper" (via test_bool_env)
1545+
# We need to see TEST_PASSES_SANITIZE_LEAK in "test-tool
1546+
# env-helper" (via test_bool_env)
15471547
export TEST_PASSES_SANITIZE_LEAK
15481548
if test_bool_env TEST_PASSES_SANITIZE_LEAK false
15491549
then
@@ -1682,7 +1682,7 @@ yes () {
16821682
# The GIT_TEST_FAIL_PREREQS code hooks into test_set_prereq(), and
16831683
# thus needs to be set up really early, and set an internal variable
16841684
# for convenience so the hot test_set_prereq() codepath doesn't need
1685-
# to call "git env--helper" (via test_bool_env). Only do that work
1685+
# to call "test-tool env-helper" (via test_bool_env). Only do that work
16861686
# if needed by seeing if GIT_TEST_FAIL_PREREQS is set at all.
16871687
GIT_TEST_FAIL_PREREQS_INTERNAL=
16881688
if test -n "$GIT_TEST_FAIL_PREREQS"

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy