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

Bug in GitFetcher.fetchRemotes() #27

Open
eneveu opened this issue Apr 7, 2022 · 0 comments
Open

Bug in GitFetcher.fetchRemotes() #27

eneveu opened this issue Apr 7, 2022 · 0 comments

Comments

@eneveu
Copy link
Contributor

eneveu commented Apr 7, 2022

I was looking at the code to understand how version.autoFetch works, and I think there is a bug here:

def fetchRemotes(remotes: Seq[String], timeout: Duration)(implicit logger: Logger): Seq[FetchResult] = {
val outputLogger = new BufferingProcessLogger
val processResult = Process("git remote") ! outputLogger
processResult match {
case 0 =>
logger.debug("Fetching remote sources...")
val remotes = outputLogger.stdout
val tagsToFetch = remotes.filter(remotes.contains)

The remotes parameter is shadowed by the remotes val. So the parameter is never used.

Not sure how best to fix this, since I don't yet understand what the code is supposed to do :)

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

No branches or pull requests

1 participant