Skip to content

Commit dcc1167

Browse files
committed
Merge branch 'gh-pages' into mkt-trim-commands
2 parents 342586f + bbfabb8 commit dcc1167

File tree

3 files changed

+44
-14
lines changed

3 files changed

+44
-14
lines changed

css/explaingit.css

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ span.cmd {
168168
padding-left: 15px;
169169
color: #FFF;
170170
line-height: 14px;
171-
background: url(../images/prompt.gif) no-repeat left center black;
171+
background: url(../images/prompt.gif) no-repeat left top black;
172172
}
173173

174174
.control-box input[type="text"] {
@@ -304,7 +304,7 @@ g.branch-tag.remote-branch > rect {
304304
g.branch-tag > text {
305305
text-anchor: middle;
306306
fill: #000;
307-
font-size: 11px;
307+
font-size: 15px;
308308
font-family: Arial;
309309
}
310310

@@ -317,7 +317,7 @@ g.head-tag > rect {
317317
g.head-tag > text {
318318
text-anchor: middle;
319319
fill: #000;
320-
font-size: 11px;
320+
font-size: 15px;
321321
font-family: Arial;
322322
font-weight: bold;
323323
text-transform: uppercase;

js/controlbox.js

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,32 @@ function(_yargs, d3, demos) {
227227

228228
document.getElementById('last-command').textContent = entry
229229

230+
if (entry.trim() === 'help' || entry.trim() === 'help()') {
231+
this.info('pres() = Turn on presenter mode')
232+
this.info('undo = Undo the last git command')
233+
this.info('redo = Redo the last undone git command')
234+
this.info('mode = Change mode')
235+
this.info('clear = Clear the history pane and reset the visualization')
236+
this.info()
237+
this.info('Available Git Commands:')
238+
this.info('`git branch`')
239+
this.info('`git checkout`')
240+
this.info('`git cherry_pick`')
241+
this.info('`git commit`')
242+
this.info('`git fetch`')
243+
this.info('`git log`')
244+
this.info('`git merge`')
245+
this.info('`git pull`')
246+
this.info('`git push`')
247+
this.info('`git rebase`')
248+
this.info('`git reflog`')
249+
this.info('`git reset`')
250+
this.info('`git rev_parse`')
251+
this.info('`git revert`')
252+
this.info('`git tag`')
253+
return
254+
}
255+
230256
if (entry === 'pres()') {
231257
window.pres()
232258
return
@@ -371,7 +397,9 @@ function(_yargs, d3, demos) {
371397
return this.error("'git log' can take at most one argument in this tool")
372398
}
373399
var logs = this.getRepoView().getLogEntries(args[0] || 'head')
374-
.map(l => `<span class='log-entry'>&gt; ${l}</span>`).join('')
400+
.map(function(l) {
401+
return "<span class='log-entry'>&gt; " + l + "</span>"
402+
}).join('')
375403
this.info(logs)
376404
},
377405

@@ -879,7 +907,9 @@ function(_yargs, d3, demos) {
879907
} else if (subcommand === "show") {
880908
var logs = this.getRepoView().getReflogEntries(ref)
881909
this.info(
882-
logs.map(l => `<span class='reflog-entry'>&gt; ${l}</span>`).join('')
910+
logs.map(function(l) {
911+
return "<span class='reflog-entry'>&gt; " + l + "</span>"
912+
}).join('')
883913
)
884914
} else if (subcommand === "expire" || subcommand === "delete") {
885915
this.info("Real git reflog supports the '" + subcommand +

js/historyview.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -844,6 +844,12 @@ define(['d3'], function() {
844844
return tagData;
845845
},
846846

847+
_walkCommit: function (commit) {
848+
commit.branchless = false
849+
commit.parent && this._walkCommit(this.getCommit(commit.parent))
850+
commit.parent2 && this._walkCommit(this.getCommit(commit.parent2))
851+
},
852+
847853
_markBranchlessCommits: function() {
848854
var branch, commit, parent, parent2, c, b;
849855

@@ -859,13 +865,7 @@ define(['d3'], function() {
859865
parent = this.getCommit(commit.parent);
860866
parent2 = this.getCommit(commit.parent2);
861867

862-
function walkCommit (commit) {
863-
commit.branchless = false
864-
commit.parent && walkCommit.call(this, this.getCommit(commit.parent))
865-
commit.parent2 && walkCommit.call(this, this.getCommit(commit.parent2))
866-
}
867-
868-
walkCommit.call(this, commit)
868+
this._walkCommit(commit)
869869
}
870870
}
871871

@@ -926,7 +926,7 @@ define(['d3'], function() {
926926

927927
newTags.append('svg:rect')
928928
.attr('width', function(d) {
929-
return (d.name.length * 6) + 10;
929+
return (d.name.length * 8) + 20;
930930
})
931931
.attr('height', 20)
932932
.attr('y', function(d) {
@@ -1479,7 +1479,7 @@ define(['d3'], function() {
14791479
this.reset(origBranch)
14801480
this._setCurrentBranch(origBranch)
14811481
this.addReflogEntry(
1482-
'HEAD', this.getCommit('HEAD').id, 'rebase finished: returning to resf/heads/' + origBranch
1482+
'HEAD', this.getCommit('HEAD').id, 'rebase finished: returning to refs/heads/' + origBranch
14831483
)
14841484
this.addReflogEntry(
14851485
origBranch, newHeadCommit.id, 'rebase finished: refs/heads/' +

0 commit comments

Comments
 (0)