Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show diffstat info #421

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open

Show diffstat info #421

wants to merge 8 commits into from

Conversation

aneeshd
Copy link

@aneeshd aneeshd commented Dec 28, 2014

Here is a nice addition by "kelan" that I find useful. It shows diffstat info for each commit. It's especially useful for "large" commits, because it shows a summary of what's been changed. I've simply cherry-picked his changes to your recent version.

kelan and others added 8 commits December 25, 2014 10:00
Visual changes:
* Use a more structured table layout for the list of files.

Obj-C Code changes:
* Load the diffstat info with:
      $ git show --numstat -M --summary --pretty=raw $REV
  and then (as a 2nd, separate NSTask) load the full diff, with:
      $ git show --pretty=raw -M --no-color $REV
* A side-effect of this is that you now get a list of files changed in a
  merge commit, whereas it used to only show the commit message.

Javascript/HTML code changes:
* Get the commit view header info from the first task, so it should load
  quicker, especially for commits with really long diffs.
* Use the --numstat info (from the output of the first NSTask) to get the
  full list of files changed and the number of changed lines in each, and
  the --summary info to see if any files were created/deleted.
* Add a "prototype" of the file-list element in index.html, and then have the
  javascript extract then clone that, rather than building the elements
  totally in code.
* Add javascript functions to show/hide the lines added/removed details when
  the mouse hovers over the lines changed summary.

Conflicts:
	Classes/Controllers/PBWebHistoryController.m
	MGScopeBar
	html/views/history/history.css
	html/views/history/history.js
	html/views/history/index.html
Also, better handle filenames with spaces
Conflicts:
	MGScopeBar
* Made the border color match the file diffs.
* Made the background color lighter and the text
  darker, so it's easier to read (and doesn't have
  the slight look of being disabled that it used
  to have).
* Changed the text shadow on the file names so it
  doesn't looks weird when overlapping a graph bar.
  In fact, now it helps readability in that case.
Conflicts:
	MGScopeBar
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.

2 participants