MCPcopy Create free account
hub / github.com/git/git / default_name_or_path

Function default_name_or_path

submodule.c:775–783  ·  view source on GitHub ↗

* this would normally be two functions: default_name_from_path() and * path_from_default_name(). Since the default name is the same as * the submodule path we can get away with just one function which only * checks whether there is a submodule in the working directory at that * location. */

Source from the content-addressed store, hash-verified

773 * location.
774 */
775static const char *default_name_or_path(const char *path_or_name)
776{
777 int error_code;
778
779 if (!is_submodule_populated_gently(path_or_name, &error_code))
780 return NULL;
781
782 return path_or_name;
783}
784
785/*
786 * Holds relevant information for a changed submodule. Used as the .util

Calls 1

Tested by

no test coverage detected