On Thu, May 2, 2013 at 8:39 AM, Ramkumar Ramachandra <artag...@gmail.com> wrote:

>     $ git symbolic-ref M refs/heads/master
>     $ git show M@{u}
>     $ git branch -u ram/master M
>
> This patch fixes branch_get() directly, making these work.

It's not a fix, it's implementing brand new functionality, and
changing old behaviors.

> --- a/remote.c
> +++ b/remote.c
> @@ -1463,13 +1463,30 @@ void set_ref_status_for_push(struct ref *remote_refs, 
> int send_mirror,
>
>  struct branch *branch_get(const char *name)
>  {
> -       struct branch *ret;
> +       struct branch *ret = NULL;
> +
> +       /* Setup */

I thought the preferred style for these kinds of comments was:

  /* setup */

> +       git_config(handle_config, NULL);
> +       alias_all_urls();
>
> -       read_config();
>         if (!name || !*name || !strcmp(name, "HEAD"))

I still see "HEAD" there. Didn't you say your patch makes "HEAD" less
of a special ref? Why is it still here?

> -               ret = current_branch;
> +               name = "HEAD";
>         else
>                 ret = make_branch(name, 0);
> +
> +       if (!ret || !ret->remote_name) {
> +               /* Is this a symbolic-ref like HEAD, pointing to a
> +                * valid branch?
> +                */

The style is:

  /*
   * This is the preferred style for multi-line
   * comments in the Linux kernel source code.
   * Please use it consistently.
   *
   * Description:  A column of asterisks on the left side,
   * with beginning and ending almost-blank lines.
   */

-- 
Felipe Contreras
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to