summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJafar Al-Gharaibeh <jafar@atcorp.com>2024-08-29 17:39:27 +0200
committerGitHub <noreply@github.com>2024-08-29 17:39:27 +0200
commitf1e4ef461d5bd39a9ad96c4116c2c869e4f37737 (patch)
treeef9e6beb535b1b186b976d0172c0c72750c9b901
parentMerge pull request #16680 from donaldsharp/route_scale_minor_changes (diff)
parentdoc: Document the git revert flow (diff)
downloadfrr-f1e4ef461d5bd39a9ad96c4116c2c869e4f37737.tar.xz
frr-f1e4ef461d5bd39a9ad96c4116c2c869e4f37737.zip
Merge pull request #16685 from opensourcerouting/fix/document_reverts
doc: Document the git revert flow
-rw-r--r--doc/developer/workflow.rst36
1 files changed, 36 insertions, 0 deletions
diff --git a/doc/developer/workflow.rst b/doc/developer/workflow.rst
index a6bdec1e5..50bcb2976 100644
--- a/doc/developer/workflow.rst
+++ b/doc/developer/workflow.rst
@@ -531,6 +531,42 @@ After Submitting Your Changes
community members.
- Your submission is done once it is merged to the master branch.
+Reverting the changes
+=====================
+
+When you revert a regular commit in Git, the process is straightforward - it
+undoes the changes introduced by that commit. However, reverting a merge commit
+is more complex. While it undoes the data changes brought in by the merge, it
+does not alter the repository's history or the merge's effect on it.
+
+Reverting a Merge Commit
+------------------------
+
+When you revert a merge commit, the following occurs:
+
+* The changes made by the merge are undone;
+* The merge itself remains in the history: it continues to be recognized as the point where two branches were joined;
+* Future merges will still treat this as the last shared state, regardless of the revert.
+
+Thus, a "revert" in Git undoes data changes, but it does not serve as a true "undo"
+for the historical effects of a commit.
+
+Reverting a Merge and Bisectability
+-----------------------------------
+
+Consider the implications of reverting a merge and then reverting that revert.
+This scenario complicates the debugging process, especially when using tools like
+git bisect. A reverted merge effectively consolidates all changes from the original
+merge into a single commit, but in reverse. This creates a challenge for debugging,
+as you lose the granularity of individual commits, making it difficult to identify
+the specific change causing an issue.
+
+Considerations
+--------------
+
+When reverting the changes, e.g. a full Pull Request, we SHOULD revert every commit
+individually, and not use git revert on merge commits.
+
Programming Languages, Tools and Libraries
==========================================