twosigma / twosigma/git-meta

merge operations (e.g., cherry-pick) behave badly when conflicting submodule adds/removals

Open
#561 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
233
Forks
54
PR merge metrics
No merged PRs in 30d

Description

TL;DR: we need to make sure we show correct information in `git meta status` that guides the user to the right resolution steps in the case of conflicts involving submodule additions and removals, e.g.:

* added both sides but with different shas
* removed on one side but changes on the other

Project: https://github.com/twosigma/git-meta/projects/6

e.g.:
```bash
$ write-repos -o 'a=B:Ca-1;Cb-1;Ba=a;Bb=b|x=S:C2-1 s=Sa:a;C3-1 s=Sa:b;Bmaster=2;Bfoo=3'
$ cd x
x$ git meta rebase foo
First, rewinding head to replay your work on top of it...
Applying 'message'
Conflicting entries for submodule s

x$ git st
HEAD detached at f95c3bf
Unmerged paths:
(use "git reset HEAD ..." to unstage)
(use "git add ..." to mark resolution)

both added: s

no changes added to commit (use "git add" and/or "git commit -a")
x$ git meta status
On detached head f95c3b.
A rebase is in progress.
(after resolving conflicts mark the corrected paths
with 'git meta add', then run "git meta rebase --continue")
(use "git meta rebase --abort" to check out the original branch)
nothing to commit, working tree clean
x$ git checkout --ours s
x$ git st
HEAD detached at f95c3bf
Unmerged paths:
(use "git reset HEAD ..." to unstage)
(use "git add ..." to mark resolution)

both added: s

no changes added to commit (use "git add" and/or "git commit -a")
x$ git add s
error: unable to index file s
fatal: updating files failed
```

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.