GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — [Outreachy] repo: zero-initialize configuration values by Joiejoie1 · Pull Request #2298 · gitgitgadget/git

[Outreachy] repo: zero-initialize configuration values #2298

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.

Sign up for GitHub

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

Open
Joiejoie1 wants to merge 187 commits into gitgitgadget:seen
base: seen
Loading
Loading
from Joiejoie1:repo-zero-initialize-config-values

Uh oh!

There was an error while loading. Please reload this page.

Open

[Outreachy] repo: zero-initialize configuration values #2298

Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
187 commits
Select commit Hold shift + click to select a range
3de34b0
http: preserve wwwauth_headers across redirects
aaronp24 Aug 20, 2026
cf9d8ab
commit: allow -m/-F for all kinds of --fixup
CervEdin Sep 22, 2026
cb7fe80
commit: allow -c/-C for all kinds of --fixup
CervEdin Sep 22, 2026
8989e7a
credential/libsecret: load secrets explicitly
mvdan Sep 27, 2026
608ec22
repo: add path.toplevel with absolute and relative suffix formatting
jayatheerthkulkarni Sep 27, 2026
81ee592
submodule: use repository to find superproject
jayatheerthkulkarni Sep 27, 2026
86c88d9
repo: add path.superproject-root with absolute and relative suffixes
jayatheerthkulkarni Sep 27, 2026
ea07616
repo: add path.hooks with absolute and relative suffixes
jayatheerthkulkarni Sep 27, 2026
f8ca76b
repo: add path.index with absolute and relative suffixes
jayatheerthkulkarni Sep 27, 2026
d7a45a6
repo: add path.grafts with absolute and relative suffixes
jayatheerthkulkarni Sep 27, 2026
4223526
repo: add path.git-prefix
jayatheerthkulkarni Sep 27, 2026
2db363c
repo: add path.cdup
jayatheerthkulkarni Sep 27, 2026
a7fcda4
fsmonitor: check the untracked cache after a trivial response
k15tfu Oct 4, 2026
872f624
archive-tar: guard get_path_prefix against zero-length input
dscho Oct 14, 2026
5462e16
http: use `size_t` for byte position in fwrite_sha1_file
dscho Oct 14, 2026
a476fb4
wrapper: reject insanely large byte counts when reading/writing
dscho Oct 14, 2026
3284c55
git-compat-util: add `signed_mult_overflows` and `mult_overflows` macros
dscho Oct 14, 2026
12cb838
date: avoid overflow in approxidate relative-time multiplication
dscho Oct 14, 2026
2abc53d
doc: checkout: rewrite detached HEAD state explanation
jvns Oct 16, 2026
7b65579
SQUASH???
gitster Oct 16, 2026
1971f35
t1010: add basic tests for mktree --batch
rogerkorantenng Oct 20, 2026
78c418f
rerere: rename `repo_rerere()`
pks-t Oct 29, 2026
ebaccb2
rerere: convert flags into an enum
pks-t Oct 29, 2026
4195523
builtin/rerere: drop `the_repository`
pks-t Oct 29, 2026
62932a4
builtin/rerere: stop passing flags to subcommands that ignore them
pks-t Oct 29, 2026
9b19404
builtin/rerere: turn "forget" into a proper subcommand
pks-t Oct 29, 2026
3bcf76b
builtin/rerere: turn "clear" into a proper subcommand
pks-t Oct 29, 2026
e4c7113
builtin/rerere: turn "status" into a proper subcommand
pks-t Oct 29, 2026
951de3f
builtin/rerere: turn "remaining" into a proper subcommand
pks-t Oct 29, 2026
b24052e
builtin/rerere: turn "diff" into a proper subcommand
pks-t Oct 29, 2026
9359378
builtin/rerere: turn "gc" into a proper subcommand
pks-t Oct 29, 2026
6f0881e
builtin/rerere: use `OPT_SUBCOMMAND()`
pks-t Oct 29, 2026
fba7572
builtin/rerere: introduce proper usage strings for subcommands
pks-t Oct 29, 2026
21b6106
fetch: add remote.<name>.fetchRefmap
HaraldNordgren Oct 30, 2026
62a80b6
fetch: extract collect_upstream_from_remote() helper
HaraldNordgren Oct 30, 2026
577a2eb
fetch: infer branches to fetch from a refmap-only remote
HaraldNordgren Oct 30, 2026
3cac0a7
remote: add "git remote add --limited-fetch"
HaraldNordgren Oct 30, 2026
9271cd7
remote: default to --limited-fetch in a shallow repository
HaraldNordgren Oct 30, 2026
392bede
remote: resolve @{push} through remote.<name>.fetchRefmap
HaraldNordgren Oct 30, 2026
2f58a01
t4219: test more --follow cases across merges
vmiklos Oct 30, 2026
16c1763
log: extract showing the remerge/combined diff of a merge commit
vmiklos Oct 30, 2026
3cbc233
log: fix -m --follow losing the history of later parents
vmiklos Oct 30, 2026
1d03618
log: simplify --follow following renames for non-linear history
vmiklos Oct 30, 2026
4b69b5a
log: speed up --follow following renames for non-linear history
vmiklos Oct 30, 2026
b2c54d5
log: fix --follow following an edit on a side the merge did not take
vmiklos Oct 30, 2026
348bb65
branch: move the deleteMerged opt-out check into a helper
HaraldNordgren Nov 1, 2026
b078cde
branch: let delete_branches() name where a branch landed
HaraldNordgren Nov 1, 2026
6566f71
branch: add --delete-integrated to delete rebase and squash merged br…
HaraldNordgren Nov 1, 2026
c70f08f
branch: let --delete-integrated find branches merged onto changed files
HaraldNordgren Nov 1, 2026
157a856
doc: glossary: add root ref and clarify pseudorefs
ak2 Nov 1, 2026
391b5d5
doc: glossary: update per-worktree refs
ak2 Nov 1, 2026
8512715
doc: stop calling root refs pseudorefs
ak2 Nov 1, 2026
b5e5f30
refs: stop calling root refs pseudorefs
ak2 Nov 1, 2026
8046254
t: stop calling root refs pseudorefs
ak2 Nov 1, 2026
c3e74dd
http: fix retry count and Retry-After timing
rmistry Nov 3, 2026
9587e40
http: add exponential backoff without Retry-After
rmistry Nov 3, 2026
2640c8a
http: add http.retryStatusCodes config option
rmistry Nov 3, 2026
67a512f
remote-curl: retry transient HTTP errors in post_rpc()
rmistry Nov 3, 2026
9346fa5
reflog: name the strings that mark switches, renames and rebase steps
HaraldNordgren Nov 4, 2026
59a29cb
pretty: add %gb to name the branch of each reflog entry
HaraldNordgren Nov 4, 2026
7bea8a9
doc: git-diff: rewrite EXAMPLES section
jvns Nov 5, 2026
7bab757
SQUASH???
gitster Nov 5, 2026
7bf4c6d
Merge branch 'hn/ci-fail-on-missing-deps' into jch
gitster Nov 6, 2026
a4306fe
Merge branch 'mc/status-index-lock' into jch
gitster Nov 6, 2026
710d5e1
Merge branch 'pw/sequencer-delete-rebase-head' into jch
gitster Nov 6, 2026
ef165d1
Merge branch 'hk/config-log-typofix' into jch
gitster Nov 6, 2026
f2d27a9
Merge branch 'oa/bundle-uri-drop-the-repository' into jch
gitster Nov 6, 2026
078ab7e
Merge branch 'ps/repo-ref-storage-format-fix' into jch
gitster Nov 6, 2026
b34580a
Merge branch 'kn/fetch-tag-backfill-batch-fix' into jch
gitster Nov 6, 2026
58aa049
Merge branch 'ps/gitlab-ci-whitespace-job-shallow-clone-fix' into jch
gitster Nov 6, 2026
8b2e2fb
Merge branch 'iw/connected-deepen-fetch-no-alternate-refs' into jch
gitster Nov 6, 2026
f2d8f4a
Merge branch 'ps/odb-object-storage-extension' into jch
gitster Nov 6, 2026
f0d591d
Merge branch 'sp/t0001-avoid-pipe' into jch
gitster Nov 6, 2026
77c8555
Merge branch 'sj/oss-fuzz-commit-graph-gitdir' into jch
gitster Nov 6, 2026
5df235e
Merge branch 'ot/t5300-test-path-is-file' into jch
gitster Nov 6, 2026
b5d7c08
Merge branch 'tk/t0410-test-path-exists' into jch
gitster Nov 6, 2026
b0f6575
Merge branch 'fd/check-ref-format-onelevel-tests' into jch
gitster Nov 6, 2026
f7e6622
Merge branch 'pp/midx-write-skip-empty' into jch
gitster Nov 6, 2026
aea8167
Merge branch 'cr/doc-gpg-ssh-key-lifetime' into jch
gitster Nov 6, 2026
f0a480e
Merge branch 'tk/t5402-test-path-helper' into jch
gitster Nov 6, 2026
60c5f38
Merge branch 'mh/init-show-abspath' into jch
gitster Nov 6, 2026
5f6020d
Merge branch 'sm/prune-packed-libification' into jch
gitster Nov 6, 2026
a5da619
Merge branch 'ps/odb-reload-alternates' into jch
gitster Nov 6, 2026
ab4908f
Merge branch 'je/doc-new-git-tutorial' into jch
gitster Nov 6, 2026
b0f6e8d
Merge branch 'hk/test-t1467-refs-rename' into jch
gitster Nov 6, 2026
1b7fc37
Merge branch 'ps/commit-graph-cleanups' into jch
gitster Nov 6, 2026
a09555c
Merge branch 'jc/mark-static' into jch
gitster Nov 6, 2026
01f40b6
Merge branch 'tb/merge-ort-valueless-rename-config' into jch
gitster Nov 6, 2026
6172e0d
Merge branch 'oa/range-diff-repo' into jch
gitster Nov 6, 2026
8906a0e
Merge branch 'jk/test-env-quoting-fix' into jch
gitster Nov 6, 2026
7dbdfa7
Merge branch 'hn/remote-simple-push-triangular' into jch
gitster Nov 6, 2026
c4468f7
Merge branch 'ep/pack-objects-streamed-large-blobs' into jch
gitster Nov 6, 2026
9a87a43
Merge branch 'ps/ci-consolidate-test-variables' into jch
gitster Nov 6, 2026
d8cb9be
Merge branch 'tc/security-boundary-doc' into jch
gitster Nov 6, 2026
b7d3a45
### match next
gitster Nov 6, 2026
e6ac664
Merge branch 'jc/config-honor-file-permission' into jch
gitster Nov 6, 2026
119adcb
Merge branch 'cc/early-scan-options' into jch
gitster Nov 6, 2026
4bba615
Merge branch 'jt/tmp-objdir-loose-idx-merge' into jch
gitster Nov 6, 2026
87c8acf
Merge branch 'kk/connectivity-check-ignore-replace' into jch
gitster Nov 6, 2026
8ebe5e6
Merge branch 'jc/freeze-repo-config-values' into jch
gitster Nov 6, 2026
b7b69e0
Merge branch 'hn/ci-ubuntu-26.04-fixes' into jch
gitster Nov 6, 2026
331681a
Merge branch 'ep/pack-objects-streamed-large-blobs-fix' into jch
gitster Nov 6, 2026
37e7af3
Merge branch 'cd/shift-root-in-graph-fix' into jch
gitster Nov 6, 2026
86acccb
Merge branch 'll/doc-pushcert-if-asked' into jch
gitster Nov 6, 2026
d3201d6
Merge branch 'ps/commit-graph-write-refactor' into jch
gitster Nov 6, 2026
dce6c12
Merge branch 'jc/branch-doc-consistently-promote-switch' into jch
gitster Nov 6, 2026
5f5b469
Merge branch 'ta/cg-require-perl-5.26.0' into jch
gitster Nov 6, 2026
7e421f5
Merge branch 'tb/repack-cruft-less-midx-corner-cases' into jch
gitster Nov 6, 2026
7ca145f
Merge branch 'ds/path-walk-tagged-tree-revisit' into jch
gitster Nov 6, 2026
f584761
Merge branch 'jt/object-file-error-handling' into jch
gitster Nov 6, 2026
28bcc11
Merge branch 'cu/doc-api-parse-options' into jch
gitster Nov 6, 2026
5e44753
Merge branch 'ta/ci-retire-cirrus-ci' into jch
gitster Nov 6, 2026
c3621e2
Merge branch 'tj/annotate-blame-args' into jch
gitster Nov 6, 2026
b7858f2
Merge branch 'ik/fsmonitor-untracked-cache-trivial-response' into jch
gitster Nov 6, 2026
7605e0f
Merge branch 'js/doc-test-fix-anti-pattern' into jch
gitster Nov 6, 2026
f6f0f26
Merge branch 'tj/drop-no-parseopt' into jch
gitster Nov 6, 2026
703c9a1
Merge branch 'sp/submodule-abbrev-fix' into jch
gitster Nov 6, 2026
262fde9
Merge branch 'kk/quarantine-alternate-refs' into jch
gitster Nov 6, 2026
c8091b8
###
gitster Nov 6, 2026
0a2d91e
Merge branch 'pw/stash-change-check-only-once' into jch
gitster Nov 6, 2026
1cb5089
###
gitster Nov 6, 2026
464c116
Merge branch 'ps/odb-loose-stale-cache' into jch
gitster Nov 6, 2026
d202601
Merge branch 'je/doc-git-diff-examples' into jch
gitster Nov 6, 2026
0188b86
Merge branch 'rm/http-retry-improvements' into jch
gitster Nov 6, 2026
b4c6750
Merge branch 'dw/config-read-both-global' into jch
gitster Nov 6, 2026
829463d
Merge branch 'tc/push-force-if-includes-fixes' into seen
gitster Nov 6, 2026
3844fdb
Merge branch 'ec/commit-fixup-options' into seen
gitster Nov 6, 2026
d82158e
Merge branch 'td/ls-files-untracked-cache' into seen
gitster Nov 6, 2026
128c699
Merge branch 'hn/status-push-rebased-on-newer-upstream' into seen
gitster Nov 6, 2026
8f15521
Merge branch 'qs/repack-kept-pack-fix' into seen
gitster Nov 6, 2026
667fd97
Merge branch 'js/push-refspec-match-speedup' into seen
gitster Nov 6, 2026
1d4b356
Merge branch 'hn/fetch-refmap' into seen
gitster Nov 6, 2026
0096c05
Merge branch 'bb/imap-send-openssl-set-verify' into seen
gitster Nov 6, 2026
685cb87
Merge branch 'jw/wait-for-index-lock' into seen
gitster Nov 6, 2026
10935c5
Merge branch 'cs/read-cache-conversion-size' into seen
gitster Nov 6, 2026
a9db844
Merge branch 'mf/complete-log-graph-indent' into seen
gitster Nov 6, 2026
79bdce2
Merge branch 'js/coverity-overflow-fixes' into seen
gitster Nov 6, 2026
c0087c3
Merge branch 'ak/pretty-wrap-fix' into seen
gitster Nov 6, 2026
25e12cd
Merge branch 'dt/t0410-missing-tree-test' into seen
gitster Nov 6, 2026
adb30ae
Merge branch 'yn/worktree-repair-fix' into seen
gitster Nov 6, 2026
7557dc9
Merge branch 'mv/log-follow-speedup' into seen
gitster Nov 6, 2026
d7de9e7
Merge branch 'ab/describe-no-i18n-of-debug-messages' into seen
gitster Nov 6, 2026
dfeb45b
Merge branch 'vs/refs-seek-fix' into seen
gitster Nov 6, 2026
447f983
Merge branch 'oa/merge-without-the-repository' into seen
gitster Nov 6, 2026
2fa45af
Merge branch 'je/doc-detached-head' into seen
gitster Nov 6, 2026
41351c8
Merge branch 'oa/merge-blobs-stop-using-the-repository' into seen
gitster Nov 6, 2026
92c8819
Merge branch 'tb/sideband-skip-unrecognized-allow-control-characters'…
gitster Nov 6, 2026
e1ebc40
Merge branch 'ss/t2403-modernize-test-d' into seen
gitster Nov 6, 2026
b89f363
Merge branch 'os/rebase-doc-incompatible-options' into seen
gitster Nov 6, 2026
7c7aa9f
Merge branch 'tb/negotiator-skipping-parse-parents' into seen
gitster Nov 6, 2026
88b0ece
Merge branch 'ag/fsck-connectivity-count' into seen
gitster Nov 6, 2026
23ea833
Merge branch 'rk/mktree-batch-tests' into seen
gitster Nov 6, 2026
1abd4b9
Merge branch 'hn/fetch-shallow-v2-fix' into seen
gitster Nov 6, 2026
016a211
Merge branch 'jg/t3429-test-path-is-file' into seen
gitster Nov 6, 2026
37010e7
Merge branch 'hn/status-compare-branches-default' into seen
gitster Nov 6, 2026
ee0bb65
Merge branch 'cc/pack-index-v3' into seen
gitster Nov 6, 2026
a431862
Merge branch 'hn/imap-send-header-fix' into seen
gitster Nov 6, 2026
ae4988e
Merge branch 'ep/status-missing-upstream' into seen
gitster Nov 6, 2026
d955890
Merge branch 'hn/branch-delete-merged-squash' into seen
gitster Nov 6, 2026
ed212b5
Merge branch 'iy/sigchain-recover-concurrent-pops' into seen
gitster Nov 6, 2026
15d76a1
Merge branch 'sp/t2030-modernize-test-path-checks' into seen
gitster Nov 6, 2026
bea3f0c
Merge branch 'hn/reflog-operations' into seen
gitster Nov 6, 2026
6038c12
Merge branch 'ms/reftable-alloc-size-truncation' into seen
gitster Nov 6, 2026
af17a5d
Merge branch 'ak/root-refs-vs-pseudorefs' into seen
gitster Nov 6, 2026
598c26e
Merge branch 'oa/checkout-wo-the-repository' into seen
gitster Nov 6, 2026
d25c0d4
Merge branch 'sp/diff-delta-safe-arithmetic' into seen
gitster Nov 6, 2026
1839eb2
Merge branch 'ag/reflog-count-plural' into seen
gitster Nov 6, 2026
de8bcb0
Merge branch 'ch/remote-defer-follow-remote-head-validation' into seen
gitster Nov 6, 2026
b2013ed
Merge branch 'tc/test-greplint-in-chainlint' into seen
gitster Nov 6, 2026
b0a8393
Merge branch 'sa/submodule-root-relative-url' into seen
gitster Nov 6, 2026
cf5b1ec
Merge branch 'ps/rerere-subcommands' into seen
gitster Nov 6, 2026
57e7543
Merge branch 'sm/test-chmtime-parse-options' into seen
gitster Nov 6, 2026
125bea5
Merge branch 'jk/unit-tests-via-test-lib' into seen
gitster Nov 6, 2026
208a105
Merge branch 'hn/ccache-sloppiness-for-pch' into seen
gitster Nov 6, 2026
e2b75d3
Merge branch 'ps/grep-recurse-submodules-fix' into seen
gitster Nov 6, 2026
049e530
Merge branch 'jc/doc-gitignore-wildcard' into seen
gitster Nov 6, 2026
c9d9b3b
Merge branch 'lt/describe-commit-date-skew' into seen
gitster Nov 6, 2026
3a0e031
###
gitster Nov 6, 2026
5297158
Merge branch 'ap/http-preserve-wwwauth-redirect' into seen
gitster Nov 6, 2026
db8de4e
Merge branch 'kj/repo-info-more-path-keys' into seen
gitster Nov 6, 2026
702cb5a
Merge branch 'bc/restrict-hex-to-lowercase' into seen
gitster Nov 6, 2026
5aad81d
Merge branch 'oa/negotiator-default-no-the-repository' into seen
gitster Nov 6, 2026
5589432
Merge branch 'tc/push-multiple-force-with-lease' into seen
gitster Nov 6, 2026
039dfe3
###
gitster Nov 6, 2026
c98f2a3
Merge branch 'dm/libsecret-explicit-load' into seen
gitster Nov 6, 2026
3de8ebe
Merge branch 'ta/command-list-guides-sync-lint' into seen
gitster Nov 6, 2026
842b6ce
repo: zero-initialize configuration values
Joiejoie1 Nov 5, 2026
File filter
Filter by extension

Clear filters
Conversations
Failed to load comments.
Loading

Uh oh!

There was an error while loading. Please reload this page.

Jump to
Jump to file
Failed to load files.
Loading

Uh oh!

There was an error while loading. Please reload this page.

Diff view
Diff view

There are no files selected for viewing

16 changes: 16 additions & 0 deletions 16 credential.c
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -708,3 +708,19 @@ void credential_from_url(struct credential *c, const char *url)
if (credential_from_url_gently(c, url, 0) < 0)
die(_("credential url cannot be parsed: %s"), url);
}

void credential_update_url(struct credential *c, const char *url)
{
struct strvec wwwauth_headers = STRVEC_INIT;

/*
* credential_from_url() clears the whole credential. Preserve the
* WWW-Authenticate list, which is derived from the server's original
* response rather than from the URL and is required to authenticate to
* the new URL.
*/
SWAP(wwwauth_headers, c->wwwauth_headers);
credential_from_url(c, url);
SWAP(c->wwwauth_headers, wwwauth_headers);
strvec_clear(&wwwauth_headers);
}
8 changes: 8 additions & 0 deletions 8 credential.h
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,14 @@ void credential_write(const struct credential *, FILE *,
void credential_from_url(struct credential *, const char *url);
int credential_from_url_gently(struct credential *, const char *url, int quiet);

/*
* Update the URL-derived fields (protocol, host, path) of an existing
* credential to match a new URL. Unlike credential_from_url(), this function
* preserves state that was derived from a server's HTTP redirect response,
* such as the WWW-Authenticate headers.
*/
void credential_update_url(struct credential *c, const char *url);

int credential_match(const struct credential *want,
const struct credential *have, int match_password);

Expand Down
9 changes: 8 additions & 1 deletion 9 http.c
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -2530,7 +2530,14 @@ static int http_request_recoverable(const char *url,
if (options->effective_url && options->base_url) {
if (update_url_from_redirect(options->base_url,
url, options->effective_url)) {
credential_from_url(&http_auth, options->base_url->buf);
/*
* Use credential_update_url() rather than
* credential_from_url() so that the WWW-Authenticate
* challenge the server sent with the redirect target's
* response is preserved and handed to the credential
* helper.
*/
credential_update_url(&http_auth, options->base_url->buf);
url = options->effective_url->buf;
}
}
Expand Down
1 change: 1 addition & 0 deletions 1 t/lib-httpd/apache.conf
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,7 @@ RewriteRule ^/dumb-redir/(.*)$ /dumb/$1 [R=301]
RewriteRule ^/smart-redir-perm/(.*)$ /smart/$1 [R=301]
RewriteRule ^/smart-redir-temp/(.*)$ /smart/$1 [R=302]
RewriteRule ^/smart-redir-auth/(.*)$ /auth/smart/$1 [R=301]
RewriteRule ^/custom_auth_redir/(.*)$ /custom_auth/$1 [R=302]
RewriteRule ^/smart-redir-limited/(.*)/info/refs$ /smart/$1/info/refs [R=301]
RewriteRule ^/ftp-redir/(.*)$ ftp://localhost:1000/$1 [R=302]

Expand Down
45 changes: 45 additions & 0 deletions 45 t/t5563-simple-http-auth.sh
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -557,6 +557,51 @@ test_expect_success 'access using bearer auth' '
EOF
'

test_expect_success 'bearer auth after redirect preserves wwwauth headers' '
test_when_finished "per_test_cleanup" &&

set_credential_reply get <<-EOF &&
capability[]=authtype
authtype=Bearer
credential=YS1naXQtdG9rZW4=
EOF

cat >"$HTTPD_ROOT_PATH/custom-auth.valid" <<-EOF &&
id=1 creds=Bearer YS1naXQtdG9rZW4=
EOF

cat >"$HTTPD_ROOT_PATH/custom-auth.challenge" <<-EOF &&
id=1 status=200
id=default response=WWW-Authenticate: FooBar param1="value1" param2="value2"
id=default response=WWW-Authenticate: Bearer authorize_uri="id.example.com" p=1 q=0
id=default response=WWW-Authenticate: Basic realm="example.com"
EOF

test_config_global credential.helper test-helper &&
test_config_global credential.useHttpPath true &&
git ls-remote "$HTTPD_URL/custom_auth_redir/repo.git" &&

expect_credential_query get <<-EOF &&
capability[]=authtype
capability[]=state
protocol=http
host=$HTTPD_DEST
path=custom_auth/repo.git
wwwauth[]=FooBar param1="value1" param2="value2"
wwwauth[]=Bearer authorize_uri="id.example.com" p=1 q=0
wwwauth[]=Basic realm="example.com"
EOF

expect_credential_query store <<-EOF
capability[]=authtype
authtype=Bearer
credential=YS1naXQtdG9rZW4=
protocol=http
host=$HTTPD_DEST
path=custom_auth/repo.git
EOF
'

test_expect_success 'access using bearer auth with invalid credentials' '
test_when_finished "per_test_cleanup" &&

Expand Down
Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments. Suggestions cannot be applied while the pull request is queued to merge. Suggestion cannot be applied right now. Please check back later.
You are visitor 01402605 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.