summaryrefslogtreecommitdiff
path: root/strbuf.h
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2018-02-12 09:49:37 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-02-12 21:13:35 (GMT)
commitc64a8d200f4109df86c6d4716ea4da58df450e34 (patch)
treeeaf8198f7aa5a888178e7a807dcc482c988b30fe /strbuf.h
parent9f792bb4721066ce27ee98c4ad38d6d146b64fcf (diff)
downloadgit-c64a8d200f4109df86c6d4716ea4da58df450e34.zip
git-c64a8d200f4109df86c6d4716ea4da58df450e34.tar.gz
git-c64a8d200f4109df86c6d4716ea4da58df450e34.tar.bz2
worktree move: accept destination as directory
Similar to "mv a b/", which is actually "mv a b/a", we extract basename of source worktree and create a directory of the same name at destination if dst path is a directory. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'strbuf.h')
-rw-r--r--strbuf.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/strbuf.h b/strbuf.h
index 14c8c10..e6cae5f 100644
--- a/strbuf.h
+++ b/strbuf.h
@@ -179,6 +179,9 @@ extern void strbuf_trim(struct strbuf *);
extern void strbuf_rtrim(struct strbuf *);
extern void strbuf_ltrim(struct strbuf *);
+/* Strip trailing directory separators */
+extern void strbuf_trim_trailing_dir_sep(struct strbuf *);
+
/**
* Replace the contents of the strbuf with a reencoded form. Returns -1
* on error, 0 on success.