| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -12,8 +12,11 @@ var clone = Clone.clone; | |||
| 12 | 12 | * @param options | |
| 13 | 13 | */ | |
| 14 | 14 | Clone.clone = function(url, local_path, options) { | |
| 15 | + var remoteCallbacks = options.remoteCallbacks; | ||
| 16 | + delete options.remoteCallbacks; | ||
| 15 | 17 | options = normalizeOptions(options, NodeGit.CloneOptions); | |
| 16 | - options.remoteCallbacks = normalizeOptions(options.remoteCallbacks, | ||
| 18 | + | ||
| 19 | + options.remoteCallbacks = normalizeOptions(remoteCallbacks, | ||
| 17 | 20 | NodeGit.RemoteCallbacks); | |
| 18 | 21 | ||
| 19 | 22 | return clone.call(this, url, local_path, options); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -5,7 +5,7 @@ | |||
| 5 | 5 | * @return {Object} An Oid instance. | |
| 6 | 6 | */ | |
| 7 | 7 | function normalizeOptions(options, Ctor) { | |
| 8 | - var instance = new Ctor(); | ||
| 8 | + var instance = options instanceof Ctor ? options : new Ctor(); | ||
| 9 | 9 | ||
| 10 | 10 | if (!options) { | |
| 11 | 11 | return null; | |
| Back | FazBrowse Home | New Git URL |
0 commit comments