All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Paul Tan <pyokagan@gmail.com>
Cc: git@vger.kernel.org, Jeff King <peff@peff.net>
Subject: Re: [PATCH v2] enter_repo(): fix docs to match code
Date: Tue, 31 Mar 2015 10:35:56 -0700	[thread overview]
Message-ID: <xmqq4mp1rrwj.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <1427809167-21711-1-git-send-email-pyokagan@gmail.com> (Paul Tan's message of "Tue, 31 Mar 2015 21:39:27 +0800")

Paul Tan <pyokagan@gmail.com> writes:

> On Mon, Mar 30, 2015 at 07:44:08AM -0400, Jeff King wrote:
>> Yes, this was adjusted in b3256eb (standardize and improve lookup rules
>> for external local repos, 2012-02-02), but I failed to update the
>> comment.
>> 
>> Your patch is certainly an improvement, but I think there are more
>> inaccuracies in the comment caused by that commit. Maybe squash this on
>> top:
>
> Thanks for catching.
>
> I've squashed the patches and rewrote the commit message.
>
> -->8--
>
> In b3256eb (standardize and improve lookup rules for external local
> repos), enter_repo() was modified to use a different precedence ordering
> of suffixes for DWIM of the repository path, and to ensure that the
> repository path is actually valid instead of just testing for existence.
> However, the documentation was not modified to reflect these changes.
> As such, fix the documentation to match the code.
>
> Documentation contributed by Jeff King.
>
> Signed-off-by: Jeff King <peff@peff.net>
> Signed-off-by: Paul Tan <pyokagan@gmail.com>
> ---

It appears to me that Peff's "squash" is nullifying everything you
did, so a more truthful attribution might be

	From: Jeff King <peff@peff.net>

	commit log message

	S-o-b: Jeff
        S-o-b: Paul Tan

Thanks.

>  path.c | 11 +++--------
>  1 file changed, 3 insertions(+), 8 deletions(-)
>
> diff --git a/path.c b/path.c
> index e608993..595da81 100644
> --- a/path.c
> +++ b/path.c
> @@ -303,14 +303,9 @@ return_null:
>   * (3) "relative/path" to mean cwd relative directory; or
>   * (4) "/absolute/path" to mean absolute directory.
>   *
> - * Unless "strict" is given, we try access() for existence of "%s.git/.git",
> - * "%s/.git", "%s.git", "%s" in this order.  The first one that exists is
> - * what we try.
> - *
> - * Second, we try chdir() to that.  Upon failure, we return NULL.
> - *
> - * Then, we try if the current directory is a valid git repository.
> - * Upon failure, we return NULL.
> + * Unless "strict" is given, we check "%s/.git", "%s", "%s.git/.git", "%s.git"
> + * in this order. We select the first one that is a valid git repository, and
> + * chdir() to it. If none match, or we fail to chdir, we return NULL.
>   *
>   * If all goes well, we return the directory we used to chdir() (but
>   * before ~user is expanded), avoiding getcwd() resolving symbolic

  reply	other threads:[~2015-03-31 17:36 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-30 10:30 [PATCH] enter_repo(): fix suffix precedence documentation Paul Tan
2015-03-30 11:08 ` Matthieu Moy
2015-03-31 13:39   ` [PATCH v2] enter_repo(): fix docs to match code Paul Tan
2015-03-31 17:35     ` Junio C Hamano [this message]
2015-03-31 17:41       ` Jeff King
2015-03-31 17:57         ` Junio C Hamano
2015-03-31 18:10       ` [PATCH v3] " Paul Tan
2015-03-30 11:44 ` [PATCH] enter_repo(): fix suffix precedence documentation Jeff King

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=xmqq4mp1rrwj.fsf@gitster.dls.corp.google.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=peff@peff.net \
    --cc=pyokagan@gmail.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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.