summaryrefslogtreecommitdiff
path: root/sys/lib/git
AgeCommit message (Collapse)Author
2023-02-19mkfiles: add 'mk test' supportOri Bernstein
9front has several tests scattered throughout the source, as well as more tests in an external 'regress' repository. Many of these tests are broken, because there is no easy way to build and track all of them. This pulls in several tests from different sources, deletes the broken tests, tests with missing data, and adds a single command that can be run from the root of the src directory to test our system. The hope is that as we develop new code, we add more tests, and eventually start running the tests on every commit. Please enter the commit message for your changes. Lines starting
2022-10-04git: clear status on whoami successMichael Forney
Otherwise, not taking the if branch will leave a failing status for the caller.
2022-08-13git/commit: user better defaults for usernameOri Bernstein
use '$user@$sysname' instead of 'glenda@9front.local'
2022-05-15git/merge: correctly preserve permissions when mergingOri Bernstein
when doing a 3 way merge of a file, we also need to do a merge of the permission bits to avoid clobberign them.
2022-04-19git/common.rc: create required directoriesOri Bernstein
we forgot a couple of directories when branching.
2021-09-03git: separate author and committerOri Bernstein
Git has the ability to track the person who creates a commit separately from the person who wrote the commit. For git9, we ignored this feature. However, as we start using git/import more, it will be useful to figure out who imported a commit, as well as who wrote it. This change adds support for seeing this information in git, as well as setting the author and committer separately in git/import.
2021-08-17git: better handling of absolute paths, regex metacharsOri Bernstein
Git currently gets a bit confused if you try to manipulate files by absolute path. There were also a number of places where user-controlled file paths ended up getting passed to regex interpretation, which could confuse things. This change mainly does 2 things: - Adds a 'drop' function which drops a non-regex prefix from a string, and uses that to manipulate paths, simplifies 'subst', and removes 'subst -g', which was only used with fixed regexes; sed does this job fine. - When getting a path from a user, we make it absolute and then strip out the head Along the way it cleans up a couple of stupids: - 'for(f in $list) if(! ~ $#f 0) use $f: $f can't be a nil list because of list flattening. - removes a useless substitution here: all=`$nl{{git/query -c $1 $2; git/query -c $2 $3} | sed 's/^..//' | \ gsubst '^('$ourbr'|'$basebr'|'$theirbr')/*' | sort | uniq} where git/query -c doesn't produce paths prefixed with the query.
2021-06-05git/branch: merge correct set of filesglenda
we were switching branches before we got the full list of modified files, which could garble what we were trying to merge.
2021-06-05git/{branch,pull}: merge files correctlyOri Bernstein
merge1 would clobber the global '$base' variable, which is not what we wanted. Run it in a subshell with its own env.
2021-05-30git/fs: move mount point to $repo/.git/fsOri Bernstein
Moving the mount point to within the repo directory means that we can have multiple git repos mounted at once with no conflict.
2021-05-17git: add missing fileOri Bernstein
Forgot to add common.rc in the initial commit.