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

Fix #2 branches with same name in multiple remotes #74

Closed
wants to merge 1 commit into from

Conversation

slackorama
Copy link
Contributor

Use git config to get the correct upstream remote and branch when you
have branch with the same name in multiple remotes (e.g. "origin/master"
and "coworker/master"). Uses awk which may be a problem?

Use `git config` to get the correct upstream remote and branch when you
have branch with the same name in multiple remotes (e.g. "origin/master"
and "coworker/master"). Uses awk which may be a problem?
@michaeldfallen
Copy link
Owner

Thanks for this. Unsure about the ack usage, is it commonly installed? Can we use awk, grep or sed instead?

There were a few tests failing due to mistakes I had made that this highlights so I've fixed those and opened slackorama#1. Once those are in we can merge this.

@michaeldfallen
Copy link
Owner

Closing for now until slackorama#1 is merged. (Just so I remember which PRs I haven't addressed yet).

@slackorama
Copy link
Contributor Author

Sorry I must be missing something. Where did I use ack?

@michaeldfallen
Copy link
Owner

sorry, I meant awk. Yeah I use ack and mistook the two.

Is awk commonly available on systems?

@slackorama
Copy link
Contributor Author

I use ack all the time too so I thought I had put it in there. Whew.

awk is part of POSIX and Single Unix so it's on almost all *nix systems (aside from a few weirdos).

@slackorama
Copy link
Contributor Author

This actually has a bug in it if the branch name has a slash in it (e.g. "feature/foobar").

I just pushed a new branch that has a fix for it and removes the awk calls to use sed instead.

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