Skip to content

Bug: Output filename incorrectly generated for certain GitHub URL formats #13

@mcmd

Description

@mcmd

Description

The git2txt tool sometimes generates incorrect output filenames when processing certain GitHub repository URL formats. This happens because the repository name extraction logic doesn't handle all URL formats consistently.

Steps to Reproduce

  1. Run the tool with a GitHub URL ending in a slash:

    git2txt https://github.com/username/repository/

    Expected: Output file named repository.txt
    Actual: Output file named .txt

  2. Run the tool with a short format URL:

    git2txt username/repository

    Expected: Output file named repository.txt
    Actual: Output file named repository.txt (works correctly)

  3. Run the tool with an SSH URL:

    git2txt git@github.com:username/repository

    Expected: Output file named repository.txt
    Actual: Output file named repository (missing .txt extension)

Impact

  • Users get unexpected output filenames
  • Some formats result in files without the .txt extension
  • URLs with trailing slashes create files named just .txt

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