summaryrefslogtreecommitdiff
path: root/ref-filter.h
diff options
context:
space:
mode:
authorKarthik Nayak <karthik.188@gmail.com>2017-01-10 08:49:38 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-01-10 20:44:31 (GMT)
commitd4919bb288e46c81b92d6fe02c4f4564b8477fd3 (patch)
tree63c8b3945d12e52bf4ab98ce37c173bad669a299 /ref-filter.h
parent42d0eb05eed8e6c66d93091f5b0ece3a1872246c (diff)
downloadgit-d4919bb288e46c81b92d6fe02c4f4564b8477fd3.zip
git-d4919bb288e46c81b92d6fe02c4f4564b8477fd3.tar.gz
git-d4919bb288e46c81b92d6fe02c4f4564b8477fd3.tar.bz2
ref-filter: move get_head_description() from branch.c
Move the implementation of get_head_description() from branch.c to ref-filter. This gives a description of the HEAD ref if called. This is used as the refname for the HEAD ref whenever the FILTER_REFS_DETACHED_HEAD option is used. Make it public because we need it to calculate the length of the HEAD refs description in branch.c:calc_maxwidth() when we port branch.c to use ref-filter APIs. Mentored-by: Christian Couder <christian.couder@gmail.com> Mentored-by: Matthieu Moy <matthieu.moy@grenoble-inp.fr> Signed-off-by: Karthik Nayak <karthik.188@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'ref-filter.h')
-rw-r--r--ref-filter.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/ref-filter.h b/ref-filter.h
index fc55fa3..f78323d 100644
--- a/ref-filter.h
+++ b/ref-filter.h
@@ -108,5 +108,7 @@ int parse_opt_ref_sorting(const struct option *opt, const char *arg, int unset);
struct ref_sorting *ref_default_sorting(void);
/* Function to parse --merged and --no-merged options */
int parse_opt_merge_filter(const struct option *opt, const char *arg, int unset);
+/* Get the current HEAD's description */
+char *get_head_description(void);
#endif /* REF_FILTER_H */