Skip to content

add support for url.*.insteadof in git config - #1443

Merged
technoweenie merged 4 commits into
masterfrom
config-insteadof
Aug 15, 2016
Merged

technoweenie merged 4 commits into
masterfrom
config-insteadof

Conversation

@technoweenie

Copy link
Copy Markdown
Contributor

Rewrite of #1117 after the config refactoring in #1425. There's no readGitInsteadOfConfig() anymore to hook into anymore.

We can't easily support pushinsteadof without bigger changes. config.NewEndpointWithConfig() doesn't know if the request is a push or pull.

Comment thread config/config.go Outdated
if longestalias < alias {
longestalias = alias
} else if longestalias == alias {
fmt.Fprintf(os.Stderr, "WARNING: Multiple 'url.*.insteadof' keys with the same alias: %q", alias)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we have an integration test for this?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why yes, we should, because it caught a bug :)

@ttaylorr

Copy link
Copy Markdown
Contributor

Looks good, let's 🚢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants