From: Junio C Hamano <gitster@pobox.com>
To: "Pat Notz" <pknotz@sandia.gov>
Cc: git@vger.kernel.org
Subject: Re: [PATCHv4] Make git-clone respect branch.autosetuprebase
Date: Thu, 05 Mar 2009 21:29:39 -0800 [thread overview]
Message-ID: <7vsklrw75o.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <1236308321-13557-1-git-send-email-pknotz@sandia.gov> (Pat Notz's message of "Thu, 5 Mar 2009 19:58:41 -0700")
"Pat Notz" <pknotz@sandia.gov> writes:
> Signed-off-by: Pat Notz <pknotz@sandia.gov>
Thanks. I do not think there is substantial difference from the one I
queued in 'pu', so I'd keep that one instead, but here are a few comments
for future reference.
> diff --git a/branch.c b/branch.c
> index 1f00e44..332223b 100644
> --- a/branch.c
> +++ b/branch.c
> @@ -32,21 +32,52 @@ static int find_tracked_branch(struct remote *remote, void *priv)
> return 0;
> }
>
> -static int should_setup_rebase(const struct tracking *tracking)
> +static int should_setup_rebase(const char * origin)
"const char *origin";
> +void install_branch_config(int verbose_flag,
> + const char *local,
> + const char *origin,
> + const char *remote)
> +{
I called the parameter "flag" not "verbose" very much on purpose; we can
introduce flags that control aspects other than verbosity if we wanted to
later. Renaming it to verbose_flag defeats the extensibility.
> diff --git a/branch.h b/branch.h
> index 9f0c2a2..9f7fdb0 100644
> --- a/branch.h
> +++ b/branch.h
> @@ -21,4 +21,15 @@ void create_branch(const char *head, const char *name, const char *start_name,
> */
> void remove_branch_state(void);
>
> +/*
> + * Configure local branch "local" to merge remote branch "remote"
> + * taken from origin "origin".
> + */
> +#define BRANCH_CONFIG_QUIET 00
This QUIET is also against the extensible design, as later flags may mean
things unrelated to verbosity. With bitfield "flags" parameter, an unset
bit simply means "do not trigger this feature" and it is customary to pass
0 to such a function when the caller does not want anything special.
prev parent reply other threads:[~2009-03-06 5:31 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-03 20:23 [PATCHv3] Make git-clone respect branch.autosetuprebase Pat Notz
2009-03-04 6:29 ` Junio C Hamano
2009-03-06 2:58 ` [PATCHv4] " Pat Notz
2009-03-06 5:29 ` Junio C Hamano [this message]
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7vsklrw75o.fsf@gitster.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=pknotz@sandia.gov \
/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.
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 NNTP newsgroup(s).