Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automating mappings search #32

Open
Minoru opened this issue Jul 2, 2017 · 0 comments
Open

Automating mappings search #32

Minoru opened this issue Jul 2, 2017 · 0 comments
Labels

Comments

@Minoru
Copy link
Collaborator

Minoru commented Jul 2, 2017

Consider the best-case scenario of dealing with dangling references, as described in README:

The best-case scenario for you is that you find a repo that still has these commits. You can then look at their metadata (commit message, date etc.) and find the corresponding commits in the submodule's new history.

This could be automated:

  1. user redirects git-submerge's error to a file. It doesn't even need to be a special format—we can just read anything that looks like a SHA-1, and ignore the rest;

  2. user runs some other tool (let's call it helper) in a repository that might still have some of those old commits. The tool looks up the SHA-1, and if it finds the object, it should look through the rest of the objects to find any that have the same metadata (date, author, commit message etc.) We'll presume that dangling references are because of cherry-picking.

  3. The tool outputs a mappings file in the format acceptable to --mappings-file (yet to be implemented).

Technically this breaks my ideology of "commit is a statement", because if commit ID changed after cherry-picking, then the state of this commit is different from original (even if the metadata is the same). So if we just use it in place of another, we might be breaking a statement someone made about the repo (because they included another commit, not this one).

But other users of git-submerge might not care about my ideology.

@Minoru Minoru added the question label Jul 2, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant