Skip to content

GitwebUrl doesn't use correct port #5

@bukzor

Description

@bukzor

The reported GitwebUrl assumes that the service will always be on port 80. This is untrue. The -port input should be used to append a :$port to the domain name when the port is not 80.

Current behavior:

$ ./goit 
Usage of ./goit:
  -excludeRegexp="": Exlude paths from being listed
  -gitwebServer="localhost": Gitweb server's hostname
  -port="8080": Port to listen from
  -runServer=false: Run web server or just print repositories

$ ./goit  .
{"Name":"goit","Path":"/home/buck/trees/theirs/goit","RelativePath":"home/buck/trees/theirs/goit","GitwebUrl":"https://localhost?p=home/buck/trees/theirs/goit","Type":1}

Correct behavior:

$ ./goit  .
{"Name":"goit","Path":"/home/buck/trees/theirs/goit","RelativePath":"home/buck/trees/theirs/goit","GitwebUrl":"https://localhost:8080?p=home/buck/trees/theirs/goit","Type":1}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions