Re: [PATCH v2] enter_repo(): fix docs to match code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Paul Tan <pyokagan@xxxxxxxxx> 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@xxxxxxxx>
> Signed-off-by: Paul Tan <pyokagan@xxxxxxxxx>
> ---

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

	From: Jeff King <peff@xxxxxxxx>

	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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]