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 1010 "title" : " History count" ,
1111 "description" : " Number of (most recent) commits shown in the history log" ,
1212 "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
1319 }
1420 }
1521}
Original file line number Diff line number Diff line change @@ -210,7 +210,12 @@ export class GitPanel extends React.Component<
210210 upstreamBranch = { this . state . upstreamBranch }
211211 stagedFiles = { this . state . stagedFiles }
212212 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+ }
214219 toggleSidebar = { this . toggleSidebar }
215220 sideBarExpanded = { this . state . isHistoryVisible }
216221 />
You can’t perform that action at this time.
0 commit comments