Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot use '-a' anymore for commit #188

Closed
ustieber opened this issue Jul 19, 2018 · 4 comments
Closed

Cannot use '-a' anymore for commit #188

ustieber opened this issue Jul 19, 2018 · 4 comments

Comments

@ustieber
Copy link
Contributor

Since gulp-git@2.6.0, and opt.args contains '-a', the git command is constructed as

git commit -m "my comment" -a .

Executing this command leads to a git error message

fatal: Paths with -a does not make sense.

When the trailing '.' is omitted, the command works again as expected.

The issue has been introduced by commit fc3ca0d, always appending a '.' to the git commit command.

@stephenlacy
Copy link
Owner

That particular change was required for git support on windows.
I see a two options for this going forward, either add an option to add the location suffix automatically, or add an option to have a raw commit command without any of the helper functions.
I personally would rather break the 2.6.0 and add an option to add the location and keep the base command.

@ustieber
Copy link
Contributor Author

What about adding the '.' to the command line only if 'disableAppendPaths' is 'false'? As it is done in line 70? From my point of view, that would solve the issue right away and without breaking anything. With '-a' in opt.args, 'disableAppendPaths' needs to be 'true' anyway.

@stephenlacy
Copy link
Owner

Want to send a pull request?

ustieber pushed a commit to ustieber/gulp-git that referenced this issue Jul 26, 2018
When '-a' is set in opt.args, opt.disableAppendPaths has to be set to 'true' too. Wrap appending the default ' .' path to the commit command accordingly to re-allow the use of '-a' as argument to the 'git commit' command.
ustieber pushed a commit to ustieber/gulp-git that referenced this issue Jul 26, 2018
Fix indentation of change in commit.js
ustieber added a commit to ustieber/gulp-git that referenced this issue Jul 28, 2018
Fix indentation of change in commit.js
stephenlacy pushed a commit that referenced this issue Jul 30, 2018
* Cannot use '-a' anymore for commit (#188)

When '-a' is set in opt.args, opt.disableAppendPaths has to be set to 'true' too. Wrap appending the default ' .' path to the commit command accordingly to re-allow the use of '-a' as argument to the 'git commit' command.

Fix indentation of change in commit.js
@stephenlacy
Copy link
Owner

e840a39

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants