jacebrowning / jacebrowning/gitman

Repo can be cloned with incomplete name

Open
#398 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Python
Stars
225
Forks
36
Avg merge
15h 47m
Merged PRs (30d)
8

Description

in Gitman v3.7, if you use only the "repo" parameter and leave out "name" in a `.gitman.yml`, you may end up with a stripped name... for example given this configuration a "ctu-mrs" folder is created even though the repo name is "ctu-mrs.github.io"

```yaml
location: .
sources:
- repo: https://github.com/ctu-mrs/ctu-mrs.github.io.git
rev: master
```

It can be mitigated by specifying a name, in which case the created folder is "ctu-mrs.github.io", matching the repo name

```yaml
location: .
sources:
- name: ctu-mrs.github.io
repo: https://github.com/ctu-mrs/ctu-mrs.github.io.git
rev: master
```

This doesn't match Git's behavior so it must be an issue on Gitman's side

```bash
git clone https://github.com/ctu-mrs/ctu-mrs.github.io.git
Cloning into 'ctu-mrs.github.io'...
...
```

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the `.gitman.yml` example using only the `repo` parameter and compare the created directory with `git clone` behavior. Trace how Gitman derives a folder name when `name` is omitted; done means the folder uses the full repository name, such as `ctu-mrs.github.io`, without requiring an explicit `name`.

Written by the indexing model from the issue text.

Assessment

Tech stack
git, python
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.