All of lore.kernel.org
 help / color / mirror / Atom feed
From: "skrab-sah via GitGitGadget" <gitgitgadget@gmail.com>
To: git@vger.kernel.org
Cc: skrab-sah <skrab.sah@gmail.com>, skrab-sah <skrab.sah@gmail.com>
Subject: [PATCH] abspath.h is created.
Date: Tue, 27 Sep 2022 16:08:28 +0000	[thread overview]
Message-ID: <pull.1345.git.git.1664294909011.gitgitgadget@gmail.com> (raw)

From: skrab-sah <skrab.sah@gmail.com>

replaced declaration of abspath.c from cache.h to abspath.h.
abspath.h is  generated by using makeheaders tool.

Signed-off-by: skrab-sah <skrab.sah@gmail.com>
---
    abspath.h file is generated by makeheaders tool
    
     1. we don't need to commit the file.
     2. added routin for abspath.c in Makefile.

Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-1345%2Fskrab-sah%2Fmaster-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-1345/skrab-sah/master-v1
Pull-Request: https://github.com/git/git/pull/1345

 abspath.c | 10 ++++++++++
 abspath.h |  9 +++++++++
 cache.h   | 21 +--------------------
 3 files changed, 20 insertions(+), 20 deletions(-)
 create mode 100644 abspath.h

diff --git a/abspath.c b/abspath.c
index 39e06b58486..1c163bbe651 100644
--- a/abspath.c
+++ b/abspath.c
@@ -262,6 +262,16 @@ char *absolute_pathdup(const char *path)
 	return strbuf_detach(&sb, NULL);
 }
 
+/*
+ * Concatenate "prefix" (if len is non-zero) and "path", with no
+ * connecting characters (so "prefix" should end with a "/").
+ * Unlike prefix_path, this should be used if the named file does
+ * not have to interact with index entry; i.e. name of a random file
+ * on the filesystem.
+ *
+ * The return value is always a newly allocated string (even if the
+ * prefix was empty).
+ */
 char *prefix_filename(const char *pfx, const char *arg)
 {
 	struct strbuf path = STRBUF_INIT;
diff --git a/abspath.h b/abspath.h
new file mode 100644
index 00000000000..edebc3a53ba
--- /dev/null
+++ b/abspath.h
@@ -0,0 +1,9 @@
+/* \aThis file was automatically generated.  Do not edit! */
+#undef INTERFACE
+char *prefix_filename(const char *pfx,const char *arg);
+char *absolute_pathdup(const char *path);
+const char *absolute_path(const char *path);
+char *real_pathdup(const char *path,int die_on_error);
+char *strbuf_realpath_forgiving(struct strbuf *resolved,const char *path,int die_on_error);
+char *strbuf_realpath(struct strbuf *resolved,const char *path,int die_on_error);
+int is_directory(const char *path);
diff --git a/cache.h b/cache.h
index 26ed03bd6de..e226dbcc7d5 100644
--- a/cache.h
+++ b/cache.h
@@ -646,18 +646,6 @@ const char *setup_git_directory(void);
 char *prefix_path(const char *prefix, int len, const char *path);
 char *prefix_path_gently(const char *prefix, int len, int *remaining, const char *path);
 
-/*
- * Concatenate "prefix" (if len is non-zero) and "path", with no
- * connecting characters (so "prefix" should end with a "/").
- * Unlike prefix_path, this should be used if the named file does
- * not have to interact with index entry; i.e. name of a random file
- * on the filesystem.
- *
- * The return value is always a newly allocated string (even if the
- * prefix was empty).
- */
-char *prefix_filename(const char *prefix, const char *path);
-
 int check_filename(const char *prefix, const char *name);
 void verify_filename(const char *prefix,
 		     const char *name,
@@ -1299,14 +1287,7 @@ static inline int is_absolute_path(const char *path)
 {
 	return is_dir_sep(path[0]) || has_dos_drive_prefix(path);
 }
-int is_directory(const char *);
-char *strbuf_realpath(struct strbuf *resolved, const char *path,
-		      int die_on_error);
-char *strbuf_realpath_forgiving(struct strbuf *resolved, const char *path,
-				int die_on_error);
-char *real_pathdup(const char *path, int die_on_error);
-const char *absolute_path(const char *path);
-char *absolute_pathdup(const char *path);
+#include "abspath.h"
 const char *remove_leading_path(const char *in, const char *prefix);
 const char *relative_path(const char *in, const char *prefix, struct strbuf *sb);
 int normalize_path_copy_len(char *dst, const char *src, int *prefix_len);

base-commit: 4fd6c5e44459e6444c2cd93383660134c95aabd1
-- 
gitgitgadget

             reply	other threads:[~2022-09-27 16:10 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-27 16:08 skrab-sah via GitGitGadget [this message]
2022-09-28  0:40 ` [PATCH] abspath.h is created Junio C Hamano
2022-09-28  7:32   ` Skrab Sah
2022-09-28 15:39     ` Taylor Blau
2022-09-28 17:58     ` Junio C Hamano

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=pull.1345.git.git.1664294909011.gitgitgadget@gmail.com \
    --to=gitgitgadget@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=skrab.sah@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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.