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

Auto-reduce deleted lines #34

Open
yairchu opened this issue Nov 10, 2021 · 0 comments
Open

Auto-reduce deleted lines #34

yairchu opened this issue Nov 10, 2021 · 0 comments

Comments

@yairchu
Copy link
Collaborator

yairchu commented Nov 10, 2021

Just had this conflict:

<<<<<<< HEAD
        addItem <-
            ConvertM.typeProtectedSetToVal
            <&>
            \protectedSetToVal tag ->
            do
                _ <-
                    DataOps.newHole
                    >>= ExprIRef.newValI . cons . (V.RowExtend tag ?? stored ^. ExprIRef.iref)
                    >>= protectedSetToVal stored
                DataOps.setTagOrder tag (Set.size existingTags)
        let resultInfo = ConvertTag.TagResultInfo <$> EntityId.ofTag (pl ^. Input.entityId) <*> addItem
        ConvertTag.replace nameWithoutContext existingTags resultInfo >>= ConvertM . lift
    where
        stored = pl ^. Input.stored
||||||| parent of e8ff6966d (wip)
        addItem <-
            ConvertM.typeProtectedSetToVal
            <&>
            \protectedSetToVal tag ->
            do
                _ <-
                    DataOps.newHole
                    >>= ExprIRef.newValI . cons . (V.RowExtend tag ?? stored ^. ExprIRef.iref)
                    >>= protectedSetToVal stored
                DataOps.setTagOrder tag (Set.size existingTags)
        ConvertTag.replace nameWithoutContext existingTags (EntityId.ofTag (pl ^. Input.entityId)) addItem
            >>= ConvertM . lift
    where
        stored = pl ^. Input.stored
=======
        protectedSetToVal <- ConvertM.typeProtectedSetToVal
        genNewExtendId <- transaction newKey & ConvertM.convertOnce <&> Lens.mapped %~ unsafeFromUUID
        let addItem tag =
                do
                    _ <-
                        DataOps.newHole
                        >>= ExprIRef.newValI . cons . (V.RowExtend tag ?? stored ^. ExprIRef.iref)
                        >>= protectedSetToVal stored
                    DataOps.setTagOrder tag (Set.size existingTags)
        ConvertTag.replace nameWithoutContext existingTags (EntityId.ofTag _) addItem
            >>= ConvertM . lift
>>>>>>> e8ff6966d (wip)

git-mediate -d ends with:

             >>= ConvertM . lift
-    where
-        stored = pl ^. Input.stored

The two removed lines are the end are exactly the last two lines in BASE and HEAD. It could have special case for removals in start and end that match the content and reduce those automatically. git doesn't do it on its own so perhaps there's a good reason not to?

@yairchu yairchu changed the title Auto-reduce some conflicts Auto-reduce deleted lines Aug 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant