Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add --git-config flag #342

Merged
merged 1 commit into from
Mar 15, 2021

Conversation

thockin
Copy link
Member

@thockin thockin commented Mar 11, 2021

This allows arbitrary git configs to be passed in. For example:

git config --global http.postBuffer 1048576000

git config --global http.sslCAInfo /path/to/cert/file

git config --global http.sslVerify false

This flag takes a comma-separated list of key:val pairs. The key part
is passed to git config and must be a valid gitconfig section header
and variable name. The val part can be either a quoted or unquoted
value. For all values the following escape sequences are supported:

  • \n => [newline]
  • \t => [tab]
  • \" => "
  • \, => ,
  • \\ => \

Within unquoted values, commas MUST be escaped. Within quoted values,
commas MAY be escaped, but are not required to be. Any other escape
sequence is an error.

Example:

--git-config=foo.one:val1,foo.two:"quoted val",foo.three:12345

This commit exposed a bug in runCommand() which modified its args when
they had an embedded space.

Replaces #240 (thanks to @onesolpark for starting it)

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Mar 11, 2021
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: thockin

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot requested a review from stp-ip March 11, 2021 06:32
@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Mar 11, 2021
@thockin thockin force-pushed the add-git-configs-flag-4.x branch from 9b2c1ba to e27306b Compare March 11, 2021 06:50
@k8s-ci-robot
Copy link
Contributor

@thockin: PR needs rebase.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Mar 12, 2021
@thockin thockin force-pushed the add-git-configs-flag-4.x branch from e27306b to 86cae9c Compare March 12, 2021 21:57
@thockin thockin removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Mar 12, 2021
@stp-ip
Copy link
Member

stp-ip commented Mar 15, 2021

Ran into an issue. Investigating.

@thockin
Copy link
Member Author

thockin commented Mar 15, 2021 via email

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Mar 15, 2021
@stp-ip
Copy link
Member

stp-ip commented Mar 15, 2021

Yeah. I missed that in the review #351 as far as I can see. It's due to the file/dir being ambigious to the revision as we removed the "rev-".
Will check it out and overall shouldn't be a blocker here once I boiled down the issue I guess.

@thockin
Copy link
Member Author

thockin commented Mar 15, 2021 via email

@thockin
Copy link
Member Author

thockin commented Mar 15, 2021 via email

@stp-ip
Copy link
Member

stp-ip commented Mar 15, 2021

/hold cancel
/lgtm

@k8s-ci-robot k8s-ci-robot added lgtm "Looks good to me", indicates that a PR is ready to be merged. and removed do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. labels Mar 15, 2021
This allows arbitrary git configs to be passed in.  For example:

`git config --global http.postBuffer 1048576000`

`git config --global http.sslCAInfo /path/to/cert/file`

`git config --global http.sslVerify false`

This flag takes a comma-separated list of `key:val` pairs.  The key part
is passed to `git config` and must be a valid gitconfig section header
and variable name.  The val part can be either a quoted or unquoted
value.  For all values the following escape sequences are supported:
   * `\n` => [newline]
   * `\t` => [tab]
   * `\"` => `"`
   * `\,` => `,`
   * `\\` => `\`

Within unquoted values, commas MUST be escaped. Within quoted values,
commas MAY be escaped, but are not required to be.  Any other escape
sequence is an error.

Example:

`--git-config=foo.one:val1,foo.two:"quoted val",foo.three:12345`

This commit exposed a bug in runCommand() which modified its args when
they had an embedded space.
@thockin thockin force-pushed the add-git-configs-flag-4.x branch from 86cae9c to 83b4dd2 Compare March 15, 2021 16:20
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 15, 2021
@stp-ip
Copy link
Member

stp-ip commented Mar 15, 2021

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 15, 2021
@k8s-ci-robot k8s-ci-robot merged commit 03c87de into kubernetes:master Mar 15, 2021
@thockin thockin deleted the add-git-configs-flag-4.x branch February 25, 2023 22:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants