чување d88b41e328ff320cc50e04a87a86a82160157d4e родитељ d7de2839a026a3120dbeee363369eaa32b2aa4db Аутор: Страхиња Радић <contact@strahinja.org> Датум: Mon, 14 Mar 2022 18:24:24 +0100 HACKING: New file Signed-off-by: Страхиња Радић <contact@strahinja.org> Diffstat:
| A | HACKING | | | 45 | +++++++++++++++++++++++++++++++++++++++++++++ |
измењених датотека: 1, додавања: 45(+), брисања: 0(-)
diff --git a/HACKING b/HACKING @@ -0,0 +1,45 @@ +Hacking +======= + +Code style +---------- + +I tend to write programs in C using my own style, which is described at: + + https://strahinja.org/tekstovi/softver/kodni-standard/ + +(page in Serbian). To automate the formatting of code, I use the program +clang-format with the configuration file located at: + + https://git.sr.ht/~strahinja/dotfiles/tree/master/item/.clang-format + +You can format the files before creating patches to send to me by using the +command + + $ clang-format -i filename.c # also applies to *.h + +with the above .clang-format located in your $HOME directory. + + +Creating customizations +----------------------- + +It is perhaps the most efficient to create a separate branch with your +modifications in the repository, then: + + $ git branch my_feature # if the branch doesn't already exist + $ git checkout my_feature + +and after making changes: + + $ git add -A + $ git commit -sS + $ git format-patch master --stdout > my_feature.patch + +You can then send the file my_feature.patch by email. To update the branch +holding your feature when the upstream changes, you can instead do: + + $ git checkout my_feature + $ git rebase --rebase-merges master + $ git format-patch master --stdout > my_feature.patch +