-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Even more docs #23420
Even more docs #23420
Conversation
base/libgit2/consts.jl
Outdated
@@ -155,7 +166,18 @@ module Consts | |||
MERGE_FILE_IGNORE_WHITESPACE_EOL = 1 << 5, # Ignore whitespace at end of line | |||
MERGE_FILE_DIFF_PATIENCE = 1 << 6, # Use the "patience diff" algorithm | |||
MERGE_FILE_DIFF_MINIMAL = 1 << 7) # Take extra time to find minimal diff | |||
|
|||
""" Option flags for git merge file favortism. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"favortism" -> "favoritism"
* `version`: version of the struct in use, in case this changes later. For now, always `1`. | ||
* `flags`: an `enum` for flags describing merge behavior. | ||
Defined in [`git_merge_flag_t`](https://github.com/libgit2/libgit2/blob/HEAD/include/git2/merge.h#L95). | ||
The corresponding Julia enum is `GIT_MERGE` and has values: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps we should just document the enum directly and then link to it here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do doc it there but it's not in the devdocs...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like it would be a good idea to have that in the devdocs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is going to be more effort than it's worth. For one, most of these "enums" are not actually Julia enums, they're just constant (integer) values and we'd have to convert all of them for the docstrings to attach. For two, I seriously doubt many people are going to be referring to most of these flags often enough to merit having them in the devdocs and having someone keep those docs up to date. The vast majority of the time people are calling with the default values and if you're not, you're probably able to look up base/libgit2/consts.jl
. If I had my druthers we wouldn't have any inline docs in base/libgit2/consts.jl
since I very seriously doubt anyone is looking in there for anything and it's another thing we have to keep from getting desynced.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent points, agreed. Never mind me then. 👍
limit. This field is only present on libgit2 versions newer than 0.24.0. | ||
* `default_driver`: the merge driver to use if both sides have changed. This field | ||
is only present on libgit2 versions newer than 0.25.0. | ||
* `file_favor`: how to handle conflicting file contents for the `text` driver. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps link to the enum here rather than listing the values again?
fix typo
Test fail looks unrelated? |
No description provided.