threads / patch / 38720

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

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

## tl;dr

4 messages between Mar 6, 2015 and Mar 8, 2015. Diffs are folded; open one to read it.

replies: 3people: 4as markdown or json

Akshay Aurora· Mar 6, 2015, 05:13 UTC · lore
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(-)
Show changes to revision.c +2 −1
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· Mar 6, 2015, 18:30 UTC · re: Akshay Aurora · lore

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

Akshay Aurora <akshayaurora@yahoo.com> writes:
Show 21 quoted lines
> 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· Mar 6, 2015, 20:57 UTC · re: Junio C Hamano · lore

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

Thanks Junio. Working on v2 for this patch.
On Sat, Mar 7, 2015 at 12:00 AM, Junio C Hamano <gitster@pobox.com> wrote:
Show 28 quoted lines
> 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· Mar 8, 2015, 10:13 UTC · re: Akshay Aurora · lore

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

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/

← back to recent threads