[PATCH 1/5] builtin/log: new config log.useRefFilter

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Hariom Verma <hariom18599@xxxxxxxxx>

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@xxxxxxxxxxxxx>
Mentored-by: Heba Waly <heba.waly@xxxxxxxxx>
Signed-off-by: Hariom Verma <hariom18599@xxxxxxxxx>
---
 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




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux