Skip to content
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

Merged
merged 2 commits into from
Aug 27, 2017
Merged

Even more docs #23420

merged 2 commits into from
Aug 27, 2017

Conversation

kshyatt
Copy link
Contributor

@kshyatt kshyatt commented Aug 24, 2017

No description provided.

@kshyatt kshyatt added domain:docs This change adds or pertains to documentation libgit2 The libgit2 library or the LibGit2 stdlib module labels Aug 24, 2017
@kshyatt kshyatt requested a review from ararslan August 24, 2017 03:55
@@ -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.
Copy link
Member

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:
Copy link
Member

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?

Copy link
Contributor Author

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...

Copy link
Member

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

Copy link
Contributor Author

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.

Copy link
Member

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.
Copy link
Member

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?

@kshyatt
Copy link
Contributor Author

kshyatt commented Aug 27, 2017

Test fail looks unrelated?

@kshyatt kshyatt merged commit 77c2439 into master Aug 27, 2017
@kshyatt kshyatt deleted the ksh/docmergeopts branch August 27, 2017 20:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain:docs This change adds or pertains to documentation libgit2 The libgit2 library or the LibGit2 stdlib module
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants