Warning, /utilities/ark/CONTRIBUTING.md is written in an unsupported language. File is not indexed.
0001 # Contributing to Ark 0002 0003 ## Coding Style 0004 0005 Ark follows the kdelibs/Qt coding style. For more information about them, please see: 0006 0007 - https://community.kde.org/Policies/Kdelibs_Coding_Style 0008 - https://wiki.qt.io/Qt_Coding_Style 0009 - https://wiki.qt.io/Coding_Conventions 0010 0011 ## Sending patches 0012 0013 To send patches for Ark, please use KDE's Gitlab instance at https://invent.kde.org/utilities/ark. 0014 0015 If you already have a KDE commit account, it is still preferable to contact 0016 the maintainer instead of committing directly, at least to be a good citizen 0017 and especially to avoid git mistakes (see the [Using git](#using-git) section). 0018 0019 ## Using git 0020 0021 The development model adopted by Ark is simple and rely on git's easy merging 0022 and branching capabilities. If in doubt, do not hesitate to ask! 0023 0024 First of all, you should do your work in a separate branch, and each commit 0025 should be as atomic as possible. This way, if you are asked to make changes to 0026 them, the rest of your work is not disturbed, and you can easily rebase. 0027 0028 New features are committed to the `master` branch, respecting KDE's Release 0029 Schedule policies. This means the soft and hard freeze periods must be 0030 respected, as well as the string freeze policy. 0031 0032 Bug fixes are committed to the latest stable branch (for example, `release/19.12`), 0033 which is then merged into the `master` branch. Do *NOT* cherry-pick commits 0034 into multiple branches! It makes following history unnecessarily harder for no 0035 reason. 0036 0037 ### How to merge stable in master 0038 0039 To merge the stable branch into `master`, the following steps can be followed: 0040 0041 ```bash 0042 $ git checkout release/19.12 # Whatever the stable branch is 0043 $ # hack, hack, hack 0044 $ # commit 0045 $ git checkout master 0046 $ git merge --log --edit -s recursive -Xours release/19.12 0047 ``` 0048 0049 Do not worry if unrelated commits (such as translation ones made by KDE's 0050 translation infrastructure) are also merged: translation commits are 0051 automatically reverted when needed, and other commits being merged should be 0052 bug fixes by definition. 0053 0054 The merge command above will try to automatically resolve conflicts by 0055 preferring the version of master. This is usually good, for example a conflict 0056 often happens on the `RELEASE_SERVICE_VERSION_XXX` variables in the root 0057 CMakeLists.txt file. On the stable branch you will find something like: 0058 0059 ```cmake 0060 set (RELEASE_SERVICE_VERSION_MAJOR "16") 0061 set (RELEASE_SERVICE_VERSION_MINOR "04") 0062 set (RELEASE_SERVICE_VERSION_MICRO "02") 0063 ``` 0064 0065 while on master you will find something like: 0066 0067 ```cmake 0068 set (RELEASE_SERVICE_VERSION_MAJOR "16") 0069 set (RELEASE_SERVICE_VERSION_MINOR "07") 0070 set (RELEASE_SERVICE_VERSION_MICRO "70") 0071 ``` 0072 0073 In this example, the `ours` strategy option will pick the master version, 0074 which is what we want. However, when a more complex conflict happens, 0075 the `ours` option might fail to autoresolve the conflict and might leave 0076 the working tree in a weird state. You should *always* check what the merge 0077 actually did by using (after the merge): 0078 0079 ```bash 0080 $ git diff origin/HEAD HEAD 0081 ``` 0082 0083 If the diff output is not what you expect, you can reset the merge with: 0084 0085 ```bash 0086 $ git reset --hard origin/HEAD 0087 ``` 0088 0089 Then you can do a simple merge which will *not* resolve conflicts: 0090 0091 ```bash 0092 $ git merge release/19.12 0093 ``` 0094 0095 and finally resolve all conflicts by hand. 0096 0097 ### Pushing your changes 0098 0099 When you are ready to push your commits to the remote repository, 0100 you may need to update your local branch first. 0101 Do *NOT* create unnecessary merge commits with 0102 `git pull`, as these commits are completely avoidable and make following 0103 history harder. Instead, you should *rebase* first (`git pull --rebase`). 0104 0105 ### See also 0106 0107 Instructions in the KDE community wiki: https://community.kde.org/KDE_Utils/Ark