Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Potential example issue in add-and-commit.js L45-48 #409

Copy link
Copy link
@jeffwilcox

Description

@jeffwilcox
Issue body actions

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...

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.