From: "Hariom Verma via GitGitGadget" <gitgitgadget@gmail.com>
To: git@vger.kernel.org
Cc: Hariom Verma <hariom18599@gmail.com>,
Hariom Verma <hariom18599@gmail.com>
Subject: [PATCH 1/5] builtin/log: new config log.useRefFilter
Date: Mon, 15 Jun 2020 10:57:38 +0000 [thread overview]
Message-ID: <a5ce1235a03a49ad394da8d227f5abf52ef3179a.1592218662.git.gitgitgadget@gmail.com> (raw)
In-Reply-To: <pull.658.git.1592218662.gitgitgadget@gmail.com>
From: Hariom Verma <hariom18599@gmail.com>
Add a new boolean config variable "log.useRefFilter"
for `log` command, allowing log to switch to use ref-filters
logic.
*experimental*
Mentored-by: Christian Couder <chriscool@tuxfamily.org>
Mentored-by: Heba Waly <heba.waly@gmail.com>
Signed-off-by: Hariom Verma <hariom18599@gmail.com>
---
Documentation/config/log.txt | 4 ++++
builtin/log.c | 7 +++++++
2 files changed, 11 insertions(+)
diff --git a/Documentation/config/log.txt b/Documentation/config/log.txt
index 208d5fdcaa6..603f635df86 100644
--- a/Documentation/config/log.txt
+++ b/Documentation/config/log.txt
@@ -48,3 +48,7 @@ log.mailmap::
If true, makes linkgit:git-log[1], linkgit:git-show[1], and
linkgit:git-whatchanged[1] assume `--use-mailmap`, otherwise
assume `--no-use-mailmap`. True by default.
+
+log.useRefFilter::
+ [EXPERIMENTAL] If true, forces `git log` to use ref-filter's logic.
+ Is `false` by default.
diff --git a/builtin/log.c b/builtin/log.c
index d104d5c6889..4eb13d1ef88 100644
--- a/builtin/log.c
+++ b/builtin/log.c
@@ -39,6 +39,9 @@
#define MAIL_DEFAULT_WRAP 72
#define COVER_FROM_AUTO_MAX_SUBJECT_LEN 100
+/* Set true to use ref-filter's logic in git log */
+static int log_use_ref_filter;
+
/* Set a default date-time format for git log ("log.date" config variable) */
static const char *default_date_mode = NULL;
@@ -489,6 +492,10 @@ static int git_log_config(const char *var, const char *value, void *cb)
default_show_signature = git_config_bool(var, value);
return 0;
}
+ if (!strcmp(var, "log.usereffilter")) {
+ log_use_ref_filter = git_config_bool(var, value);
+ return 0;
+ }
if (grep_config(var, value, cb) < 0)
return -1;
--
gitgitgadget
next prev parent reply other threads:[~2020-06-15 10:57 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-15 10:57 [PATCH 0/5] [GSoC][RFC] print commits using ref-filter's logic Hariom Verma via GitGitGadget
2020-06-15 10:57 ` Hariom Verma via GitGitGadget [this message]
2020-06-15 10:57 ` [PATCH 2/5] revision: add `use_ref_filter` in struct rev_info Hariom Verma via GitGitGadget
2020-06-15 10:57 ` [PATCH 3/5] pretty: introduce `get_user_format()` Hariom Verma via GitGitGadget
2020-06-15 10:57 ` [PATCH 4/5] ref_format: add option to skip `\n` at eol Hariom Verma via GitGitGadget
2020-06-15 10:57 ` [PATCH 5/5] pretty-lib: print commits using ref-filters logic Hariom Verma via GitGitGadget
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a5ce1235a03a49ad394da8d227f5abf52ef3179a.1592218662.git.gitgitgadget@gmail.com \
--to=gitgitgadget@gmail.com \
--cc=git@vger.kernel.org \
--cc=hariom18599@gmail.com \
/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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).