gabrielcsapo / node-git-server

🎡 A configurable git server written in Node.js
https://gabrielcsapo.github.io/node-git-server
MIT License
253 stars 73 forks source link

"Type" is always "upload" #31

Closed jlxip closed 6 years ago

jlxip commented 6 years ago

Hi, @gabrielcsapo There are a few errors in the program.

First, in README.md you do if(type != 'upload') next(); which doesn't actually makes sense. As upload is for clone and download for push (it's seen by the server point of view, so the server has to upload (send) data when a clone command gets by).

You can check this in the previous version of the package. Here you have a few screenshots: Clone command: https://i.gyazo.com/0d85fe9eb00a055d4bbf39f17d86d833.png Content of type: https://i.gyazo.com/bd6c64d9f8e3d9dcd132c9ce61707461.png

Push command: https://i.gyazo.com/2e6c60d6dc43bf06c461e374ac4cfb13.png Content of type: https://i.gyazo.com/b47a2f8c678212cfbf1ba887e7406c88.png

And, second and most important: did you notice I said in the previous version of the package? Well, it's not working in the latest (v0.4.0). In the latest version, the value of type is always upload. Push command: https://i.gyazo.com/835eeee41d9ef5762dee870b07578c48.png Content of type: https://i.gyazo.com/504da2d9c68d3e25615455eca024185d.png

gabrielcsapo commented 6 years ago

@jlxip good point, I have a PR in for the fix, care to review it?

gabrielcsapo commented 6 years ago

published as node-git-server@0.4.1

jlxip commented 6 years ago

Fixed. Good job. :+1: