GithubHelp home page GithubHelp logo

Comments (16)

alexandrospanagiotidis avatar alexandrospanagiotidis commented on June 9, 2024 1

Just tried it, works perfectly for me πŸ‘

from patch-package.

ds300 avatar ds300 commented on June 9, 2024

Great idea, thanks! I think I'll do this tonight.

from patch-package.

ds300 avatar ds300 commented on June 9, 2024

Can you see any downside to ignoring EOL whitespace differences by default?

from patch-package.

alexandrospanagiotidis avatar alexandrospanagiotidis commented on June 9, 2024

Not really, probably best to do so.

from patch-package.

ds300 avatar ds300 commented on June 9, 2024

Yeah me neither. I'll do that first and then think about how to support other git diff options later. I think just allowing arbitrary commands through would be the wrong thing to do. Most of them are unrelated to patch-package's concerns.

from patch-package.

ds300 avatar ds300 commented on June 9, 2024

I've done this and it's in master, but haven't been able to publish. npm registry seems to be failing. Will try again tomorrow.

from patch-package.

alexandrospanagiotidis avatar alexandrospanagiotidis commented on June 9, 2024

Yeah, I thought arbitrary options would help working around future issues but you are right that most of them won't be needed.
Thanks for fixing the issue and keep up the good work!

from patch-package.

ds300 avatar ds300 commented on June 9, 2024

Oh, looks like it did get published last night and the npm registry was just being unresponsive somehow. Try out version 3.5.1!

from patch-package.

ds300 avatar ds300 commented on June 9, 2024

Had some time to look at the git diff docs, and there are three options I could imagine being useful to me one day, and maybe another five that might fit some very particular use cases I can't foresee. Anyway, I think I'll do what you originally suggested and make it so that any args passed after a solitary -- are then passed to git diff when creating patches. This is the lazy way out.

e.g.

patch-package my-package -- --diff-algorithm=patience

from patch-package.

alexandrospanagiotidis avatar alexandrospanagiotidis commented on June 9, 2024

While I appreciate this, I did not have a closer look at all options, so I suggest adding some kind of warning because some options might interfere with the normal usage of patch-package ;)

from patch-package.

wardpeet avatar wardpeet commented on June 9, 2024

:o I was looking for this :D I had to do -- --no-color any chance this can be added the the README? I could create a PR for it

from patch-package.

ds300 avatar ds300 commented on June 9, 2024

I think I'm misunderstanding your comment. Are you saying that it worked for you when adding -- --no-color?

This feature isn't implemented yet, so that would be odd πŸ‘€

from patch-package.

wardpeet avatar wardpeet commented on June 9, 2024

Sorry, I had to add --no-color in the code to make this work so it would be nice to have this feature. Do you need help implementing?

from patch-package.

ds300 avatar ds300 commented on June 9, 2024

@wardpeet Yeah that'd be great if you've got the time!

from patch-package.

KevinVlaanderen avatar KevinVlaanderen commented on June 9, 2024

Normally, a double dash signifies the end of the argument list. Any arguments you pass afterwards are generally passed to the root command (e.g. npx / node) [https://linux.die.net/man/1/bash].

"A -- signals the end of options and disables further option processing. Any arguments after the -- are treated as filenames and arguments. An argument of - is equivalent to --. "

Passing these arguments to git instead could be fairly confusing. Maybe it's better to copy npx' approach, e.g. add a --git-arg parameter? [https://www.npmjs.com/package/npx]

"-n, --node-arg - Extra node argument to supply to node when binary is a node script. You can supply this option multiple times to add more arguments."

from patch-package.

ds300 avatar ds300 commented on June 9, 2024

Closing this issue due to inactivity.

from patch-package.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.