Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 13 additions & 13 deletions keymaps/git.cson
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
'.platform-darwin':
'cmd-shift-c': 'git:toggle-git-panel'
'cmd-shift-c': 'github:toggle-git-panel'

'.platform-win32, .platform-linux':
'alt-shift-c': 'git:toggle-git-panel'
'alt-shift-c': 'github:toggle-git-panel'

'.git-StagingView':
'left': 'git:focus-diff-view'
'.github-StagingView':
'left': 'github:focus-diff-view'

'.git-CommitView-editor atom-text-editor:not([mini])':
'cmd-enter': 'git:commit'
'ctrl-enter': 'git:commit'
'.github-CommitView-editor atom-text-editor:not([mini])':
'cmd-enter': 'github:commit'
'ctrl-enter': 'github:commit'

'.git-FilePatchView':
'/': 'git:toggle-patch-selection-mode'
'tab': 'git:select-next-hunk'
'shift-tab': 'git:select-previous-hunk'
'right': 'git:focus-git-panel'
'.github-FilePatchView':
'/': 'github:toggle-patch-selection-mode'
'tab': 'github:select-next-hunk'
'shift-tab': 'github:select-previous-hunk'
'right': 'github:focus-git-panel'

'.git-Prompt-input':
'.github-Prompt-input':
'enter': 'core:confirm'
'esc': 'core:cancel'
4 changes: 2 additions & 2 deletions lib/controllers/file-patch-controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@ export default class FilePatchController {
const hunks = this.props.filePatch.getHunks();
if (!hunks.length) {
return (
<div className="git-PaneView pane-item is-blank">
<div className="github-PaneView pane-item is-blank">
<span className="icon icon-info">File has no contents</span>
</div>
);
} else {
// NOTE: Outer div is required for etch to render elements correctly
return (
<div className="git-PaneView pane-item">
<div className="github-PaneView pane-item">
<FilePatchView
ref="filePatchView"
stageOrUnstageHunk={this.stageOrUnstageHunk}
Expand Down
4 changes: 2 additions & 2 deletions lib/controllers/git-controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ export default class GitController extends React.Component {
this.subscriptions = new CompositeDisposable();
this.subscriptions.add(
props.commandRegistry.add('atom-workspace', {
'git:toggle-git-panel': this.toggleGitPanel.bind(this),
'git:focus-git-panel': this.openAndFocusGitPanel.bind(this),
'github:toggle-git-panel': this.toggleGitPanel.bind(this),
'github:focus-git-panel': this.openAndFocusGitPanel.bind(this),
}),
);

Expand Down
6 changes: 3 additions & 3 deletions lib/controllers/status-bar-tile-controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export default class StatusBarTileController {

if (modelData) {
return (
<div className="git-StatusBarTileController">
<div className="github-StatusBarTileController">
<BranchView
ref="branchView"
{...modelData}
Expand Down Expand Up @@ -96,7 +96,7 @@ export default class StatusBarTileController {
if (!this.pushPullTooltipDisposable) {
this.pushPullTooltipDisposable = atom.tooltips.add(this.refs.pushPullView.element, {
item: this.pushPullMenuView,
class: 'git-StatusBarTileController-tooltipMenu',
class: 'github-StatusBarTileController-tooltipMenu',
trigger: 'click',
});
}
Expand All @@ -116,7 +116,7 @@ export default class StatusBarTileController {
if (!this.branchTooltipDisposable) {
this.branchTooltipDisposable = atom.tooltips.add(this.refs.branchView.element, {
item: this.branchMenuView,
class: 'git-StatusBarTileController-tooltipMenu',
class: 'github-StatusBarTileController-tooltipMenu',
trigger: 'click',
});
}
Expand Down
16 changes: 8 additions & 8 deletions lib/views/branch-menu-view.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export default class BranchMenuView {
this.createNew = false;
etch.initialize(this);
this.subscriptions = new CompositeDisposable(
atom.commands.add('.git-BranchMenuView-editor atom-text-editor[mini]', {
atom.commands.add('.github-BranchMenuView-editor atom-text-editor[mini]', {
'tool-panel:unfocus': this.cancelCreateNewBranch,
'core:cancel': this.cancelCreateNewBranch,
'core:confirm': this.createBranch,
Expand Down Expand Up @@ -98,15 +98,15 @@ export default class BranchMenuView {

render() {
const newBranchEditor = (
<div className="git-BranchMenuView-item git-BranchMenuView-editor">
<div className="github-BranchMenuView-item github-BranchMenuView-editor">
{this.textEditorWidget}
</div>
);

const selectBranchView = (
<select
ref="list"
className="git-BranchMenuView-item git-BranchMenuView-select input-select"
className="github-BranchMenuView-item github-BranchMenuView-select input-select"
onchange={this.didSelectItem}>
{this.props.branches.map(branch => {
return <option key={branch} value={branch} selected={branch === this.props.branchName}>{branch}</option>;
Expand All @@ -115,14 +115,14 @@ export default class BranchMenuView {
);

return (
<div className="git-BranchMenuView">
<div className="git-BranchMenuView-selector">
<span className="git-BranchMenuView-item icon icon-git-branch" />
<div className="github-BranchMenuView">
<div className="github-BranchMenuView-selector">
<span className="github-BranchMenuView-item icon icon-git-branch" />
{ this.createNew ? newBranchEditor : selectBranchView }
<button ref="newBranchButton" className="git-BranchMenuView-item git-BranchMenuView-button btn"
<button ref="newBranchButton" className="github-BranchMenuView-item github-BranchMenuView-button btn"
onclick={this.createBranch}> Create New Branch </button>
</div>
<div className="git-BranchMenuView-message" ref="message" innerHTML={this.errorMessage} />
<div className="github-BranchMenuView-message" ref="message" innerHTML={this.errorMessage} />
</div>
);
}
Expand Down
2 changes: 1 addition & 1 deletion lib/views/branch-view.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export default class BranchView {

render() {
return (
<div className="git-branch inline-block">
<div className="github-branch inline-block">
<span className="icon icon-git-branch" />
<span className="branch-label">{this.props.branchName}</span>
</div>
Expand Down
2 changes: 1 addition & 1 deletion lib/views/changed-files-count-view.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export default class ChangedFilesCountView {
return (
<a
ref="changedFiles"
className="git-ChangedFilesCount inline-block icon icon-diff"
className="github-ChangedFilesCount inline-block icon icon-diff"
onclick={this.props.didClick}>{label}</a>
);
}
Expand Down
17 changes: 9 additions & 8 deletions lib/views/commit-view.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export default class CommitView {
this.subscriptions = new CompositeDisposable(
this.editor.onDidChangeCursorPosition(() => { etch.update(this); }),
this.editor.getBuffer().onDidChangeText(() => { etch.update(this); }),
props.commandRegistry.add(this.element, {'git:commit': () => this.commit()}),
props.commandRegistry.add(this.element, {'github:commit': () => this.commit()}),
);
this.setMessageAndAmendStatus();
this.updateStateForRepository();
Expand Down Expand Up @@ -87,8 +87,8 @@ export default class CommitView {
remainingCharsClassName = 'is-warning';
}
return (
<div className="git-CommitView" ref="CommitView">
<div className="git-CommitView-editor">
<div className="github-CommitView" ref="CommitView">
<div className="github-CommitView-editor">
<TextEditor
ref="editor"
softWrapped={true}
Expand All @@ -99,17 +99,18 @@ export default class CommitView {
scrollPastEnd={false}
/>
</div>
<footer className="git-CommitView-bar">
<button ref="abortMergeButton" className="btn git-CommitView-button is-secondary"
<footer className="github-CommitView-bar">
<button ref="abortMergeButton" className="btn github-CommitView-button is-secondary"
onclick={this.abortMerge}
style={{display: this.props.isMerging ? '' : 'none'}}>Abort Merge</button>
<label className="git-CommitView-label input-label" style={{display: this.props.isMerging ? 'none' : ''}}>
<label className="github-CommitView-label input-label" style={{display: this.props.isMerging ? 'none' : ''}}>
<input ref="amend" className="input-checkbox" type="checkbox" onclick={this.handleAmendBoxClick} /> Amend
</label>
<button ref="commitButton" className="btn git-CommitView-button"
<button ref="commitButton" className="btn github-CommitView-button"
onclick={this.commit.bind(this)}
disabled={!this.isCommitButtonEnabled()}>{this.commitButtonText()}</button>
<div ref="remainingCharacters" className={`git-CommitView-remaining-characters ${remainingCharsClassName}`}>
<div ref="remainingCharacters"
className={`github-CommitView-remaining-characters ${remainingCharsClassName}`}>
{this.getRemainingCharacters()}
</div>
</footer>
Expand Down
6 changes: 3 additions & 3 deletions lib/views/file-patch-list-item-view.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ export default class FilePatchListItemView {
const className = selected ? 'is-selected' : '';

return (
<div {...others} className={`git-FilePatchListView-item is-${status} ${className}`}>
<span className={`git-FilePatchListView-icon icon icon-diff-${status} status-${status}`} />
<span className="git-FilePatchListView-path">{filePatch.filePath}</span>
<div {...others} className={`github-FilePatchListView-item is-${status} ${className}`}>
<span className={`github-FilePatchListView-icon icon icon-diff-${status} status-${status}`} />
<span className="github-FilePatchListView-path">{filePatch.filePath}</span>
</div>
);
}
Expand Down
4 changes: 2 additions & 2 deletions lib/views/file-patch-view.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export default class FilePatchView {

etch.initialize(this);
this.disposables.add(atom.commands.add(this.element, {
'git:toggle-patch-selection-mode': this.togglePatchSelectionMode.bind(this),
'github:toggle-patch-selection-mode': this.togglePatchSelectionMode.bind(this),
'core:confirm': () => this.didConfirm(),
'core:move-up': () => this.selectPrevious(),
'core:move-down': () => this.selectNext(),
Expand Down Expand Up @@ -61,7 +61,7 @@ export default class FilePatchView {
const hunkSelectionMode = this.selection.getMode() === 'hunk';
const stageButtonLabelPrefix = this.props.stagingStatus === 'unstaged' ? 'Stage' : 'Unstage';
return (
<div className="git-FilePatchView" tabIndex="-1"
<div className="github-FilePatchView" tabIndex="-1"
onmouseup={this.mouseup}
style={`font-size: ${this.fontSize}px`}>
{this.props.hunks.map(hunk => {
Expand Down
10 changes: 5 additions & 5 deletions lib/views/git-panel-view.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,19 @@ export default class GitPanelView {
render() {
if (!this.props.repository) {
return (
<div className="git-Panel" tabIndex="-1">
<div ref="noRepoMessage" className="git-Panel no-repository">No repository for active pane item</div>
<div className="github-Panel" tabIndex="-1">
<div ref="noRepoMessage" className="github-Panel no-repository">No repository for active pane item</div>
</div>
);
} else if (this.props.fetchInProgress) {
return (
<div className="git-Panel" tabIndex="-1">
<div ref="repoLoadingMessage" className="git-Panel is-loading">Fetching repository data</div>
<div className="github-Panel" tabIndex="-1">
<div ref="repoLoadingMessage" className="github-Panel is-loading">Fetching repository data</div>
</div>
);
} else {
return (
<div ref="repoInfo" className="git-Panel" tabIndex="-1">
<div ref="repoInfo" className="github-Panel" tabIndex="-1">
<StagingView
ref="stagingView"
stagedChanges={this.props.stagedChanges}
Expand Down
18 changes: 9 additions & 9 deletions lib/views/hunk-view.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,12 @@ export default class HunkView {
const hunkSelectedClass = this.props.isSelected ? 'is-selected' : '';
const hunkModeClass = this.props.hunkSelectionMode ? 'is-hunkMode' : '';
return (
<div className={`git-HunkView ${hunkModeClass} ${hunkSelectedClass}`}>
<div className="git-HunkView-header"
<div className={`github-HunkView ${hunkModeClass} ${hunkSelectedClass}`}>
<div className="github-HunkView-header"
onmousedown={() => this.props.mousedownOnHeader()}>
<span ref="header" className="git-HunkView-title">{this.props.hunk.getHeader()}</span>
<span ref="header" className="github-HunkView-title">{this.props.hunk.getHeader()}</span>
<button ref="stageButton"
className="git-HunkView-stageButton"
className="github-HunkView-stageButton"
onclick={this.props.didClickStageButton}
onmousedown={event => event.stopPropagation()}>
{this.props.stageButtonLabel}
Expand Down Expand Up @@ -97,13 +97,13 @@ class LineView {
const newLineNumber = line.getNewLineNumber() === -1 ? ' ' : line.getNewLineNumber();
const lineSelectedClass = this.props.isSelected ? 'is-selected' : '';
return (
<div className={`git-HunkView-line ${lineSelectedClass} is-${line.getStatus()}`}
<div className={`github-HunkView-line ${lineSelectedClass} is-${line.getStatus()}`}
onmousedown={event => this.props.mousedown(event, line)}
onmousemove={event => this.props.mousemove(event, line)}>
<div className="git-HunkView-lineNumber is-old">{oldLineNumber}</div>
<div className="git-HunkView-lineNumber is-new">{newLineNumber}</div>
<div className="git-HunkView-lineContent">
<span className="git-HunkView-plusMinus">{line.getOrigin()}</span>
<div className="github-HunkView-lineNumber is-old">{oldLineNumber}</div>
<div className="github-HunkView-lineNumber is-new">{newLineNumber}</div>
<div className="github-HunkView-lineContent">
<span className="github-HunkView-plusMinus">{line.getOrigin()}</span>
<span>{line.getText()}</span>
</div>
</div>
Expand Down
12 changes: 6 additions & 6 deletions lib/views/merge-conflict-list-item-view.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ export default class FilePatchListItemView {
const className = selected ? 'is-selected' : '';

return (
<div {...others} className={`git-FilePatchListView-item is-${fileStatus} ${className}`}>
<span className={`git-FilePatchListView-icon icon icon-diff-${fileStatus} status-${fileStatus}`} />
<span className="git-FilePatchListView-path">{mergeConflict.filePath}</span>
<span className={'git-FilePatchListView ours-theirs-info'}>
<span className={`git-FilePatchListView-icon icon icon-diff-${oursStatus}`} />
<span className={`git-FilePatchListView-icon icon icon-diff-${theirsStatus}`} />
<div {...others} className={`github-FilePatchListView-item is-${fileStatus} ${className}`}>
<span className={`github-FilePatchListView-icon icon icon-diff-${fileStatus} status-${fileStatus}`} />
<span className="github-FilePatchListView-path">{mergeConflict.filePath}</span>
<span className={'github-FilePatchListView ours-theirs-info'}>
<span className={`github-FilePatchListView-icon icon icon-diff-${oursStatus}`} />
<span className={`github-FilePatchListView-icon icon icon-diff-${theirsStatus}`} />
</span>
</div>
);
Expand Down
6 changes: 3 additions & 3 deletions lib/views/prompt.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ export default class Prompt {

render() {
return (
<div className="git-Prompt native-key-bindings" ref="prompt" onclick={this.focusInput}>
<div className="git-Prompt-label">{this.message}</div>
<input type="password" ref="input" className="git-Prompt-input input-text" />
<div className="github-Prompt native-key-bindings" ref="prompt" onclick={this.focusInput}>
<div className="github-Prompt-label">{this.message}</div>
<input type="password" ref="input" className="github-Prompt-input input-text" />
</div>
);
}
Expand Down
12 changes: 6 additions & 6 deletions lib/views/push-pull-menu-view.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,18 +34,18 @@ export default class PushPullMenuView {

render() {
return (
<div className={'git-PushPullMenuView' + (this.inProgress ? ' in-progress' : '')}>
<div className="git-PushPullMenuView-selector">
<span className="git-PushPullMenuView-item icon icon-mark-github" />
<div className={'github-PushPullMenuView' + (this.inProgress ? ' in-progress' : '')}>
<div className="github-PushPullMenuView-selector">
<span className="github-PushPullMenuView-item icon icon-mark-github" />
<button
className="git-PushPullMenuView-item btn"
className="github-PushPullMenuView-item btn"
ref="fetchButton"
onclick={this.fetch}
disabled={!this.props.remoteName}>
Fetch
</button>

<div className="git-PushPullMenuView-item is-flexible btn-group">
<div className="github-PushPullMenuView-item is-flexible btn-group">
<button
ref="pullButton"
className="btn"
Expand All @@ -65,7 +65,7 @@ export default class PushPullMenuView {
</button>
</div>
</div>
<div className="git-PushPullMenuView-message" ref="message" innerHTML={this.errorMessage} />
<div className="github-PushPullMenuView-message" ref="message" innerHTML={this.errorMessage} />
</div>
);
}
Expand Down
10 changes: 5 additions & 5 deletions lib/views/push-pull-view.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ export default class PushPullView {

render() {
return (
<div className="git-PushPull inline-block">
<span className="git-PushPull-icon icon icon-arrow-down" />
<span className="git-PushPull-label is-push" ref="behindCount">
<div className="github-PushPull inline-block">
<span className="github-PushPull-icon icon icon-arrow-down" />
<span className="github-PushPull-label is-push" ref="behindCount">
{this.props.behindCount ? `${this.props.behindCount}` : ''}
</span>
<span className="git-PushPull-icon icon icon-arrow-up" />
<span className="git-PushPull-label is-pull" ref="aheadCount">
<span className="github-PushPull-icon icon icon-arrow-up" />
<span className="github-PushPull-label is-pull" ref="aheadCount">
{this.props.aheadCount ? `${this.props.aheadCount}` : ''}
</span>
</div>
Expand Down
Loading