From: Johannes Sixt <j.sixt@viscovery.net>
To: Stephen Boyd <bebarino@gmail.com>
Cc: git@vger.kernel.org, Junio C Hamano <gitster@pobox.com>
Subject: Re: [PATCHv2 2/2] read-tree: migrate to parse-options
Date: Thu, 25 Jun 2009 08:55:26 +0200 [thread overview]
Message-ID: <4A431F5E.6070109@viscovery.net> (raw)
In-Reply-To: <1245906361-20644-1-git-send-email-bebarino@gmail.com>
Stephen Boyd schrieb:
> @@ -8,7 +8,10 @@ git-read-tree - Reads tree information into the index
>
> SYNOPSIS
> --------
> -'git read-tree' (<tree-ish> | [[-m [--trivial] [--aggressive] | --reset | --prefix=<prefix>] [-u | -i]] [--exclude-per-directory=<gitignore>] [--index-output=<file>] <tree-ish1> [<tree-ish2> [<tree-ish3>]])
> +'git read-tree' [--index-output=<file>] <treeish>
> +'git read-tree' [[-m [--trivial] [--aggressive] | --reset | --prefix=<prefix>]
> + [-u [--exclude-per-directory=<gitignore>] | -i]]
> + [--index-output=<file>] <tree-ish1> [<tree-ish2> [<tree-ish3>]]
Multi-line synopsis must begin with [verse].
If you write more than one mode of operation, the subsequent text should
better reference them, but the current text does not do that. I think it
is OK if you leave only the second, particularly because the first is only
a subset of the second.
> + opts.update = update ? 1 : 0;
> + opts.index_only = index_only ? 1 : 0;
> + opts.trivial_merges_only = trivial_merges_only ? 1 : 0;
> + opts.aggressive = aggressive ? 1 : 0;
> + opts.verbose_update = verbose ? 1 : 0;
> + opts.reset = reset ? 1 : 0;
> + stage = opts.merge = (reset || merge || prefix_set) ? 1 : 0;
I don't think that the bitfields of struct unpack_trees_options are cast
in stone. IMHO it is fine to make them regular struct members, so that you
can take their address for read_tree_options and these foo ? 1 : 0 become
unnecessary.
-- Hannes
next prev parent reply other threads:[~2009-06-25 6:55 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-24 4:27 [PATCH 1/2] read-tree: convert unhelpful usage()'s to helpful die()'s Stephen Boyd
2009-06-24 4:27 ` [PATCH 2/2] read-tree: migrate to parse-options Stephen Boyd
2009-06-24 5:08 ` Junio C Hamano
2009-06-25 1:36 ` Stephen Boyd
2009-06-25 5:06 ` [PATCHv2 " Stephen Boyd
2009-06-25 6:55 ` Johannes Sixt [this message]
2009-06-26 3:15 ` Stephen Boyd
2009-06-26 5:14 ` [PATCHv3 1/2] read-tree: convert unhelpful usage()'s to helpful die()'s Stephen Boyd
2009-06-26 5:14 ` [PATCHv3 2/2] read-tree: migrate to parse-options Stephen Boyd
2009-06-26 5:29 ` Stephen Boyd
2009-06-26 17:23 ` Junio C Hamano
2009-06-27 2:00 ` Stephen Boyd
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4A431F5E.6070109@viscovery.net \
--to=j.sixt@viscovery.net \
--cc=bebarino@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).