mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-06-27 16:38:50 +02:00
Resolves #769 -- updates solution commands and fixes a TON more bugs with the master to main renaming
This commit is contained in:
parent
592860ea10
commit
a08fa94e92
22 changed files with 56 additions and 39 deletions
|
@ -394,7 +394,7 @@ var commandConfig = {
|
|||
source = firstArg;
|
||||
assertIsBranch(engine.origin, source);
|
||||
// get o/master locally if master is specified
|
||||
destination = engine.origin.refs[source].getPrefixedID();
|
||||
destination = engine.origin.resolveID(source).getPrefixedID();
|
||||
}
|
||||
if (source) { // empty string fails this check
|
||||
assertIsRef(engine.origin, source);
|
||||
|
@ -743,7 +743,7 @@ var commandConfig = {
|
|||
var refspecParts = firstArg.split(':');
|
||||
source = refspecParts[0];
|
||||
destination = validateBranchName(engine, refspecParts[1]);
|
||||
if (source === "" && !engine.origin.refs[destination]) {
|
||||
if (source === "" && !engine.origin.resolveID(destination)) {
|
||||
throw new GitError({
|
||||
msg: intl.todo(
|
||||
'cannot delete branch ' + options.destination + ' which doesnt exist'
|
||||
|
@ -770,7 +770,7 @@ var commandConfig = {
|
|||
sourceObj.getRemoteTrackingBranchID()) {
|
||||
assertBranchIsRemoteTracking(engine, source);
|
||||
var remoteBranch = sourceObj.getRemoteTrackingBranchID();
|
||||
destination = engine.refs[remoteBranch].getBaseID();
|
||||
destination = engine.resolveID(remoteBranch).getBaseID();
|
||||
} else {
|
||||
destination = validateBranchName(engine, source);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue