When should I wear a patch?

Asked

Viewed 190 times

3

One of the features of git is the use of patches. When a patch should be used?

I read that patches were designed for Hotfixes. However, I can’t understand why I would patch instead of just push the patch or pull request.

It would be the case that whoever fixed the bug was allowed to clone the repository, but not allowed to push or pull requests?

  • 1

    From a look here http://stackoverflow.com/questions/8279602/what-is-a-patch-in-git-version-control and also here http://rypress.com/tutorials/git/patch-workflows

  • 2

    There is a whole world of mailing list, IRC etc where people exchange patches. Well before pull requests and all this movement of "social coding" arose was so great projects open source worked... and that’s still how some of them work today, old Habits die hard.

  • Take a look at what the Linus Torvalds wrote in this pull request. While the conversation over there is about "how the mechanism of pull requests Github is broken", see that the discussion goes far. Meanwhile the initiates exchange patches on the e-mail list in a perfectly acceptable way :).

  • I saw that actually, even using patches, contributors can do a pull request so that the patch is accepted. What you said about being an old method makes perfect sense. Because the patch itself is already formatted to be sent via email.

1 answer

2


Patches are used when you want to send a Git commit via email, so much so that Git has tools even for sending.

This has to do with the Linux kernel developers' practice of exchanging patches and discussing them via email and mailing lists. Some projects mimic this modus operandi. Personally, I prefer a Gerrit-type revision tool.

  • But why send a commit via email instead of a pull request?

  • 1

    Pull request assumes some Github-like system that has an interface to handle pull request. People who develop Linux, Bluez and other projects prefer not to adopt such a system.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.