gitingest icon indicating copy to clipboard operation
gitingest copied to clipboard

bug: async ingest doesn't work for multiple repos

Open Pedrexus opened this issue 9 months ago • 3 comments

Hello all, thanks for the nice library.

There seems to be a bug while trying to ingest multiple repos.

At https://github.com/cyclotruc/gitingest/blob/main/src/gitingest/entrypoint.py#L96, you can see that TMP_BASE_PATH is completely eliminated.

TMP_BASE_PATH is defined here: https://github.com/cyclotruc/gitingest/blob/main/src/gitingest/config.py#L13.

The issue is that the TMP_BASE_PATH is emptied on each iteration.

Here is an example:

async def main():
    urls = [
        "https://github.com/cyclotruc/gitingest",
        "https://github.com/pandas-dev/pandas", 
        "https://github.com/microsoft/vscode"   
    ]

    tasks = map(ingest_async, urls)
    results = await tqdm.gather(*tasks, desc="Processing repositories")
RuntimeError: Command failed: git clone --single-branch --depth=1 https://github.com/microsoft/vscode /tmp/gitingest/96cf934b-3ae9-4e46-9387-401c55414568/microsoft-vscode
Error: Cloning into '/tmp/gitingest/96cf934b-3ae9-4e46-9387-401c55414568/microsoft-vscode'...
fatal: Unable to create '/tmp/gitingest/96cf934b-3ae9-4e46-9387-401c55414568/microsoft-vscode/.git/shallow.lock': No such file or directory
Processing repositories:  33%|██████            | 1/3 [00:08<00:16,  8.22s/it

Pedrexus avatar Apr 20 '25 06:04 Pedrexus

LMK if you need help and we could open a PR

Pedrexus avatar Apr 21 '25 06:04 Pedrexus

Thanks @Pedrexus! Yes, it would be great if you could make a PR. Let me know if you need any help! :)

filipchristiansen avatar Jun 22 '25 19:06 filipchristiansen

Thank for the positive response.

@dmnunez1993 can you open the PR?

Pedrexus avatar Jun 23 '25 07:06 Pedrexus