# [PATCH][GSoC] revision: forbid --graph and --no-walk usage

4 messages from 2015-03-06 to 2015-03-08. Participants: Akshay Aurora, Junio C Hamano, Matthieu Moy.
Thread: https://gitlist.dev/t/38720

## Akshay Aurora, 2015-03-06 05:13

Subject: [PATCH][GSoC] revision: forbid --graph and --no-walk usage
Message-ID: <1425618810-21192-1-git-send-email-akshayaurora@yahoo.com>
URL: https://gitlist.dev/e/1425618810-21192-1-git-send-email-akshayaurora%40yahoo.com

```
Signed-off-by: Akshay Aurora <akshayaurora@yahoo.com>
---
This is my first patch for a GSoC Microproject, would be great to have your feedback.

 revision.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/revision.c b/revision.c
index bd027bc..d578652 100644
--- a/revision.c
+++ b/revision.c
@@ -2248,7 +2248,8 @@ int setup_revisions(int argc, const char **argv, struct rev_info *revs, struct s
 	 */
 	if (revs->reverse && revs->graph)
 		die("cannot combine --reverse with --graph");
-
+	if (revs->no_walk && revs->graph)
+		die("cannot combine --no-walk with --graph");
 	if (revs->reflog_info && revs->graph)
 		die("cannot combine --walk-reflogs with --graph");
 	if (!revs->reflog_info && revs->grep_filter.use_reflog_filter)
-- 
2.3.1

```

## Junio C Hamano, 2015-03-06 18:30

Subject: Re: [PATCH][GSoC] revision: forbid --graph and --no-walk usage
Message-ID: <xmqqtwxyyo5u.fsf@gitster.dls.corp.google.com>
URL: https://gitlist.dev/e/xmqqtwxyyo5u.fsf%40gitster.dls.corp.google.com
In-Reply-To: <1425618810-21192-1-git-send-email-akshayaurora@yahoo.com>

```
Akshay Aurora <akshayaurora@yahoo.com> writes:

> Signed-off-by: Akshay Aurora <akshayaurora@yahoo.com>
> ---
> This is my first patch for a GSoC Microproject, would be great to have your feedback.
>
>  revision.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/revision.c b/revision.c
> index bd027bc..d578652 100644
> --- a/revision.c
> +++ b/revision.c
> @@ -2248,7 +2248,8 @@ int setup_revisions(int argc, const char **argv, struct rev_info *revs, struct s
>  	 */
>  	if (revs->reverse && revs->graph)
>  		die("cannot combine --reverse with --graph");
> -
> +	if (revs->no_walk && revs->graph)
> +		die("cannot combine --no-walk with --graph");
>  	if (revs->reflog_info && revs->graph)
>  		die("cannot combine --walk-reflogs with --graph");
>  	if (!revs->reflog_info && revs->grep_filter.use_reflog_filter)

Needs a new test to make sure "log --no-walk --graph" is rejected,
and also you need to make sure all other existing tests that used to
pass before this change still pass.

```

## Akshay Aurora, 2015-03-06 20:57

Subject: Re: [PATCH][GSoC] revision: forbid --graph and --no-walk usage
Message-ID: <CAPGnZZ=B4kX2Cbfa4RmjnQToWcBb6nc3AUgvU2rSY4tbW08MKw@mail.gmail.com>
URL: https://gitlist.dev/e/CAPGnZZ%3DB4kX2Cbfa4RmjnQToWcBb6nc3AUgvU2rSY4tbW08MKw%40mail.gmail.com
In-Reply-To: <xmqqtwxyyo5u.fsf@gitster.dls.corp.google.com>

```
Thanks Junio. Working on v2 for this patch.

On Sat, Mar 7, 2015 at 12:00 AM, Junio C Hamano <gitster@pobox.com> wrote:
> Akshay Aurora <akshayaurora@yahoo.com> writes:
>
>> Signed-off-by: Akshay Aurora <akshayaurora@yahoo.com>
>> ---
>> This is my first patch for a GSoC Microproject, would be great to have your feedback.
>>
>>  revision.c | 3 ++-
>>  1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/revision.c b/revision.c
>> index bd027bc..d578652 100644
>> --- a/revision.c
>> +++ b/revision.c
>> @@ -2248,7 +2248,8 @@ int setup_revisions(int argc, const char **argv, struct rev_info *revs, struct s
>>        */
>>       if (revs->reverse && revs->graph)
>>               die("cannot combine --reverse with --graph");
>> -
>> +     if (revs->no_walk && revs->graph)
>> +             die("cannot combine --no-walk with --graph");
>>       if (revs->reflog_info && revs->graph)
>>               die("cannot combine --walk-reflogs with --graph");
>>       if (!revs->reflog_info && revs->grep_filter.use_reflog_filter)
>
> Needs a new test to make sure "log --no-walk --graph" is rejected,
> and also you need to make sure all other existing tests that used to
> pass before this change still pass.
>



-- 
- Akshay Aurora

```

## Matthieu Moy, 2015-03-08 10:13

Subject: Re: [PATCH][GSoC] revision: forbid --graph and --no-walk usage
Message-ID: <vpqoao34x1d.fsf@anie.imag.fr>
URL: https://gitlist.dev/e/vpqoao34x1d.fsf%40anie.imag.fr
In-Reply-To: <CAPGnZZ=B4kX2Cbfa4RmjnQToWcBb6nc3AUgvU2rSY4tbW08MKw@mail.gmail.com>

```
Akshay Aurora <akshayaurora2008@gmail.com> writes:

> Thanks Junio. Working on v2 for this patch.
>
> On Sat, Mar 7, 2015 at 12:00 AM, Junio C Hamano <gitster@pobox.com> wrote:

Please, don't top-post on this list.

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/

```
