Homework 3: VCS, Investigative
Poking around a Git repo: first steps
Jim and Arnold Biscuitson have mostly recovered from that nasty shock of a
dinner party last month. To keep their minds off things, they have been baking.
They track their culinary adventures in a Git repository. This way, they can
collaboratively maintain a history of everything they buy, cook, and bake. We
have obtained this repository with the permission from the Biscuitsons and
stored a copy in /comp/50ISDT/vcs1-biscuitsons
.
Please answer the following questions about their kitchen journal. For each,
try and come up with a command that produces the answer with the minimum amount
of human interpretation of the output; if a command prints all of the
information about every commit, try and pare down the command so that it
directly produces what you want. Provide both the answer and how you arrived
at that answer (“show your work”/”cite your sources”):
- What is the difference between a commit date and an author date? Please
explain in your own words.
- What date did Jim get interested in baking? Please give the full author
date.
- How many grocery trips have there been?
- How many people have authored commits in the repository? Who are they?
- Who went and bought carrots? In what commit?
- Which branch did Bridget use to submit her tips?
- Who took the cookie from the cookie jar?
Poking around a Git repo: round two
Git is not only used by fictional amateur bakers. Many software projects,
including most open source software, use Git to track code changes. GitHub is
one very popular Git hosting site that also provides additional web-based
features such as Issues (for tracking and discussing bugs and feature
requests) and Pull Requests (for proposing and reviewing code changes).
One project that does its primary development on GitHub is Visual Studio Code,
an open-source code editor maintained by Microsoft. For this piece of the
assignment, go to the VS Code repository on GitHub at
microsoft/vscode.
For the following questions, please provide both the answer and how you
arrived at that answer (“show your work”/”cite your sources”). You are welcome
to attempt to answer these questions using the GitHub UI, but you may find it
easier to clone and use the CLI.
- One of the most important things to know about an open-source project you’re
planning to use is whether it’s actively maintained. The Git commit history
can give you an indication of this.
- How long ago was the last VS Code commit? (This will change over time;
it’s fine to give your answer as of when you cloned the repo.)
- How many commits has it had in the past month, and by how many distinct
people?
- On average, how many commits have been made per day since the project’s
inception?
- Projects with lots of different contributors need a way to incorporate
changes made by multiple people in parallel. VS Code is active enough that,
by the time one contributor finishes their change, the commit they based
that change on likely won’t be the newest one anymore.
- What features of Git might you use to incorporate such changes into the
main branch? Please explain in your own words.
- Do you see evidence of any of these features being used in VS Code’s
commit history? Please cite examples if so.
- It is often useful to do a bit of code archaeology. Maybe you want to know
what the original team was thinking when they first added a feature, or even
who the initial team was. Or maybe you are just nosy and want to poke
around.
- What was the first commit? Please provide the hash.
- How many files were in it?
- Who authored the commit
1aec7078c4d173ff15ca15ce8ffd1a276d9c03b9
? What
GitHub pull request does it belong to? This question requires some use of
the GitHub UI.
- Comment on the quality of the commit message. What would you change about
it? Why?
- Reading the code doesn’t always answer the questions you have. Often, you
will have to read a project’s documentation to understand why the authors
designed something the way they did.
- Does the project have any documentation?
- What kinds of documentation does the project maintain, if more than one?
- Where is the documentation located? Is it version controlled?
- VS Code comes with a number of extensions, located in the
extensions/
directory, which provide support for specific languages and tools. New
extensions are added regularly as people contribute support for their
favorite language or tool.
- What was the last modification to the Git extension (
extensions/git
)?
Please provide the commit’s date and commit message.
Submitting your work
Write your answers in a file, answers.txt
, split into two sections, and
numbered as appropriate. Submit this file on Gradescope.