From: epilys <epilys@norn.io>
To: git@vger.kernel.org
Cc: me@ikke.info, gitster@pobox.com, peff@peff.net
Subject: [GSoC][PATCH v2] log: forbid log --graph --no-walk
Date: Sun, 15 Mar 2015 01:33:07 +0200 [thread overview]
Message-ID: <5504C533.7060304@norn.io> (raw)
In-Reply-To: <md5:Tyvg1g0l6oUcTR3FnSDstw==>
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
next parent reply other threads:[~2015-03-14 23:32 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <md5:Tyvg1g0l6oUcTR3FnSDstw==>
2015-03-14 23:33 ` epilys [this message]
2015-03-14 23:47 ` [GSoC][PATCH v2] log: forbid log --graph --no-walk brian m. carlson
2015-03-14 23:55 ` epilys
2015-03-15 0:04 ` brian m. carlson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5504C533.7060304@norn.io \
--to=epilys@norn.io \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=me@ikke.info \
--cc=peff@peff.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).