Skip to content

Project 2 spec, Gitlet merge command #4

@GuardianWang

Description

@GuardianWang

Hi CS61B Contributors,

I am from Brown and during this summer, I'm studying Java with this excellent course. Recently I'm doing project 2 Gitlet. The description of merge command says

If the split point is the current branch, then the effect is to check out the given branch.

However, it would be better if the difference between merge with a fast-forward current branch and checkout is further clarified. When merging in this condition,

  • the current branch is still the previous branch, and
  • the branch head will points at the other branch.

For example, if we are at branch master and HEAD points to commit c1. Branch other points to commit c2.

                        *master     other
*------------*------------*------------*
                         c1           c2

After merge other, the status is expected to be

                                     *master
                                      other
*------------*------------*------------*
                         c1           c2

However, if we only checkout other, then the status is

                        master     *other
*------------*------------*------------*
                         c1           c2

I'm not sure about the details about your autograder, but I believe it's better to add more clarification in the spec.

Thanks a lot.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions