git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] git-p4: correct hasBranchPrefix verbose output
@ 2016-06-21 13:53 Andrew Oakley
  2016-06-21 18:05 ` Lars Schneider
  0 siblings, 1 reply; 6+ messages in thread
From: Andrew Oakley @ 2016-06-21 13:53 UTC (permalink / raw)
  To: git; +Cc: luke, 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


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/1] git-p4: correct hasBranchPrefix verbose output
  2016-06-21 13:53 [PATCH 1/1] git-p4: correct hasBranchPrefix verbose output Andrew Oakley
@ 2016-06-21 18:05 ` Lars Schneider
  2016-06-21 18:16   ` Junio C Hamano
  0 siblings, 1 reply; 6+ messages in thread
From: Lars Schneider @ 2016-06-21 18:05 UTC (permalink / raw)
  To: Andrew Oakley; +Cc: git, luke


> On 21 Jun 2016, at 15:53, Andrew Oakley <aoakley@roku.com> 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 majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/1] git-p4: correct hasBranchPrefix verbose output
  2016-06-21 18:05 ` Lars Schneider
@ 2016-06-21 18:16   ` Junio C Hamano
  2016-06-22  9:24     ` Andrew Oakley
  2016-06-22  9:26     ` Andrew Oakley
  0 siblings, 2 replies; 6+ messages in thread
From: Junio C Hamano @ 2016-06-21 18:16 UTC (permalink / raw)
  To: Lars Schneider; +Cc: Andrew Oakley, git, luke

Lars Schneider <larsxschneider@gmail.com> writes:

>> On 21 Jun 2016, at 15:53, Andrew Oakley <aoakley@roku.com> 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 majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/1] git-p4: correct hasBranchPrefix verbose output
  2016-06-21 18:16   ` Junio C Hamano
@ 2016-06-22  9:24     ` Andrew Oakley
  2016-06-22  9:26     ` Andrew Oakley
  1 sibling, 0 replies; 6+ messages in thread
From: Andrew Oakley @ 2016-06-22  9:24 UTC (permalink / raw)
  To: Junio C Hamano, Lars Schneider; +Cc: git, luke

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 1/1] git-p4: correct hasBranchPrefix verbose output
  2016-06-21 18:16   ` Junio C Hamano
  2016-06-22  9:24     ` Andrew Oakley
@ 2016-06-22  9:26     ` Andrew Oakley
  2016-06-22 18:38       ` Junio C Hamano
  1 sibling, 1 reply; 6+ messages in thread
From: Andrew Oakley @ 2016-06-22  9:26 UTC (permalink / raw)
  To: git; +Cc: gitster, larsxschneider, luke, 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 <aoakley@roku.com>
---
 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


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/1] git-p4: correct hasBranchPrefix verbose output
  2016-06-22  9:26     ` Andrew Oakley
@ 2016-06-22 18:38       ` Junio C Hamano
  0 siblings, 0 replies; 6+ messages in thread
From: Junio C Hamano @ 2016-06-22 18:38 UTC (permalink / raw)
  To: Andrew Oakley; +Cc: git, larsxschneider, luke

Andrew Oakley <aoakley@roku.com> 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 <aoakley@roku.com>
> ---

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-06-22 18:38 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-21 13:53 [PATCH 1/1] git-p4: correct hasBranchPrefix verbose output Andrew Oakley
2016-06-21 18:05 ` Lars Schneider
2016-06-21 18:16   ` Junio C Hamano
2016-06-22  9:24     ` Andrew Oakley
2016-06-22  9:26     ` Andrew Oakley
2016-06-22 18:38       ` Junio C Hamano

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