mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-06-26 07:58:34 +02:00
default tags to empty set on export Pull Request #137
This commit is contained in:
parent
1d7b2bb5a1
commit
e96df309e5
2 changed files with 13 additions and 0 deletions
|
@ -207,6 +207,7 @@ GitEngine.prototype.exportTree = function() {
|
||||||
var totalExport = {
|
var totalExport = {
|
||||||
branches: {},
|
branches: {},
|
||||||
commits: {},
|
commits: {},
|
||||||
|
tags: {},
|
||||||
HEAD: null
|
HEAD: null
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -331,6 +331,18 @@ TreeCompare.reduceTreeFields = function(trees) {
|
||||||
var defaults = {
|
var defaults = {
|
||||||
remoteTrackingBranchID: null
|
remoteTrackingBranchID: null
|
||||||
};
|
};
|
||||||
|
// also fill tree-level defaults
|
||||||
|
var treeDefaults = {
|
||||||
|
tags: {}
|
||||||
|
};
|
||||||
|
|
||||||
|
_.each(trees, function(tree) {
|
||||||
|
_.each(treeDefaults, function(val, key) {
|
||||||
|
if (tree[key] === undefined) {
|
||||||
|
tree[key] = val;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
// this function saves only the specified fields of a tree
|
// this function saves only the specified fields of a tree
|
||||||
var saveOnly = function(tree, treeKey, saveFields, sortFields) {
|
var saveOnly = function(tree, treeKey, saveFields, sortFields) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue