-
Notifications
You must be signed in to change notification settings - Fork 9.3k
/
changes-list.tsx
746 lines (643 loc) · 22.7 KB
/
changes-list.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
import * as React from 'react'
import * as Path from 'path'
import { IGitHubUser } from '../../lib/databases'
import { Dispatcher } from '../dispatcher'
import { IMenuItem } from '../../lib/menu-item'
import { revealInFileManager } from '../../lib/app-shell'
import {
WorkingDirectoryStatus,
WorkingDirectoryFileChange,
AppFileStatusKind,
} from '../../models/status'
import { DiffSelectionType } from '../../models/diff'
import { CommitIdentity } from '../../models/commit-identity'
import { ICommitMessage } from '../../models/commit-message'
import { Repository } from '../../models/repository'
import { IAuthor } from '../../models/author'
import { List, ClickSource } from '../lib/list'
import { Checkbox, CheckboxValue } from '../lib/checkbox'
import {
isSafeFileExtension,
DefaultEditorLabel,
CopyFilePathLabel,
RevealInFileManagerLabel,
OpenWithDefaultProgramLabel,
} from '../lib/context-menu'
import { CommitMessage } from './commit-message'
import { ChangedFile } from './changed-file'
import { IAutocompletionProvider } from '../autocompletion'
import { showContextualMenu } from '../main-process-proxy'
import { arrayEquals } from '../../lib/equality'
import { clipboard } from 'electron'
import { basename } from 'path'
import { ICommitContext } from '../../models/commit'
import { RebaseConflictState } from '../../lib/app-state'
import { ContinueRebase } from './continue-rebase'
import { Octicon, OcticonSymbol } from '../octicons'
import { IStashEntry } from '../../models/stash-entry'
import * as classNames from 'classnames'
import { hasWritePermission } from '../../models/github-repository'
const RowHeight = 29
const StashIcon = new OcticonSymbol(
16,
16,
'M3.002 15H15V4c.51 0 1 .525 1 .996V15c0 .471-.49 1-1 1H4.002c-.51 ' +
'0-1-.529-1-1zm-2-2H13V2c.51 0 1 .525 1 .996V13c0 .471-.49 1-1 ' +
'1H2.002c-.51 0-1-.529-1-1zm10.14-13A.86.86 0 0 1 12 .857v10.286a.86.86 ' +
'0 0 1-.857.857H.857A.86.86 0 0 1 0 11.143V.857A.86.86 0 0 1 .857 0h10.286zM11 ' +
'11V1H1v10h10zM3 6c0-1.66 1.34-3 3-3s3 1.34 3 3-1.34 3-3 3-3-1.34-3-3z'
)
const GitIgnoreFileName = '.gitignore'
/** Compute the 'Include All' checkbox value from the repository state */
function getIncludeAllValue(
workingDirectory: WorkingDirectoryStatus,
rebaseConflictState: RebaseConflictState | null
) {
if (rebaseConflictState !== null) {
if (workingDirectory.files.length === 0) {
// the current commit will be skipped in the rebase
return CheckboxValue.Off
}
// untracked files will be skipped by the rebase, so we need to ensure that
// the "Include All" checkbox matches this state
const onlyUntrackedFilesFound = workingDirectory.files.every(
f => f.status.kind === AppFileStatusKind.Untracked
)
if (onlyUntrackedFilesFound) {
return CheckboxValue.Off
}
const onlyTrackedFilesFound = workingDirectory.files.every(
f => f.status.kind !== AppFileStatusKind.Untracked
)
// show "Mixed" if we have a mixture of tracked and untracked changes
return onlyTrackedFilesFound ? CheckboxValue.On : CheckboxValue.Mixed
}
const { includeAll } = workingDirectory
if (includeAll === true) {
return CheckboxValue.On
} else if (includeAll === false) {
return CheckboxValue.Off
} else {
return CheckboxValue.Mixed
}
}
interface IChangesListProps {
readonly repository: Repository
readonly workingDirectory: WorkingDirectoryStatus
readonly rebaseConflictState: RebaseConflictState | null
readonly selectedFileIDs: string[]
readonly onFileSelectionChanged: (rows: ReadonlyArray<number>) => void
readonly onIncludeChanged: (path: string, include: boolean) => void
readonly onSelectAll: (selectAll: boolean) => void
readonly onCreateCommit: (context: ICommitContext) => Promise<boolean>
readonly onDiscardChanges: (file: WorkingDirectoryFileChange) => void
readonly askForConfirmationOnDiscardChanges: boolean
readonly focusCommitMessage: boolean
readonly onDiscardChangesFromFiles: (
files: ReadonlyArray<WorkingDirectoryFileChange>,
isDiscardingAllChanges: boolean
) => void
/** Callback that fires on page scroll to pass the new scrollTop location */
readonly onChangesListScrolled: (scrollTop: number) => void
/* The scrollTop of the compareList. It is stored to allow for scroll position persistence */
readonly changesListScrollTop?: number
/**
* Called to open a file it its default application
* @param path The path of the file relative to the root of the repository
*/
readonly onOpenItem: (path: string) => void
readonly branch: string | null
readonly commitAuthor: CommitIdentity | null
readonly gitHubUser: IGitHubUser | null
readonly dispatcher: Dispatcher
readonly availableWidth: number
readonly isCommitting: boolean
readonly currentBranchProtected: boolean
/**
* Click event handler passed directly to the onRowClick prop of List, see
* List Props for documentation.
*/
readonly onRowClick?: (row: number, source: ClickSource) => void
readonly commitMessage: ICommitMessage
/** The autocompletion providers available to the repository. */
readonly autocompletionProviders: ReadonlyArray<IAutocompletionProvider<any>>
/** Called when the given pattern should be ignored. */
readonly onIgnore: (pattern: string | string[]) => void
/**
* Whether or not to show a field for adding co-authors to
* a commit (currently only supported for GH/GHE repositories)
*/
readonly showCoAuthoredBy: boolean
/**
* A list of authors (name, email pairs) which have been
* entered into the co-authors input box in the commit form
* and which _may_ be used in the subsequent commit to add
* Co-Authored-By commit message trailers depending on whether
* the user has chosen to do so.
*/
readonly coAuthors: ReadonlyArray<IAuthor>
/** The name of the currently selected external editor */
readonly externalEditorLabel?: string
/**
* Callback to open a selected file using the configured external editor
*
* @param fullPath The full path to the file on disk
*/
readonly onOpenInExternalEditor: (fullPath: string) => void
readonly stashEntry: IStashEntry | null
readonly isShowingStashEntry: boolean
/**
* Whether we should show the onboarding tutorial nudge
* arrow pointing at the commit summary box
*/
readonly shouldNudgeToCommit: boolean
}
interface IChangesState {
readonly selectedRows: ReadonlyArray<number>
}
function getSelectedRowsFromProps(
props: IChangesListProps
): ReadonlyArray<number> {
const selectedFileIDs = props.selectedFileIDs
const selectedRows = []
for (const id of selectedFileIDs) {
const ix = props.workingDirectory.findFileIndexByID(id)
if (ix !== -1) {
selectedRows.push(ix)
}
}
return selectedRows
}
export class ChangesList extends React.Component<
IChangesListProps,
IChangesState
> {
public constructor(props: IChangesListProps) {
super(props)
this.state = {
selectedRows: getSelectedRowsFromProps(props),
}
}
public componentWillReceiveProps(nextProps: IChangesListProps) {
// No need to update state unless we haven't done it yet or the
// selected file id list has changed.
if (
!arrayEquals(nextProps.selectedFileIDs, this.props.selectedFileIDs) ||
!arrayEquals(
nextProps.workingDirectory.files,
this.props.workingDirectory.files
)
) {
this.setState({ selectedRows: getSelectedRowsFromProps(nextProps) })
}
}
private onIncludeAllChanged = (event: React.FormEvent<HTMLInputElement>) => {
const include = event.currentTarget.checked
this.props.onSelectAll(include)
}
private renderRow = (row: number): JSX.Element => {
const {
workingDirectory,
rebaseConflictState,
isCommitting,
onIncludeChanged,
availableWidth,
} = this.props
const file = workingDirectory.files[row]
const selection = file.selection.getSelectionType()
const includeAll =
selection === DiffSelectionType.All
? true
: selection === DiffSelectionType.None
? false
: null
const include =
rebaseConflictState !== null
? file.status.kind !== AppFileStatusKind.Untracked
: includeAll
const disableSelection = isCommitting || rebaseConflictState !== null
return (
<ChangedFile
file={file}
include={include}
key={file.id}
onContextMenu={this.onItemContextMenu}
onIncludeChanged={onIncludeChanged}
availableWidth={availableWidth}
disableSelection={disableSelection}
/>
)
}
private onDiscardAllChanges = () => {
this.props.onDiscardChangesFromFiles(
this.props.workingDirectory.files,
true
)
}
private onDiscardChanges = (files: ReadonlyArray<string>) => {
const workingDirectory = this.props.workingDirectory
if (files.length === 1) {
const modifiedFile = workingDirectory.files.find(f => f.path === files[0])
if (modifiedFile != null) {
this.props.onDiscardChanges(modifiedFile)
}
} else {
const modifiedFiles = new Array<WorkingDirectoryFileChange>()
files.forEach(file => {
const modifiedFile = workingDirectory.files.find(f => f.path === file)
if (modifiedFile != null) {
modifiedFiles.push(modifiedFile)
}
})
if (modifiedFiles.length > 0) {
// DiscardAllChanges can also be used for discarding several selected changes.
// Therefore, we update the pop up to reflect whether or not it is "all" changes.
const discardingAllChanges =
modifiedFiles.length === workingDirectory.files.length
this.props.onDiscardChangesFromFiles(
modifiedFiles,
discardingAllChanges
)
}
}
}
private getDiscardChangesMenuItemLabel = (files: ReadonlyArray<string>) => {
const label =
files.length === 1
? __DARWIN__
? `Discard Changes`
: `Discard changes`
: __DARWIN__
? `Discard ${files.length} Selected Changes`
: `Discard ${files.length} selected changes`
return this.props.askForConfirmationOnDiscardChanges ? `${label}…` : label
}
private onContextMenu = (event: React.MouseEvent<any>) => {
event.preventDefault()
// need to preserve the working directory state while dealing with conflicts
if (this.props.rebaseConflictState !== null || this.props.isCommitting) {
return
}
const items: IMenuItem[] = [
{
label: __DARWIN__ ? 'Discard All Changes…' : 'Discard all changes…',
action: this.onDiscardAllChanges,
enabled: this.props.workingDirectory.files.length > 0,
},
]
showContextualMenu(items)
}
private getDiscardChangesMenuItem = (
paths: ReadonlyArray<string>
): IMenuItem => {
return {
label: this.getDiscardChangesMenuItemLabel(paths),
action: () => this.onDiscardChanges(paths),
}
}
private getCopyPathMenuItem = (
file: WorkingDirectoryFileChange
): IMenuItem => {
return {
label: CopyFilePathLabel,
action: () => {
const fullPath = Path.join(this.props.repository.path, file.path)
clipboard.writeText(fullPath)
},
}
}
private getRevealInFileManagerMenuItem = (
file: WorkingDirectoryFileChange
): IMenuItem => {
return {
label: RevealInFileManagerLabel,
action: () => revealInFileManager(this.props.repository, file.path),
enabled: file.status.kind !== AppFileStatusKind.Deleted,
}
}
private getOpenInExternalEditorMenuItem = (
file: WorkingDirectoryFileChange,
enabled: boolean
): IMenuItem => {
const { externalEditorLabel, repository } = this.props
const openInExternalEditor = externalEditorLabel
? `Open in ${externalEditorLabel}`
: DefaultEditorLabel
return {
label: openInExternalEditor,
action: () => {
const fullPath = Path.join(repository.path, file.path)
this.props.onOpenInExternalEditor(fullPath)
},
enabled,
}
}
private getDefaultContextMenu(
file: WorkingDirectoryFileChange
): ReadonlyArray<IMenuItem> {
const { id, path, status } = file
const extension = Path.extname(path)
const isSafeExtension = isSafeFileExtension(extension)
const { workingDirectory, selectedFileIDs } = this.props
const selectedFiles = new Array<WorkingDirectoryFileChange>()
const paths = new Array<string>()
const extensions = new Set<string>()
const addItemToArray = (fileID: string) => {
const newFile = workingDirectory.findFileWithID(fileID)
if (newFile) {
selectedFiles.push(newFile)
paths.push(newFile.path)
const extension = Path.extname(newFile.path)
if (extension.length) {
extensions.add(extension)
}
}
}
if (selectedFileIDs.includes(id)) {
// user has selected a file inside an existing selection
// -> context menu entries should be applied to all selected files
selectedFileIDs.forEach(addItemToArray)
} else {
// this is outside their previous selection
// -> context menu entries should be applied to just this file
addItemToArray(id)
}
const items: IMenuItem[] = [
this.getDiscardChangesMenuItem(paths),
{ type: 'separator' },
]
if (paths.length === 1) {
items.push({
label: __DARWIN__
? 'Ignore File (Add to .gitignore)'
: 'Ignore file (add to .gitignore)',
action: () => this.props.onIgnore(path),
enabled: Path.basename(path) !== GitIgnoreFileName,
})
} else if (paths.length > 1) {
items.push({
label: __DARWIN__
? `Ignore ${paths.length} Selected Files (Add to .gitignore)`
: `Ignore ${paths.length} selected files (add to .gitignore)`,
action: () => {
// Filter out any .gitignores that happens to be selected, ignoring
// those doesn't make sense.
this.props.onIgnore(
paths.filter(path => Path.basename(path) !== GitIgnoreFileName)
)
},
// Enable this action as long as there's something selected which isn't
// a .gitignore file.
enabled: paths.some(path => Path.basename(path) !== GitIgnoreFileName),
})
}
// Five menu items should be enough for everyone
Array.from(extensions)
.slice(0, 5)
.forEach(extension => {
items.push({
label: __DARWIN__
? `Ignore All ${extension} Files (Add to .gitignore)`
: `Ignore all ${extension} files (add to .gitignore)`,
action: () => this.props.onIgnore(`*${extension}`),
})
})
const enabled = isSafeExtension && status.kind !== AppFileStatusKind.Deleted
items.push(
{ type: 'separator' },
this.getCopyPathMenuItem(file),
this.getRevealInFileManagerMenuItem(file),
this.getOpenInExternalEditorMenuItem(file, enabled),
{
label: OpenWithDefaultProgramLabel,
action: () => this.props.onOpenItem(path),
enabled,
}
)
return items
}
private getRebaseContextMenu(
file: WorkingDirectoryFileChange
): ReadonlyArray<IMenuItem> {
const { path, status } = file
const extension = Path.extname(path)
const isSafeExtension = isSafeFileExtension(extension)
const items = new Array<IMenuItem>()
if (file.status.kind === AppFileStatusKind.Untracked) {
items.push(this.getDiscardChangesMenuItem([file.path]), {
type: 'separator',
})
}
const enabled = isSafeExtension && status.kind !== AppFileStatusKind.Deleted
items.push(
this.getCopyPathMenuItem(file),
this.getRevealInFileManagerMenuItem(file),
this.getOpenInExternalEditorMenuItem(file, enabled),
{
label: OpenWithDefaultProgramLabel,
action: () => this.props.onOpenItem(path),
enabled,
}
)
return items
}
private onItemContextMenu = (
file: WorkingDirectoryFileChange,
event: React.MouseEvent<HTMLDivElement>
) => {
if (this.props.isCommitting) {
return
}
event.preventDefault()
const items =
this.props.rebaseConflictState === null
? this.getDefaultContextMenu(file)
: this.getRebaseContextMenu(file)
showContextualMenu(items)
}
private getPlaceholderMessage(
files: ReadonlyArray<WorkingDirectoryFileChange>,
prepopulateCommitSummary: boolean
) {
if (!prepopulateCommitSummary) {
return 'Summary (required)'
}
const firstFile = files[0]
const fileName = basename(firstFile.path)
switch (firstFile.status.kind) {
case AppFileStatusKind.New:
case AppFileStatusKind.Untracked:
return `Create ${fileName}`
case AppFileStatusKind.Deleted:
return `Delete ${fileName}`
default:
// TODO:
// this doesn't feel like a great message for AppFileStatus.Copied or
// AppFileStatus.Renamed but without more insight (and whether this
// affects other parts of the flow) we can just default to this for now
return `Update ${fileName}`
}
}
private onScroll = (scrollTop: number, clientHeight: number) => {
this.props.onChangesListScrolled(scrollTop)
}
private renderCommitMessageForm = (): JSX.Element => {
const {
rebaseConflictState,
workingDirectory,
repository,
dispatcher,
isCommitting,
currentBranchProtected,
} = this.props
if (rebaseConflictState !== null) {
const hasUntrackedChanges = workingDirectory.files.some(
f => f.status.kind === AppFileStatusKind.Untracked
)
return (
<ContinueRebase
dispatcher={dispatcher}
repository={repository}
rebaseConflictState={rebaseConflictState}
workingDirectory={workingDirectory}
isCommitting={isCommitting}
hasUntrackedChanges={hasUntrackedChanges}
/>
)
}
const fileCount = workingDirectory.files.length
const includeAllValue = getIncludeAllValue(
workingDirectory,
rebaseConflictState
)
const anyFilesSelected =
fileCount > 0 && includeAllValue !== CheckboxValue.Off
const filesSelected = workingDirectory.files.filter(
f => f.selection.getSelectionType() !== DiffSelectionType.None
)
// When a single file is selected, we use a default commit summary
// based on the file name and change status.
// However, for onboarding tutorial repositories, we don't want to do this.
// See https://github.com/desktop/desktop/issues/8354
const prepopulateCommitSummary =
filesSelected.length === 1 && !repository.isTutorialRepository
// if this is not a github repo, we don't want to
// restrict what the user can do at all
const hasWritePermissionForRepository =
this.props.repository.gitHubRepository === null ||
hasWritePermission(this.props.repository.gitHubRepository)
return (
<CommitMessage
onCreateCommit={this.props.onCreateCommit}
branch={this.props.branch}
gitHubUser={this.props.gitHubUser}
commitAuthor={this.props.commitAuthor}
anyFilesSelected={anyFilesSelected}
repository={repository}
dispatcher={dispatcher}
commitMessage={this.props.commitMessage}
focusCommitMessage={this.props.focusCommitMessage}
autocompletionProviders={this.props.autocompletionProviders}
isCommitting={isCommitting}
showCoAuthoredBy={this.props.showCoAuthoredBy}
coAuthors={this.props.coAuthors}
placeholder={this.getPlaceholderMessage(
filesSelected,
prepopulateCommitSummary
)}
prepopulateCommitSummary={prepopulateCommitSummary}
key={repository.id}
showBranchProtected={fileCount > 0 && currentBranchProtected}
showNoWriteAccess={fileCount > 0 && !hasWritePermissionForRepository}
shouldNudge={this.props.shouldNudgeToCommit}
/>
)
}
private onStashEntryClicked = () => {
const { isShowingStashEntry, dispatcher, repository } = this.props
if (isShowingStashEntry) {
dispatcher.selectWorkingDirectoryFiles(repository)
// If the button is clicked, that implies the stash was not restored or discarded
dispatcher.recordNoActionTakenOnStash()
} else {
dispatcher.selectStashedFile(repository)
dispatcher.recordStashView()
}
}
private renderStashedChanges() {
if (this.props.stashEntry === null) {
return null
}
const className = classNames(
'stashed-changes-button',
this.props.isShowingStashEntry ? 'selected' : null
)
return (
<button
className={className}
onClick={this.onStashEntryClicked}
tabIndex={0}
aria-selected={this.props.isShowingStashEntry}
>
<Octicon className="stack-icon" symbol={StashIcon} />
<div className="text">Stashed Changes</div>
<Octicon symbol={OcticonSymbol.chevronRight} />
</button>
)
}
private onRowKeyDown = (
_row: number,
event: React.KeyboardEvent<HTMLDivElement>
) => {
// The commit is already in-flight but this check prevents the
// user from changing selection.
if (
this.props.isCommitting &&
(event.key === 'Enter' || event.key === ' ')
) {
event.preventDefault()
}
return
}
public render() {
const fileCount = this.props.workingDirectory.files.length
const filesPlural = fileCount === 1 ? 'file' : 'files'
const filesDescription = `${fileCount} changed ${filesPlural}`
const includeAllValue = getIncludeAllValue(
this.props.workingDirectory,
this.props.rebaseConflictState
)
const disableAllCheckbox =
fileCount === 0 ||
this.props.isCommitting ||
this.props.rebaseConflictState !== null
return (
<div className="changes-list-container file-list">
<div className="header" onContextMenu={this.onContextMenu}>
<Checkbox
label={filesDescription}
value={includeAllValue}
onChange={this.onIncludeAllChanged}
disabled={disableAllCheckbox}
/>
</div>
<List
id="changes-list"
rowCount={this.props.workingDirectory.files.length}
rowHeight={RowHeight}
rowRenderer={this.renderRow}
selectedRows={this.state.selectedRows}
selectionMode="multi"
onSelectionChanged={this.props.onFileSelectionChanged}
invalidationProps={this.props.workingDirectory}
onRowClick={this.props.onRowClick}
onScroll={this.onScroll}
setScrollTop={this.props.changesListScrollTop}
onRowKeyDown={this.onRowKeyDown}
/>
{this.renderStashedChanges()}
{this.renderCommitMessageForm()}
</div>
)
}
}