[PATCH 3/5] pretty: introduce `get_user_format()`

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

 



From: Hariom Verma <hariom18599@xxxxxxxxx>

In the quest of porting pretty formats to use ref-filters logic,
user_format must need to interact with other functions too.
So, to get user_format, introduced `const char *get_user_format()`.

Mentored-by: Christian Couder <chriscool@xxxxxxxxxxxxx>
Mentored-by: Heba Waly <heba.waly@xxxxxxxxx>
Signed-off-by: Hariom Verma <hariom18599@xxxxxxxxx>
---
 pretty.c | 5 +++++
 pretty.h | 3 +++
 2 files changed, 8 insertions(+)

diff --git a/pretty.c b/pretty.c
index 2a3d46bf42f..3767c144b0a 100644
--- a/pretty.c
+++ b/pretty.c
@@ -2016,3 +2016,8 @@ void pp_commit_easy(enum cmit_fmt fmt, const struct commit *commit,
 	pp.fmt = fmt;
 	pretty_print_commit(&pp, commit, sb);
 }
+
+const char *get_user_format(void)
+{
+	return user_format;
+}
diff --git a/pretty.h b/pretty.h
index 071f2fb8e44..517450f72f8 100644
--- a/pretty.h
+++ b/pretty.h
@@ -139,4 +139,7 @@ const char *format_subject(struct strbuf *sb, const char *msg,
 /* Check if "cmit_fmt" will produce an empty output. */
 int commit_format_is_empty(enum cmit_fmt);
 
+/* Returns user_format */
+const char *get_user_format(void);
+
 #endif /* PRETTY_H */
-- 
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