Assignment 4. Basic change management

[course home > assignments]

Useful pointers

Laboratory A: Exploring a linear development history

This lab uses the development repository for the Time Zone Database (tzdb).
  1. Use GitHub from a browser to compute the difference between the previous and current commit to this repository. Save the resulting web page as a file prevcur.html.
  2. Use GitHub from a browser to compute the difference between tzdb releases 2021e and 2022a. Save the resulting web page as a file 2021e-2022a.html.
  3. Clone the tzdb development repository, in Git format.
  4. Write a shell or Python script justone that displays the difference from the previous and current commit, assuming the repository is what an ordinary Git command would use. Use your command on the just-cloned repository, and put the output of your command into a file justone.out.
  5. Write a shell or Python script compare-releases that displays the difference between two tzdb releases given as arguments to the command. For example, compare-releases 2021e 2022a should output the difference between tzdb release 2021e and tzdb release 2022a. Put the output of this particular invocation into a file 2021e-2022a.diff.
  6. Suppose we’re interested in the number of commits from each time zone. Write a shell or Python script tzcount that postprocesses the output of git log and outputs a simple report of time zones and number of commits from that time zone. Each line of output should look something like “-0500 1802”, meaning there were 1802 commits from the −0500 time zone. Sort the output numerically by its first (numeric timezone) column. Run the command git log 2012j..2022a | ./tzcount using the tzdb repository, and put its output into a file tzdb-2012j-2022a.tzcount.
  7. Suppose the maintainer of tzdb is being sued for copyright infringement because one of the source files contains the following sentence: “Even newspaper reports present contradictory information.” Also suppose the plaintiff claims that this statement was improperly copied from the plaintiff’s book. Use Git and other commands to find out how this statement was originally introduced to the tzdb files. (This is not the same thing as merely finding the last change to the lines containing the statement in question.) Create a text file who-contributed.txt that describes what commands and/or scripts that you used, and what the result of your investigation was.

Laboratory B: Exploring nonlinear development histories

Examine the copy of Git’s own git repository on SEASnet in the directory ~eggert/src/github/git.

  1. Find the mergepoint M at 14a38adf53033553da085549be989f02ca9d4ee4 (committed 2022-01-13), and draw the directed graph of all paths to M from the commit 79aed792415b35d1b31ddc26814a211c7bae97fe (committed two days earlier). Label each node in your graph with the commit ID, author, and committer if different. Your graph should contain all the abovementioned commits, along with any and all intervening commits; the arcs in your path should be from child to parent. You need not graph descendants of M, or ancestors of the other commits.
  2. Clone Git’s git repository yourself from GitHub, and briefly describe the differences between your repository and the one in ~eggert/src/github/git. (Hint: look at the output of git branch.)

Put your descriptions into a text file git.txt. Put your diagram into a PDF file git-graph.pdf.

And now for a more open-ended search. The Git 2.33.1 Release Notes (2021-10-12) say “"git diff --relative" segfaulted and/or produced incorrect result when there are unmerged paths.” Which code change or changes actually made this happen, and who authored the changes? Do not worry about subsequent administrative changes such as merge commits; look for the original changes that actually fixed the problem in question. Give the SHA1 commit IDs for the relevant changes, and explain how you discovered them, all in a text file git-detective.txt. Also generate patch files for the relevant changes, in git format-patch format.

Submit

Submit the following files at the top level of a gzip-compressed tarball gitlabs.tar.gz. Your tarball may contain other files if you think it necessary.