Patch

From APIDesign

(Difference between revisions)
Jump to: navigation, search
(New page: What's a patch? How can it be distributed? When accepting API Patches one can probably think of a patch as a pull request. However, there are older and I'd like to claim st...)
Line 1: Line 1:
-
What's a [[patch]]? How can it be distributed? When accepting [[API Patch]]es one can probably think of a [[patch]] as a pull request. However, there are older and [[I]]'d like to claim still useful ways to deliver patches that work well with [[Git]] and other versioning systems. In fact this ''old [[good]] way'' is still in the heart of these versioning systems. [[I]] am talking about:
+
How can a [[path]] be distributed? When accepting [[API Patch]]es and having proper [[Git]] repository infrastructure one can probably think of a [[patch]] as a pull request. However, there are older and [[I]]'d like to claim still useful ways to deliver patches that work well with [[Git]] and other versioning systems. In fact this ''old [[good]] way'' is still in the heart of these versioning systems. [[I]] am talking about:
<source lang="diff">
<source lang="diff">

Revision as of 07:59, 20 January 2026

How can a path be distributed? When accepting API Patches and having proper Git repository infrastructure one can probably think of a patch as a pull request. However, there are older and I'd like to claim still useful ways to deliver patches that work well with Git and other versioning systems. In fact this old good way is still in the heart of these versioning systems. I am talking about:

diff --git channel/Channel.java channel/Channel.java
index da14c1bce6..0db8858d0a 100644
--- a/channel/Channel.java
+++ b/channel/Channel.java
@@ -493,13 +494,10 @@ public final class Channel<Data extends Channel.Config> implements AutoCloseable
    * @return {@code true} if the exception was printed and further details should be printed
    */
   private boolean printStackTrace(Throwable ex, boolean userCode) {
-    if (!userCode) {
       if (ex != null) {
         ex.printStackTrace();
       }
-      return true;
-    }
-    return false;
+    return  true;
   }
 
   /**

Quiz

What do you think about the above text?

  • I have a feeling I understand the patch
  • I known what those lines starting with + and - mean
  • I can apply the same changes to existing Channel.java file manually
  • I known tool to apply the changes for me
    • It is a UI application
    • I can do it from command line
    • I ask AI to apply the change for me
  • I know the -p argument of the CLI command
  • I know the -R argument of the CLI command
  • I know something more than you!
Personal tools
buy