Skip to content

W9 M2: Add working-tree demo segment and Module 2 writeup - #74

Open
Saanvi521 wants to merge 1 commit into
mainfrom
docs/week9-working-tree-demo
Open

Saanvi521 wants to merge 1 commit into
mainfrom
docs/week9-working-tree-demo

Conversation

@Saanvi521

Copy link
Copy Markdown
Collaborator

Summary

  • Adds the Module 2 working-tree segment to docs/demo.md: three states (committed, staged, edited again), safe branch switching, and conflict resolution, with the real command output.
  • Adds docs/writeups/module-2.md: index snapshots, nested trees, the status model, Myers diff, diff output, checkout safety, and measured results.
  • Updates the README so the status description matches the current output and links the new docs.
  • Documentation only. No code or test changes.

Validation

  • scripts/quality-check.sh (lint, format check, and 445 tests pass)
  • Manual testing, if applicable: ran the three demo parts by hand in new empty folders on 2026-11-19 at 2e87586, Python 3.13.5, macOS on Apple silicon. Output matches the demo apart from commit hashes.
    • Part 1: add, commit, edit again, then status and diff (the commit saves the staged version, not the file on disk).
    • Part 2: branch switch refused for local edits and for an untracked file that would be overwritten; clean switch restores bytes, executable bit, and index.
    • Part 3: merge conflict, unresolved status, early commit refused, resolve with add, then the merge commit.

Checklist

  • The change is focused and easy to review.
  • Tests were added or updated for behavior changes. (N/A: no behavior changes.)
  • Documentation was updated for user-facing or setup changes.
  • No secrets, generated artifacts, or local-only files are included.

Notes for Reviewers

  • The teammate rehearsal of the working-tree segment is still pending.
  • Rehearsals found no Module 2 defects. Observations only: init and add print nothing on success, and the conflict marker label is HEAD.
  • The <<<<<<<, =======, and >>>>>>> lines in the demo are example output inside a code block, not a real conflict. VS Code highlights them as one.

@Saanvi521 Saanvi521 changed the title Add working-tree demo segment and Module 2 writeup W9 M2: Add working-tree demo segment and Module 2 writeup Nov 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant