Skip to content

Bug in GitFetcher.fetchRemotes() #27

@eneveu

Description

@eneveu

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 :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions