Re: [PATCH 1/1] git-p4: correct hasBranchPrefix verbose output

2016-06-22 Thread Junio C Hamano
Andrew Oakley  writes:

> The logic here was inverted, you got a message saying the file is
> ignored for each file that is not ignored.
>
> Signed-off-by: Andrew Oakley 
> ---

Thanks.

>  git-p4.py | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/git-p4.py b/git-p4.py
> index b6593cf..b123aa2 100755
> --- a/git-p4.py
> +++ b/git-p4.py
> @@ -2674,7 +2674,7 @@ class P4Sync(Command, P4UserMap):
>  return True
>  hasPrefix = [p for p in self.branchPrefixes
>  if p4PathStartsWith(path, p)]
> -if hasPrefix and self.verbose:
> +if not hasPrefix and self.verbose:
>  print('Ignoring file outside of prefix: {0}'.format(path))
>  return hasPrefix
--
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


[PATCH 1/1] git-p4: correct hasBranchPrefix verbose output

2016-06-22 Thread Andrew Oakley
The logic here was inverted, you got a message saying the file is
ignored for each file that is not ignored.

Signed-off-by: Andrew Oakley 
---
 git-p4.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/git-p4.py b/git-p4.py
index b6593cf..b123aa2 100755
--- a/git-p4.py
+++ b/git-p4.py
@@ -2674,7 +2674,7 @@ class P4Sync(Command, P4UserMap):
 return True
 hasPrefix = [p for p in self.branchPrefixes
 if p4PathStartsWith(path, p)]
-if hasPrefix and self.verbose:
+if not hasPrefix and self.verbose:
 print('Ignoring file outside of prefix: {0}'.format(path))
 return hasPrefix
 
-- 
2.7.3

--
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


Re: [PATCH 1/1] git-p4: correct hasBranchPrefix verbose output

2016-06-22 Thread Andrew Oakley
On 21/06/16 19:16, Junio C Hamano wrote:
> Thanks.  This needs sign-off, though.

Sorry, didn't realise I needed to do that!  Will resend with sign off.

Thanks
--
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


Re: [PATCH 1/1] git-p4: correct hasBranchPrefix verbose output

2016-06-21 Thread Junio C Hamano
Lars Schneider  writes:

>> On 21 Jun 2016, at 15:53, Andrew Oakley  wrote:
>> 
>> The logic here was inverted, you got a message saying the file is
>> ignored for each file that is not ignored.
>> ---
>> git-p4.py | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>> 
>> diff --git a/git-p4.py b/git-p4.py
>> index b6593cf..b123aa2 100755
>> --- a/git-p4.py
>> +++ b/git-p4.py
>> @@ -2674,7 +2674,7 @@ class P4Sync(Command, P4UserMap):
>> return True
>> hasPrefix = [p for p in self.branchPrefixes
>> if p4PathStartsWith(path, p)]
>> -if hasPrefix and self.verbose:
>> +if not hasPrefix and self.verbose:
>
> Thanks Andrew! Your fix is correct.

Thanks.  This needs sign-off, though.

>
> - Lars
>
>> print('Ignoring file outside of prefix: {0}'.format(path))
>> return hasPrefix
>> 
>> -- 
>> 2.7.3
>> 
>> --
>> 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
--
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


Re: [PATCH 1/1] git-p4: correct hasBranchPrefix verbose output

2016-06-21 Thread Lars Schneider

> On 21 Jun 2016, at 15:53, Andrew Oakley  wrote:
> 
> The logic here was inverted, you got a message saying the file is
> ignored for each file that is not ignored.
> ---
> git-p4.py | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/git-p4.py b/git-p4.py
> index b6593cf..b123aa2 100755
> --- a/git-p4.py
> +++ b/git-p4.py
> @@ -2674,7 +2674,7 @@ class P4Sync(Command, P4UserMap):
> return True
> hasPrefix = [p for p in self.branchPrefixes
> if p4PathStartsWith(path, p)]
> -if hasPrefix and self.verbose:
> +if not hasPrefix and self.verbose:

Thanks Andrew! Your fix is correct.

- Lars

> print('Ignoring file outside of prefix: {0}'.format(path))
> return hasPrefix
> 
> -- 
> 2.7.3
> 
> --
> 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

--
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


[PATCH 1/1] git-p4: correct hasBranchPrefix verbose output

2016-06-21 Thread Andrew Oakley
The logic here was inverted, you got a message saying the file is
ignored for each file that is not ignored.
---
 git-p4.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/git-p4.py b/git-p4.py
index b6593cf..b123aa2 100755
--- a/git-p4.py
+++ b/git-p4.py
@@ -2674,7 +2674,7 @@ class P4Sync(Command, P4UserMap):
 return True
 hasPrefix = [p for p in self.branchPrefixes
 if p4PathStartsWith(path, p)]
-if hasPrefix and self.verbose:
+if not hasPrefix and self.verbose:
 print('Ignoring file outside of prefix: {0}'.format(path))
 return hasPrefix
 
-- 
2.7.3

--
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