git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 2/3] add is_git_repo (is_git_repository for char*)

From
Jeff King <peff@peff.net>
Date
Dec 5, 2015, 07:01 UTC
Message-ID
<20151205070137.GB21639@sigill.intra.peff.net>
In-Reply-To
<1449252917-3877-2-git-send-email-a.krey@gmx.de>
On Fri, Dec 04, 2015 at 07:15:16PM +0100, Andreas Krey wrote:
Show 9 quoted lines
> diff --git a/cache.h b/cache.h
> index 6626e97..42ab0c3 100644
> --- a/cache.h
> +++ b/cache.h
> @@ -440,6 +440,7 @@ extern const char *get_git_dir(void);
>  extern const char *get_git_common_dir(void);
>  extern int is_git_directory(const char *path);
>  extern int is_git_repository(struct strbuf *sb);
> +extern int is_git_repo(const char *path);

If we have two functions which do the same thing but differ only in their interface (here strbuf versus a C-string), we should probably give them related names that indicate the difference.

So "is_git_repository_str()" or something. (though per my previous email, I think we should have a new name for the first one, too).

-Peff
Previous: Jeff KingNext: Jeff King
Message 2 of 5 in “Re: [PATCH 1/3] externalize is_git_repository”
  1. Jeff KingDec 5, 2015
  2. Jeff KingDec 5, 2015
  3. Jeff KingDec 5, 2015
  4. Andreas KreyDec 6, 2015
  5. Jeff KingDec 7, 2015

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.