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

[Outreachy] check-ref-format: parse-options #449

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions builtin/merge-ours.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@
#include "git-compat-util.h"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On the Git mailing list, Junio C Hamano wrote (reply to this):

"george espinoza via GitGitGadget" <[email protected]> writes:

> From: george espinoza <[email protected]>
>
> Prepare this command which currently handles its own argv to use
> parse-options instead. A lot of the commands already have
> parse-options and in git.c cmd_struct with the "NO_PARSEOPT" are
> the one's that still need it.
>
> Signed-off-by: george espinoza <[email protected]>
> ---
>  builtin/merge-ours.c | 5 +++++
>  1 file changed, 5 insertions(+)
>
> diff --git a/builtin/merge-ours.c b/builtin/merge-ours.c
> index 4594507420..3980f4899a 100644
> --- a/builtin/merge-ours.c
> +++ b/builtin/merge-ours.c
> @@ -11,6 +11,11 @@
>  #include "git-compat-util.h"
>  #include "builtin.h"
>  #include "diff.h"
> +#include "parse-options.h"
> +
> +/* parse-options.h added to initiate replacement of manual option parsing
> + * with parse-options. 
> + */

See Documentation/CodingGuidelines and learn how we write multi-line
comments.

Since there is no "manual option parsing" to be replaced, there is
no other change to this file, I guess (so what's the point of this
step?).


#include "builtin.h"
#include "diff.h"
#include "parse-options.h"

/* parse-options.h added to initiate replacement of manual option parsing
* with parse-options.
*/

static const char builtin_merge_ours_usage[] =
"git merge-ours <base>... -- HEAD <remote>...";
Expand Down