File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change 10
10
"title" : " History count" ,
11
11
"description" : " Number of (most recent) commits shown in the history log" ,
12
12
"default" : 25
13
+ },
14
+ "disableBranchWithChanges" : {
15
+ "type" : " boolean" ,
16
+ "title" : " Disable branch with changes" ,
17
+ "description" : " Disable all branch operations (new, switch) when there are changed/staged files" ,
18
+ "default" : false
13
19
}
14
20
}
15
21
}
Original file line number Diff line number Diff line change @@ -210,7 +210,12 @@ export class GitPanel extends React.Component<
210
210
upstreamBranch = { this . state . upstreamBranch }
211
211
stagedFiles = { this . state . stagedFiles }
212
212
data = { this . state . branches }
213
- disabled = { this . state . pastCommits . length === 0 }
213
+ disabled = {
214
+ this . state . pastCommits . length === 0 ||
215
+ ( this . props . settings . composite [
216
+ 'disableBranchWithChanges'
217
+ ] as boolean )
218
+ }
214
219
toggleSidebar = { this . toggleSidebar }
215
220
sideBarExpanded = { this . state . isHistoryVisible }
216
221
/>
You can’t perform that action at this time.
0 commit comments