ForNeVeR / ForNeVeR/git-submerge

Support submodules in subdirectories

Open
#21 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Rust
Stars
5
Forks
2
PR merge metrics
No merged PRs in 30d

Description

Grabbing some random repo with submodules, we can see that git-submerge 4b79e955d86346373a31984249173a144de9383f works fine for submodules residing in repo's root, but fails for submodules that are in the subdirectories:

```console
$ git clone --recurse-submodules git@github.com:dgmorales/dgmorales.github.io.git
$ cd dgmorales.github.io
$ git submerge sysadmin ; echo $?
Merging sysadmin...
0
$ git submerge cpbr10 ; echo $?
Merging cpbr10...
0
$ git submerge talks/cm-pas ; echo $?
Merging talks/cm-pas...
thread 'main' panicked at 'Couldn't remove submodule path from TreeBuilder: Error { code: -1, klass: 14, message: "Failed to remove entry. File isn\'t in the tree - talks/cm-pas" }', /checkout/src/libcore/result.rs:860
note: Run with `RUST_BACKTRACE=1` for a backtrace.
101
```

Backtrace shows the panic occurs at [src/main.rs:209](https://github.com/Minoru/git-submerge/blob/4b79e955d86346373a31984249173a144de9383f/src/main.rs#L209).

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.