At line 45 of https://github.com/nodegit/nodegit/blob/master/examples/add-and-commit.js#L45 the sample calls return index.addByPath(fileName); line 48 then calls the same method but with the directory name as well: return index.addByPath(path.join(directoryName, fileName));
Should l45 be removed? They feel redundant, and in the case that you're working with a subdirectory and similarly named files (like index.html), it's possible that this code could actually add two different fles to the index...
At line 45 of https://github.com/nodegit/nodegit/blob/master/examples/add-and-commit.js#L45 the sample calls
return index.addByPath(fileName); line 48 then calls the same method but with the directory name as well:return index.addByPath(path.join(directoryName, fileName));Should l45 be removed? They feel redundant, and in the case that you're working with a subdirectory and similarly named files (like index.html), it's possible that this code could actually add two different fles to the index...