git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [GSoC][PATCH v2] log: forbid log --graph --no-walk
       [not found] <md5:Tyvg1g0l6oUcTR3FnSDstw==>
@ 2015-03-14 23:33 ` epilys
  2015-03-14 23:47   ` brian m. carlson
  0 siblings, 1 reply; 4+ messages in thread
From: epilys @ 2015-03-14 23:33 UTC (permalink / raw)
  To: git; +Cc: me, gitster, peff

In git-log, --graph shows a graphical representation of a continuous
commit history, and --no-walk shows discrete specified commits without
continuity. Using both doesn't make sense, so we forbid the combined use
of these flags.

Signed-off-by: Manos Pitsidianakis <epilys@norn.io>
---
 builtin/log.c  | 2 ++
 t/t4202-log.sh | 4 ++++
 2 files changed, 6 insertions(+)

diff --git a/builtin/log.c b/builtin/log.c
index dd8f3fc..0194133 100644
--- a/builtin/log.c
+++ b/builtin/log.c
@@ -155,6 +155,8 @@ static void cmd_log_init_finish(int argc, const char **argv, const char *prefix,
 	memset(&w, 0, sizeof(w));
 	userformat_find_requirements(NULL, &w);
 
+    if (rev->graph && rev->no_walk)
+        die("--graph and --no-walk are incompatible");
 	if (!rev->show_notes_given && (!rev->pretty_given || w.notes))
 		rev->show_notes = 1;
 	if (rev->show_notes)
diff --git a/t/t4202-log.sh b/t/t4202-log.sh
index 5f2b290..4dd939b 100755
--- a/t/t4202-log.sh
+++ b/t/t4202-log.sh
@@ -887,4 +887,8 @@ test_expect_success GPG 'log --graph --show-signature for merged tag' '
 	grep "^| | gpg: Good signature" actual
 '
 
+test_expect_success 'forbid log --graph --no-walk' '
+    test_must_fail git log --graph --no-walk
+'
+
 test_done
-- 
2.1.4

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

* Re: [GSoC][PATCH v2] log: forbid log --graph --no-walk
  2015-03-14 23:33 ` [GSoC][PATCH v2] log: forbid log --graph --no-walk epilys
@ 2015-03-14 23:47   ` brian m. carlson
  2015-03-14 23:55     ` epilys
  0 siblings, 1 reply; 4+ messages in thread
From: brian m. carlson @ 2015-03-14 23:47 UTC (permalink / raw)
  To: epilys; +Cc: git, me, gitster, peff

[-- Attachment #1: Type: text/plain, Size: 1302 bytes --]

On Sun, Mar 15, 2015 at 01:33:07AM +0200, epilys wrote:
> diff --git a/builtin/log.c b/builtin/log.c
> index dd8f3fc..0194133 100644
> --- a/builtin/log.c
> +++ b/builtin/log.c
> @@ -155,6 +155,8 @@ static void cmd_log_init_finish(int argc, const char **argv, const char *prefix,
>  	memset(&w, 0, sizeof(w));
>  	userformat_find_requirements(NULL, &w);
>  
> +    if (rev->graph && rev->no_walk)
> +        die("--graph and --no-walk are incompatible");

It looks like you indented here with four spaces instead of a tab.  We
prefer tabs in Git.

>  	if (!rev->show_notes_given && (!rev->pretty_given || w.notes))
>  		rev->show_notes = 1;
>  	if (rev->show_notes)
> diff --git a/t/t4202-log.sh b/t/t4202-log.sh
> index 5f2b290..4dd939b 100755
> --- a/t/t4202-log.sh
> +++ b/t/t4202-log.sh
> @@ -887,4 +887,8 @@ test_expect_success GPG 'log --graph --show-signature for merged tag' '
>  	grep "^| | gpg: Good signature" actual
>  '
>  
> +test_expect_success 'forbid log --graph --no-walk' '
> +    test_must_fail git log --graph --no-walk

And here as well.
-- 
brian m. carlson / brian with sandals: Houston, Texas, US
+1 832 623 2791 | http://www.crustytoothpaste.net/~bmc | My opinion only
OpenPGP: RSA v4 4096b: 88AC E9B2 9196 305B A994 7552 F1BA 225C 0223 B187

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

* Re: [GSoC][PATCH v2] log: forbid log --graph --no-walk
  2015-03-14 23:47   ` brian m. carlson
@ 2015-03-14 23:55     ` epilys
  2015-03-15  0:04       ` brian m. carlson
  0 siblings, 1 reply; 4+ messages in thread
From: epilys @ 2015-03-14 23:55 UTC (permalink / raw)
  To: brian m. carlson; +Cc: git, me, gitster, peff

On 03/15/2015 01:47 AM, brian m. carlson wrote:
> It looks like you indented here with four spaces instead of a tab. 
> We prefer tabs in Git.

Messed that up. Do you think I should resubmit a v3 or am I hogging
the mailing list too much?

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

* Re: [GSoC][PATCH v2] log: forbid log --graph --no-walk
  2015-03-14 23:55     ` epilys
@ 2015-03-15  0:04       ` brian m. carlson
  0 siblings, 0 replies; 4+ messages in thread
From: brian m. carlson @ 2015-03-15  0:04 UTC (permalink / raw)
  To: epilys; +Cc: git, me, gitster, peff

[-- Attachment #1: Type: text/plain, Size: 1320 bytes --]

On Sun, Mar 15, 2015 at 01:55:28AM +0200, epilys wrote:
> On 03/15/2015 01:47 AM, brian m. carlson wrote:
> > It looks like you indented here with four spaces instead of a tab. 
> > We prefer tabs in Git.
> 
> Messed that up. Do you think I should resubmit a v3 or am I hogging
> the mailing list too much?

You're going to want to submit a v3.  While you're at it, you probably
want to drop the [GSoC] from the patch header, as it will be part of the
commit message when applied, and we don't want that.  Finally, you
probably want to use your full name in the From: line, as that will be
used to create the commit, and we prefer full names over aliases as well.

It can be helpful to try formatting the patch with git format-patch and
then checking over it with less and applying it with git am to see how
it will look to other Git developers.

This is a small patch, so it's not as big a deal, but for larger series
I generally try to wait two or three days (at least one of which is a
weekday) before posting a new version so that people have time to read,
test, and comment on it.
-- 
brian m. carlson / brian with sandals: Houston, Texas, US
+1 832 623 2791 | http://www.crustytoothpaste.net/~bmc | My opinion only
OpenPGP: RSA v4 4096b: 88AC E9B2 9196 305B A994 7552 F1BA 225C 0223 B187

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

end of thread, other threads:[~2015-03-15  0:04 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <md5:Tyvg1g0l6oUcTR3FnSDstw==>
2015-03-14 23:33 ` [GSoC][PATCH v2] log: forbid log --graph --no-walk epilys
2015-03-14 23:47   ` brian m. carlson
2015-03-14 23:55     ` epilys
2015-03-15  0:04       ` brian m. carlson

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