mirror of
https://github.com/atom/atom.git
synced 2026-02-02 02:35:00 -05:00
Create new branch if guest has unpushed changes
This commit is contained in:
committed by
Kevin Sawicki
parent
56b333e7fb
commit
33f538ebf4
@@ -53,7 +53,17 @@ syncRepositoryState = ->
|
||||
return
|
||||
else
|
||||
# prompt for new branch name
|
||||
# create branch at head
|
||||
|
||||
i = 1
|
||||
loop
|
||||
newBranch = "#{branch}-#{i++}"
|
||||
break unless git.hasBranch(newBranch)
|
||||
|
||||
command = "git checkout -b #{newBranch} #{head}"
|
||||
exec command, {cwd: repoPath}, (error, stdout, stderr) ->
|
||||
if error?
|
||||
console.error error
|
||||
return
|
||||
else
|
||||
# create branch at head
|
||||
|
||||
|
||||
Reference in New Issue
Block a user