Skip to content

Conversation

@vanphuc1201
Copy link
Contributor

Exercise Review

Exercise Discussion

#89

Checklist

  • If you require a new remote repository on the Git-Mastery organization, have you created a request for it?
  • Have you written unit tests using repo-smith to validate the exercise grading scheme?
  • Have you tested the download script using test-download.sh?
  • Have you verified that this exercise does not already exist or is not currently in review?
  • Did you introduce a new grading mechanism that should belong to git-autograder?
  • Did you introduce a new dependency that should belong to app?

@damithc damithc linked an issue Nov 2, 2025 that may be closed by this pull request
1 task
@woojiahao woojiahao added exercise review Review a proposed exercise discussing labels Nov 10, 2025
Copy link
Member

@woojiahao woojiahao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left some comments, the structure for autograding makes sense, but could be improved

has_birdperson = any("Add Birdperson" in msg for msg in commit_messages_in_others)
has_cyborg = any("Add Cyborg to birdperson.txt" in msg for msg in commit_messages_in_others)
has_tammy = any("Add Tammy" in msg for msg in commit_messages_in_others)
if len(commit_messages_in_others) != 6 or not (has_birdperson and has_cyborg and has_tammy):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A little OOTL, but why is this check for 6, not 3?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When retrieving commits from the others branch, it also includes the commits from main that existed before the branch was created. Therefore, the total number of commits is 5 instead of 3 (since I deleted the first tag, it now counts as 5).

@VikramGoyal23
Copy link
Collaborator

LGTM! I'll wait for @woojiahao's input on this.

Copy link
Collaborator

@jovnc jovnc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the contribution! Some changes are needed before we can merge this PR, as there seems to be some issues with the verification logic that affect the correctness of the program

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file should be removed


# Check that commits in others are only the initial 3 commits
if len(commit_messages_in_others) != 5 or not all(
msg in commit_messages_in_others for msg in [ADD_BIRDPERSON, ADD_CYBORG, ADD_TAMMY]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
msg in commit_messages_in_others for msg in [ADD_BIRDPERSON, ADD_CYBORG, ADD_TAMMY]
msg in commit_messages_in_others for msg in [ADD_BIRDPERSON, ADD_CYBORG, ADD_TAMMY, ADD_RICK, ADD_MORTY]

Would be good to verify all 5 commits exist in the other branch

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Image

It should also be 6, seems like when we set up the exercise using test-download.sh there is 6 commits including the initial commit.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This likely will require updating the repo-smith tests as well to include the initial commit


## Task

You have a repository with two branches:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we use gitGraph mermaid diagrams here instead? This can be copied from the issue description.

gitGraph BT:
    commit id: "Add Rick"
    commit id: "[main] Add Morty"
    branch others
    commit id: "Add Birdperson"
    commit id: "Add Cyborg to birdperson.txt"
    commit id: "[HEAD → other] Add Tammy"
Loading

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Collaborator

@jovnc jovnc Dec 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently the website isn't updated with the new exercises, hence I forsee that it might lead to some inconvenience during beta testing stage when we need to refer to instructions for the exercise. Perhaps, we can update all the README.md to point to the website once the exercises are ready after testing.

Here's an example of README.md that we can have next time, given that the URL fragment identifier follows exercise-<EXERCISE_NAME>

Refer to [here](https://git-mastery.github.io/exercises-directory/index.html#exercise-ff-unfo) for more information

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup. We should do this for all exercises. In future, I'll add the exercise description to the website when I post the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

discussing exercise review Review a proposed exercise

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Exercise Discussion] T6L2/ff-undo

5 participants