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

Function register_dir

scalar.c:287–304  ·  view source on GitHub ↗

* Register the current directory as a Scalar enlistment, and set the * recommended configuration. * * * If 'maintenance' is non-zero, then enable background maintenance. * * If 'maintenance' is zero, then leave background maintenance as it is * currently configured. */

Source from the content-addressed store, hash-verified

285 * currently configured.
286 */
287static int register_dir(int maintenance)
288{
289 if (add_or_remove_enlistment(1))
290 return error(_("could not add enlistment"));
291
292 if (set_recommended_config(0))
293 return error(_("could not set recommended config"));
294
295 if (maintenance &&
296 toggle_maintenance(maintenance))
297 warning(_("could not toggle maintenance"));
298
299 if (have_fsmonitor_support() && start_fsmonitor_daemon()) {
300 return error(_("could not start the FSMonitor daemon"));
301 }
302
303 return 0;
304}
305
306static int unregister_dir(void)
307{

Callers 3

cmd_cloneFunction · 0.85
cmd_registerFunction · 0.85
cmd_runFunction · 0.85

Calls 7

add_or_remove_enlistmentFunction · 0.85
errorFunction · 0.85
set_recommended_configFunction · 0.85
toggle_maintenanceFunction · 0.85
warningFunction · 0.85
have_fsmonitor_supportFunction · 0.85
start_fsmonitor_daemonFunction · 0.85

Tested by

no test coverage detected