mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-06-28 17:00:04 +02:00
ugly bug around unescaping
This commit is contained in:
parent
bbf837a4b2
commit
11074dba64
4 changed files with 17 additions and 15 deletions
|
@ -266,7 +266,7 @@ GitEngine.prototype.loadTree = function(tree) {
|
|||
};
|
||||
|
||||
GitEngine.prototype.loadTreeFromString = function(treeString) {
|
||||
this.loadTree(JSON.parse(unescape(treeString)));
|
||||
this.loadTree(JSON.parse(unescape(this.crappyUnescape(treeString))));
|
||||
};
|
||||
|
||||
GitEngine.prototype.instantiateFromTree = function(tree) {
|
||||
|
@ -357,6 +357,7 @@ GitEngine.prototype.makeOrigin = function(treeString) {
|
|||
ORIGIN_PREFIX + branchName,
|
||||
this.getCommitFromRef(originTarget)
|
||||
);
|
||||
console.log('made tracking branch', originBranch);
|
||||
|
||||
this.setLocalToTrackRemote(this.refs[branchJSON.id], originBranch);
|
||||
}, this);
|
||||
|
@ -2071,7 +2072,7 @@ GitEngine.prototype.deleteBranch = function(name) {
|
|||
};
|
||||
|
||||
GitEngine.prototype.crappyUnescape = function(str) {
|
||||
return str.replace(/'/g, "'").replace(///g, '/');
|
||||
return str.replace(/'/g, "'").replace(///g, "/");
|
||||
};
|
||||
|
||||
GitEngine.prototype.filterError = function(err) {
|
||||
|
|
|
@ -116,8 +116,8 @@ var Command = Backbone.Model.extend({
|
|||
}
|
||||
},
|
||||
|
||||
oneArgImpliedHead: function(args) {
|
||||
this.validateArgBounds(args, 0, 1);
|
||||
oneArgImpliedHead: function(args, option) {
|
||||
this.validateArgBounds(args, 0, 1, option);
|
||||
// and if it's one, add a HEAD to the back
|
||||
if (args.length === 0) {
|
||||
args.push('HEAD');
|
||||
|
|
|
@ -64,7 +64,6 @@ var VisBranch = VisBase.extend({
|
|||
console.log('set visbranch on this', this.get('branch'), this);
|
||||
window.debugVisBranch = this;
|
||||
window.debugBranch = this.get('branch');
|
||||
debugger;
|
||||
}
|
||||
var id = this.get('branch').get('id');
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue