Skip to content

Commit

Permalink
tar.js: Comment should describe why not what
Browse files Browse the repository at this point in the history
  • Loading branch information
isaacs committed Aug 13, 2014
1 parent 1d5c41d commit 0511261
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions lib/utils/tar.js
Original file line number Diff line number Diff line change
Expand Up @@ -250,15 +250,10 @@ function gunzTarPerm (tarball, target, dMode, fMode, uid, gid, cb_) {
return false
}

// If there is a .npmignore file, and a .gitignore file, then
// leave out the .gitignore file.
// If there is a .gitignore file, and no .npmignore file, then
// rename the .gitignore file to .npmignore.
// We do this by renaming the .gitignore file if we have not yet
// seen the corresponding .npmignore file. If we have seen it,
// then we just skip over it. If we haven't seen it yet, but it
// is coming, then that's fine, because it'll just clobber the
// renamed .gitignore file.
// Note: This mirrors logic in the fs read operations that are
// employed during tarball creation, in the fstream-npm module.
// It is duplicated here to handle tarballs that are created
// using other means, such as system tar or git archive.
if (this.type === "File") {
var base = path.basename(this.path)
if (base === ".npmignore") {
Expand Down

0 comments on commit 0511261

Please sign in to comment.