mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-07-15 09:04:26 +02:00
fixed git push target graph difference method bug
This commit is contained in:
parent
c98f979885
commit
fad9661f30
6 changed files with 39 additions and 6 deletions
|
@ -7839,7 +7839,18 @@ GitEngine.prototype.getTargetGraphDifference = function(
|
|||
_.each(here.parents, pushParent);
|
||||
}
|
||||
|
||||
return difference.sort(function(cA, cB) {
|
||||
// filter because we werent doing graph search
|
||||
var unique = {};
|
||||
var differenceUnique = [];
|
||||
_.forEach(difference, function(commit) {
|
||||
if (unique[commit.id]) {
|
||||
return;
|
||||
}
|
||||
unique[commit.id] = true;
|
||||
differenceUnique.push(commit);
|
||||
});
|
||||
|
||||
return differenceUnique.sort(function(cA, cB) {
|
||||
// reverse sort by depth
|
||||
return cB.depth - cA.depth;
|
||||
});
|
||||
|
@ -24004,7 +24015,18 @@ GitEngine.prototype.getTargetGraphDifference = function(
|
|||
_.each(here.parents, pushParent);
|
||||
}
|
||||
|
||||
return difference.sort(function(cA, cB) {
|
||||
// filter because we werent doing graph search
|
||||
var unique = {};
|
||||
var differenceUnique = [];
|
||||
_.forEach(difference, function(commit) {
|
||||
if (unique[commit.id]) {
|
||||
return;
|
||||
}
|
||||
unique[commit.id] = true;
|
||||
differenceUnique.push(commit);
|
||||
});
|
||||
|
||||
return differenceUnique.sort(function(cA, cB) {
|
||||
// reverse sort by depth
|
||||
return cB.depth - cA.depth;
|
||||
});
|
||||
|
|
1
build/bundle.min.13132f0d.js
Normal file
1
build/bundle.min.13132f0d.js
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
2
build/bundle.min.js
vendored
2
build/bundle.min.js
vendored
File diff suppressed because one or more lines are too long
|
@ -434,7 +434,7 @@
|
|||
For a much easier time perusing the source, see the individual files at:
|
||||
https://github.com/pcottle/learnGitBranching
|
||||
-->
|
||||
<script src="build/bundle.min.c159cb3d.js"></script>
|
||||
<script src="build/bundle.min.13132f0d.js"></script>
|
||||
|
||||
<!-- The advantage of github pages: super-easy, simple, slick static hostic.
|
||||
The downside? No raw logs to parse for analytics, so I have to include
|
||||
|
|
|
@ -794,7 +794,18 @@ GitEngine.prototype.getTargetGraphDifference = function(
|
|||
_.each(here.parents, pushParent);
|
||||
}
|
||||
|
||||
return difference.sort(function(cA, cB) {
|
||||
// filter because we werent doing graph search
|
||||
var unique = {};
|
||||
var differenceUnique = [];
|
||||
_.forEach(difference, function(commit) {
|
||||
if (unique[commit.id]) {
|
||||
return;
|
||||
}
|
||||
unique[commit.id] = true;
|
||||
differenceUnique.push(commit);
|
||||
});
|
||||
|
||||
return differenceUnique.sort(function(cA, cB) {
|
||||
// reverse sort by depth
|
||||
return cB.depth - cA.depth;
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue