|
| 1 | +var NodeGit = require("../"); |
| 2 | + |
| 3 | +var ConvenientPatch = NodeGit.ConvenientPatch; |
| 4 | + |
| 5 | +var oldFile = ConvenientPatch.prototype.oldFile; |
| 6 | +/** |
| 7 | + * Old name of the file |
| 8 | + * @return {String} |
| 9 | + */ |
| 10 | +ConvenientPatch.prototype.oldFile = oldFile; |
| 11 | + |
| 12 | +var newFile = ConvenientPatch.prototype.newFile; |
| 13 | +/** |
| 14 | + * New name of the file |
| 15 | + * @return {String} |
| 16 | + */ |
| 17 | +ConvenientPatch.prototype.newFile = newFile; |
| 18 | + |
| 19 | +var size = ConvenientPatch.prototype.size; |
| 20 | +/** |
| 21 | + * The number of hunks in this patch |
| 22 | + * @return {Number} |
| 23 | + */ |
| 24 | +ConvenientPatch.prototype.size = size; |
| 25 | + |
| 26 | +var hunks = ConvenientPatch.prototype.hunks; |
| 27 | +/** |
| 28 | + * The hunks in this patch |
| 29 | + * @async |
| 30 | + * @return {Array<ConvenientHunk>} a promise that resolves to an array of |
| 31 | + * ConvenientHunks |
| 32 | + */ |
| 33 | +ConvenientPatch.prototype.hunks = hunks; |
| 34 | + |
| 35 | +var status = ConvenientPatch.prototype.status; |
| 36 | +/** |
| 37 | + * The status of this patch (unmodified, added, deleted) |
| 38 | + * @return {Number} |
| 39 | + */ |
| 40 | +ConvenientPatch.prototype.status = status; |
| 41 | + |
| 42 | +/** |
| 43 | + * @typedef lineStats |
| 44 | + * @type {Object} |
| 45 | + * @property {number} total_context # of contexts in the patch |
| 46 | + * @property {number} total_additions # of lines added in the patch |
| 47 | + * @property {number} total_deletions # of lines deleted in the patch |
| 48 | + */ |
| 49 | + |
| 50 | +var lineStats = ConvenientPatch.prototype.lineStats; |
| 51 | +/** |
| 52 | + * The line statistics of this patch (#contexts, #added, #deleted) |
| 53 | + * @return {lineStats} |
| 54 | + */ |
| 55 | +ConvenientPatch.prototype.lineStats = lineStats; |
| 56 | + |
| 57 | +var isUnmodified = ConvenientPatch.prototype.isUnmodified; |
| 58 | +/** |
| 59 | + * Is this an unmodified patch? |
| 60 | + * @return {Boolean} |
| 61 | + */ |
| 62 | +ConvenientPatch.prototype.isUnmodified = isUnmodified; |
| 63 | + |
| 64 | +var isAdded = ConvenientPatch.prototype.isAdded; |
| 65 | +/** |
| 66 | + * Is this an added patch? |
| 67 | + * @return {Boolean} |
| 68 | + */ |
| 69 | +ConvenientPatch.prototype.isAdded = isAdded; |
| 70 | + |
| 71 | +var isDeleted = ConvenientPatch.prototype.isDeleted; |
| 72 | +/** |
| 73 | + * Is this a deleted patch? |
| 74 | + * @return {Boolean} |
| 75 | + */ |
| 76 | +ConvenientPatch.prototype.isDeleted = isDeleted; |
| 77 | + |
| 78 | +var isModified = ConvenientPatch.prototype.isModified; |
| 79 | +/** |
| 80 | + * Is this an modified patch? |
| 81 | + * @return {Boolean} |
| 82 | + */ |
| 83 | +ConvenientPatch.prototype.isModified = isModified; |
| 84 | + |
| 85 | +var isRenamed = ConvenientPatch.prototype.isRenamed; |
| 86 | +/** |
| 87 | + * Is this a renamed patch? |
| 88 | + * @return {Boolean} |
| 89 | + */ |
| 90 | +ConvenientPatch.prototype.isRenamed = isRenamed; |
| 91 | + |
| 92 | +var isCopied = ConvenientPatch.prototype.isCopied; |
| 93 | +/** |
| 94 | + * Is this a copied patch? |
| 95 | + * @return {Boolean} |
| 96 | + */ |
| 97 | +ConvenientPatch.prototype.isCopied = isCopied; |
| 98 | + |
| 99 | +var isIgnored = ConvenientPatch.prototype.isIgnored; |
| 100 | +/** |
| 101 | + * Is this an ignored patch? |
| 102 | + * @return {Boolean} |
| 103 | + */ |
| 104 | +ConvenientPatch.prototype.isIgnored = isIgnored; |
| 105 | + |
| 106 | +var isUntracked = ConvenientPatch.prototype.isUntracked; |
| 107 | +/** |
| 108 | + * Is this an untracked patch? |
| 109 | + * @return {Boolean} |
| 110 | + */ |
| 111 | +ConvenientPatch.prototype.isUntracked = isUntracked; |
| 112 | + |
| 113 | +var isTypeChange = ConvenientPatch.prototype.isTypeChange; |
| 114 | +/** |
| 115 | + * Is this a type change? |
| 116 | + * @return {Boolean} |
| 117 | + */ |
| 118 | +ConvenientPatch.prototype.isTypeChange = isTypeChange; |
| 119 | + |
| 120 | +var isUnreadable = ConvenientPatch.prototype.isUnreadable; |
| 121 | +/** |
| 122 | + * Is this an undreadable patch? |
| 123 | + * @return {Boolean} |
| 124 | + */ |
| 125 | +ConvenientPatch.prototype.isUnreadable = isUnreadable; |
| 126 | + |
| 127 | +var isConflicted = ConvenientPatch.prototype.isConflicted; |
| 128 | +/** |
| 129 | + * Is this a conflicted patch? |
| 130 | + * @return {Boolean} |
| 131 | + */ |
| 132 | + ConvenientPatch.prototype.isConflicted = isConflicted; |
| 133 | + |
| 134 | + exports.module = ConvenientPatch; |
0 commit comments