mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-06-27 08:28:50 +02:00
change '_.extend' to 'Object.assign'
This commit is contained in:
parent
7ae05ce932
commit
052aa1e299
13 changed files with 27 additions and 27 deletions
|
@ -44,7 +44,7 @@ var Graph = {
|
|||
|
||||
if (type == 'HEAD') {
|
||||
var headJSON = tree.HEAD;
|
||||
var HEAD = new Ref(_.extend(
|
||||
var HEAD = new Ref(Object.assign(
|
||||
tree.HEAD,
|
||||
{
|
||||
target: this.getOrMakeRecursive(tree, createdSoFar, headJSON.target)
|
||||
|
@ -57,7 +57,7 @@ var Graph = {
|
|||
if (type == 'branch') {
|
||||
var branchJSON = tree.branches[objID];
|
||||
|
||||
var branch = new Branch(_.extend(
|
||||
var branch = new Branch(Object.assign(
|
||||
tree.branches[objID],
|
||||
{
|
||||
target: this.getOrMakeRecursive(tree, createdSoFar, branchJSON.target)
|
||||
|
@ -70,7 +70,7 @@ var Graph = {
|
|||
if (type == 'tag') {
|
||||
var tagJSON = tree.tags[objID];
|
||||
|
||||
var tag = new Tag(_.extend(
|
||||
var tag = new Tag(Object.assign(
|
||||
tree.tags[objID],
|
||||
{
|
||||
target: this.getOrMakeRecursive(tree, createdSoFar, tagJSON.target)
|
||||
|
@ -89,7 +89,7 @@ var Graph = {
|
|||
parentObjs.push(this.getOrMakeRecursive(tree, createdSoFar, parentID));
|
||||
}, this);
|
||||
|
||||
var commit = new Commit(_.extend(
|
||||
var commit = new Commit(Object.assign(
|
||||
commitJSON,
|
||||
{
|
||||
parents: parentObjs,
|
||||
|
|
|
@ -92,7 +92,7 @@ TreeCompare.compareAllBranchesWithinTrees = function(treeA, treeB) {
|
|||
treeA = this.convertTreeSafe(treeA);
|
||||
treeB = this.convertTreeSafe(treeB);
|
||||
|
||||
var allBranches = _.extend(
|
||||
var allBranches = Object.assign(
|
||||
{},
|
||||
treeA.branches,
|
||||
treeB.branches
|
||||
|
@ -140,7 +140,7 @@ TreeCompare.compareAllBranchesWithinTreesHashAgnostic = function(treeA, treeB) {
|
|||
treeB = this.convertTreeSafe(treeB);
|
||||
this.reduceTreeFields([treeA, treeB]);
|
||||
|
||||
var allBranches = _.extend(
|
||||
var allBranches = Object.assign(
|
||||
{},
|
||||
treeA.branches,
|
||||
treeB.branches
|
||||
|
@ -270,7 +270,7 @@ TreeCompare.getRecurseCompareHashAgnostic = function(treeA, treeB) {
|
|||
// some buildup functions
|
||||
var getStrippedCommitCopy = function(commit) {
|
||||
if (!commit) { return {}; }
|
||||
return _.extend(
|
||||
return Object.assign(
|
||||
{},
|
||||
commit,
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue