You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What needs to happen for this to be implemented? This catches me up pretty much every single time and I also have githooks that take my commits about 15 seconds to go through so I don't realize my mistake until after that's done :-( This would be really helpful.
Up until now, I've created any of the features I needed in gulp-git. It is a project that is built for gulp, but we use it specifically for the library modules. I'd love to see Steve break that out into an actual library but it suits our needs but that's a separate conversation.
Currently it does not have a git diff module. Initially we'd need to create a module for that command and get it merged into Steve's project. He is very responsive and requires tests for all changes.
It has a diff module that we could try to use for this feature. If it works well then we could migrate the other git commands we use. Bottom line, we either need to add a dependency or get some changes merged into gulp-git and then implement them here.
Thanks!!! I've also started just writing my own wrappers and parsers for v2
so that might be an option for diff. It should pretty much be a regex
On Tue, Oct 13, 2015 at 9:22 AM Sébastien Barré notifications@github.com
wrote:
Yes! One question. Does git use different languages? If so then that grep
might not work.
On Tue, Oct 13, 2015 at 9:39 AM Sébastien Barré notifications@github.com
wrote:
Hold on, can't this problem be solved already with gulp-git?
Could be localized, you are correct. Option #2 then, because that would
return an empty string if nothing is staged.
On 10/13/15 10:41 AM, Jim Cummins wrote:
Yes! One question. Does git use different languages? If so then that grep
might not work.
On Tue, Oct 13, 2015 at 9:39 AM Sébastien Barré notifications@github.com
wrote:
Hold on, can't this problem be solved already with gulp-git?
Ok, I'll make sure to write a test for this in what I currently calling v2.
Side note: At the moment, I think v2 might actually be able to remain on the 1.x branch because as it is written, there should be no adapter breaking changes. The only thing that might make it called 2.x are some small cli changes. TBD.
I use git commit -am 'message' on a regular basis. But when I use
commitizen, I first git add . and then run npm run commit which runs an
npm script to run git-cz because I prefer to use the locally installed
binary. So it doesn't make much of a difference for me.
Ok, I have improved it slightly. You can do git-cz -a (notice that -m is missing) which will add the files before going through the normal commitizen prompts process. The reason you can't add -m in is that since we're filling in the message for you based on your inputs, we show you an error because your input doesn't make sense. We can work on this more and I'll outline this as a known issue in the docs, but I just wanted to document why this choice was made somewhere.
Ok, I have improved it slightly. You can do git-cz -a (notice that -m is
missing) which will add the files before going through the normal
commitizen prompts process. The reason you can't add -m in is that since
we're filling in the message for you based on your inputs, we show you an
error because your input doesn't make sense. We can work on this more and
I'll outline this as a known issue in the docs, but I just wanted to
document why this choice was made somewhere.
—
Reply to this email directly or view it on GitHub #7 (comment).
I just tried this in 2.3.0 and npm run commit -- -a seemed to work for me. I'd made a few changes since the last time we spoke. Can you try again @sebastienbarre. I am on npm 2 and node 0.12.7.
Activity
jimthedev commentedon Aug 7, 2015
Great idea. Seems like a no brainier.
kentcdodds commentedon Aug 26, 2015
What needs to happen for this to be implemented? This catches me up pretty much every single time and I also have githooks that take my commits about 15 seconds to go through so I don't realize my mistake until after that's done :-( This would be really helpful.
jimthedev commentedon Aug 30, 2015
Up until now, I've created any of the features I needed in gulp-git. It is a project that is built for gulp, but we use it specifically for the library modules. I'd love to see Steve break that out into an actual library but it suits our needs but that's a separate conversation.
Currently it does not have a git diff module. Initially we'd need to create a module for that command and get it merged into Steve's project. He is very responsive and requires tests for all changes.
Alternatively, we could consider switching the git library that we use. I know this one exists:
https://github.com/steveukx/git-js
It has a diff module that we could try to use for this feature. If it works well then we could migrate the other git commands we use. Bottom line, we either need to add a dependency or get some changes merged into gulp-git and then implement them here.
sebastienbarre commentedon Oct 13, 2015
OK, my gut feeling is that
gulp-gitis the more stable/popular of the two. I inquired in stephenlacy/gulp-git#97.jimthedev commentedon Oct 13, 2015
Thanks!!! I've also started just writing my own wrappers and parsers for v2
so that might be an option for diff. It should pretty much be a regex
On Tue, Oct 13, 2015 at 9:22 AM Sébastien Barré notifications@github.com
wrote:
sebastienbarre commentedon Oct 13, 2015
Hold on, can't this problem be solved already with
gulp-git?git.status, then just grep to see if "Changes to be committed" is not there,git.exec, and executediff --cachedfrom there? (akagit.exec({args : 'diff --cached'}, function (err, stdout) { ... });)jimthedev commentedon Oct 13, 2015
Yes! One question. Does git use different languages? If so then that grep
might not work.
On Tue, Oct 13, 2015 at 9:39 AM Sébastien Barré notifications@github.com
wrote:
sebastienbarre commentedon Oct 13, 2015
Could be localized, you are correct. Option #2 then, because that would
return an empty string if nothing is staged.
On 10/13/15 10:41 AM, Jim Cummins wrote:
jimthedev commentedon Oct 13, 2015
Ok, I'll make sure to write a test for this in what I currently calling v2.
Side note: At the moment, I think v2 might actually be able to remain on the 1.x branch because as it is written, there should be no adapter breaking changes. The only thing that might make it called 2.x are some small cli changes. TBD.
8 remaining items
jimthedev commentedon Oct 15, 2015
Cool. That's fair. I don't want to take away that functionality so I'll take a second look and try to get that working in the parser.
kentcdodds commentedon Oct 15, 2015
I use
git commit -am 'message'on a regular basis. But when I usecommitizen, I first
git add .and then runnpm run commitwhich runs annpm script to run
git-czbecause I prefer to use the locally installedbinary. So it doesn't make much of a difference for me.
On Thu, Oct 15, 2015 at 11:41 AM Jim Cummins notifications@github.com
wrote:
jimthedev commentedon Oct 15, 2015
Excellent. Thanks for taking the time to describe your use cases.
jimthedev commentedon Oct 16, 2015
Ok, I have improved it slightly. You can do
git-cz -a(notice that -m is missing) which will add the files before going through the normal commitizen prompts process. The reason you can't add -m in is that since we're filling in the message for you based on your inputs, we show you an error because your input doesn't make sense. We can work on this more and I'll outline this as a known issue in the docs, but I just wanted to document why this choice was made somewhere.kentcdodds commentedon Oct 16, 2015
Looks like a perfect solution to me 👍
On Thu, Oct 15, 2015 at 9:08 PM Jim Cummins notifications@github.com
wrote:
sebastienbarre commentedon Oct 16, 2015
Nice.
Minor. This worked for me:
This didn't:
where, in
package.json:This is minor of course. I could add
-ain the script.jimthedev commentedon Oct 16, 2015
Ah, good to know. Reopening for now and will work on for 2.x
Edit, no milestone for this just yet.
jimthedev commentedon Oct 28, 2015
I just tried this in 2.3.0 and
npm run commit -- -aseemed to work for me. I'd made a few changes since the last time we spoke. Can you try again @sebastienbarre. I am on npm 2 and node 0.12.7.sebastienbarre commentedon Oct 29, 2015
@jimthedev I confirm it works for me as well. Thx.