diff options
| author | Alexander Ziaee <ziaee@FreeBSD.org> | 2026-11-15 10:45:10 +0000 |
|---|---|---|
| committer | Alexander Ziaee <ziaee@FreeBSD.org> | 2026-11-15 11:19:01 +0000 |
| commit | 78fe26fab983c39883d81fe3e80c6246d875b2aa (patch) | |
| tree | 7bd9a6cae858893428a442e12d8c6232d56204a6 | |
| parent | 8fad59f91dde7b4148ad5d5b00f74d8827bc8620 (diff) | |
Rewrite the the "Making a Diff" section of the "Working Copy" chapter
into a "Submitting the Changes" section on making a proper commit and
sending it to us on Differential with git-arc and tagging #docs.
Reviewed by: bcr, carlavilla
Differential Revision: https://reviews.freebsd.org/D61591
| -rw-r--r-- | documentation/content/en/books/fdp-primer/working-copy/_index.adoc | 37 |
1 files changed, 26 insertions, 11 deletions
diff --git a/documentation/content/en/books/fdp-primer/working-copy/_index.adoc b/documentation/content/en/books/fdp-primer/working-copy/_index.adoc index b8029905d3..5c61711a81 100644 --- a/documentation/content/en/books/fdp-primer/working-copy/_index.adoc +++ b/documentation/content/en/books/fdp-primer/working-copy/_index.adoc @@ -128,29 +128,44 @@ For example, to erase the edits made to [.filename]#_index.adoc# and reset it to .... [[working-copy-making-diff]] -== Making a Diff +== Submitting the Changes -After edits to a file or group of files are completed, the differences between the local working copy and the version on the FreeBSD repository must be collected into a single file for submission. -These _diff_ files are produced by redirecting the output of `git diff` into a file: +After edits to a file or group of files are completed, the differences between the local working copy and the version on the FreeBSD repository must be collected into a logical change called a commit, and submitted as a patch. [source,shell] .... % cd ~/doc -% git diff > doc-fix-spelling.diff +% vi README.md +% git commit -a .... -Give the file a meaningful name that identifies the contents. -The example above is for spelling fixes to the whole documentation tree. +They should be organized as one logical change per commit, with properly set authorship, and a message according to extref:{committers-guide}[project guidelines, commit-log-message]. -If the diff file is to be submitted with the web "link:https://bugs.FreeBSD.org/bugzilla/enter_bug.cgi[Submit a FreeBSD problem report]" interface, add a [.filename]#.txt# extension to give the earnest and simple-minded web form a clue that the contents are plain text. +Be careful: `git commit -a` includes all changes made in the current directory and any subdirectories, except deleted files. +If there are files in the working copy with edits that are not ready to be submitted yet, add a list of only the files that are to be included: -Be careful: `git diff` includes all changes made in the current directory and any subdirectories. -If there are files in the working copy with edits that are not ready to be submitted yet, provide a list of only the files that are to be included: +[source,shell] +.... +% cd ~/doc/documentation/content/en/books/handbook +% git add disks/_index.adoc printers/_index.adoc +% git commit +.... + +The preferred way to submit proposed changes is on our code review system, link:https://reviews.freebsd.org/[Differential]. +These patches can be sent directly from the command line with package:devel/freebsd-git-arc[]. [source,shell] .... -% cd ~/doc -% git diff disks/_index.adoc printers/_index.adoc > disks-printers.diff +% git show +% git arc create -r \#docs @ +.... + +Alternatively format the top commit in the stack into a patch file to be submitted some other way: + +[source,shell] +.... +% git show +% git format-patch -U999999 @~1 .... [[working-copy-git-references]] |
