back to eggert home
back to home

assign 4

man this assignment is all over the place, i'm like 90% sure eggert wrote this on acid
i'll try to include SO links that might be helpful wherever i can

this one also has a lot of things that could be dependent on the quarter you take him, so i'll suffix all of those with a (QD) for "quarter-dependent"

alot of questions also want you to explain what you did to get the answer in `notes.txt`, so i'll suffix those with (N)

basic diffing

that narcissist eggert wants us to work on his lil tzdb repo...
so clone that baby with this: ```bash git clone https://github.com/eggert/tz ``` and let's get to work!

  1. oops i lied about using git, first he wants you to do some stuff on github
    go to the tzdb url and diff the current commit with the second most recent commit once you're at the diff page, just ctrl+s that baby and save it as `prevcur.html`
    you might notice that when you view the html file you saved it looks awful, but that's to be expected!
    also, don't worry if eggert commits some stuff during the assignment, thus changing the definition of "most recent commit", as idt the TAs care too much anyways (N)
  2. now use github to compare the releases 2023d and 2024a (QD) and save that baby in a file named `2023d-2024a.html` (QD, N)
  3. ok now we actually get to work on that local copy of the repo
    make a bash/python script named `justone` that outputs the difference between the previous and current commit when run in a git repo (N)
    if written in bash, this script should be really straightforward with just one line of code
  4. once you have that script, run `justone` in that tz repo and put the output in a file named `justone.out` like so: ```bash ./justone >justone.out ```
  5. ok now write a script `compare-releases` that compares two releases given as arguments to the bash script (N)
    like `justone`, this should be really simply, one line of bash
  6. yeah basically do the same thing you did w/ `justone`: run it in the tz repo and put the output in a file ```bash ./compare-releases 2023d 2024a >2023d-2024a.diff # QD ``` why `.diff` for this and `.out` for the other? hell if i know.

general crap

  1. alright so this next script, `tzcount` needs a bit more effort
    it should take any commit range `git log` takes and calculate the number of commits from each time zone in that range (N)
    the output might look something like this: ``` -0800 12 -0400 1 -0300 3 +0200 10 ``` notice how the time zones are sorted in numerical order
    you can get an idea of how to get the time zone by checking out this part of the `git log` docs
    i also found this informative link
  2. why the hell do the TAs need your cmd output why can't they just run it themselves: ```bash ./tzcount 2012j..2024a >tzdb-2012j-2024a.tzcount # QD ```
  3. find the commit with this substring:
    Even newspaper reports present contradictory information.
    in a text file `who-contributed.txt`, put the commands you used and the following to be safe:

alright quick thing- after all these exercises he wants us to change to git's own source code

  1. ok have this commit hash ``` c03bee6e9f5c05259f5f501e1f47cd8adb63af38 (QD) ``` now draw the directed graph of all paths towards this commit from the earlier commit in `git-graph.pdf` ``` 2a7d63a2453e2c30353342a2c9385fa22a846987 (QD) ``` each node in the graph should have the commit hash, author, and committer
    they say only include committer if different but i got docked for not including that 💀
    oh yeah, the arrows should point from the child to the parent (usually the earlier and later commit respectively)
    hey, did you know that `git log` has a `--graph` option?
  2. ok so in the git git repo, run `git branch` rq
    ok now do the same for the git repo located on the seasnet server at `~eggert/src/github/git`
    any differences? log them in `git.txt`

who the hell fixed this?

ok so the git 2.39 release notes say that an issue that could cause segfaults was fixed, which is pretty cool

now, eggert wants you to find the commit that actually fixed this
in a file named `git-detective.txt`, put the following:

also, gen the patch file for the commit, and document how you did so in `git-detective.txt` too
oh yeah submit the patch file too

hopefully helpful hints

what to turn in

the og spec actually outlines this pretty well, but i'll put it here jic