Skip to content
pi-c Artifact [ba5ea7550f]
Login

Artifact [ba5ea7550f]

Artifact ba5ea7550f22e1d9a1d5e3777e2567ba3631d712dbb07501791329b6b34a10c3:


/* The workspace's .pic folder: it keeps itself out of version control, and says when a fossil or
 * zit checkout would pick it up anyway (docs/dev/durability.md). */
#ifndef PIC_FOLDER_H
#define PIC_FOLDER_H

#include <stddef.h>

/* Writes DIR/.gitignore holding "*" when DIR (a workspace's .pic) has none. Never touches the
 * project's own ignore files. 1 when it wrote the file; 0 when one was there, or on a platform
 * with no filesystem. */
int pic_folder_seal(const char *dir);

/* When DIR (a workspace's .pic, or the folder holding a journal named .pic/journal.sqlite) is in a
 * fossil or zit checkout whose `dotfiles` setting is on and whose project-level ignore settings
 * do not cover it, writes the plain warning, with the exact line to add, to OUT: 1. Otherwise 0.
 * Fossil and zit read only project-level ignore rules, not .gitignore, and list dot-paths only
 * with `dotfiles` on. */
int pic_folder_advice(const char *dir, char *out, size_t cap);

#endif