Commit Graph

12 Commits

Author SHA1 Message Date
brian m. carlson
1481e9776d
prune: add options to be more aggressive about pruning
Some users really want to minimize the amount of data they store on the
local system, especially for large checkouts.  Let's add two options,
--recent and --force, the former which ignores the recency settings and
the latter which additionally prunes objects which are currently checked
out.  We will never prune objects that are unpushed, even with these
options, including stashed objects.

Add tests and documentation for both of these options.
2021-01-13 19:30:40 +00:00
Chris Darroch
fc2ac46cc8 t/t-prune.go: prefer printf to echo
Per PR advice from bk2204, we switch to using printf instead of
echo in the t-prune.go tests of stashed changes.

We also fixup one code comment to match the count of processes
in commands/command_prune.go.
2020-09-03 16:33:44 -07:00
Steve Streeting
c49b5790b4 Add test for untracked files in stash, fix parsing for full combo 2020-08-13 14:32:26 +01:00
Steve Streeting
eaa85a7fc8 Add test for stashed index AND working copy change 2020-08-12 15:30:47 +01:00
Steve Streeting
b1ccc8106a Hopefully final whitespace fix up 2020-08-10 09:48:39 +01:00
Steve Streeting
9da074cea1 cibuild still failing on whitespace, needs another blank line? 2020-08-08 11:27:46 +01:00
Steve Streeting
77056cbba6 Add trailing newline in test, was breaking cibuild 2020-08-08 11:12:09 +01:00
Steve Streeting
2dc718b38c prune: fix deleting objects referred to by stashes
It was impossible to pop a stash with LFS data successfully
after running any lfs prune command before this fix, because
prune would consider stashed data unreferenced.

This fixes #4206
2020-08-07 16:48:59 +01:00
brian m. carlson
9e006ac4e2
Rename default branch in tests to "main"
Currently, our default branch in tests is "master".  This is the Git
default, but the Git default will likely change in the future, so it
makes sense to update our testsuite to be explicit about the branch
name.  We'll ensure this continues by building against older versions of
Git as well as newer versions.

We use "main" for the new branch name, since that's the proposed value
upstream.

This commit was made entirely by automated means using the following
command:

  git grep -l master t | xargs sed -i -e 's/master/main/g'
2020-07-08 15:38:17 +00:00
Taylor Blau
7c244da198 tasklog/log.go: print "done" messages with a trailing period
We use package 'tasklog' to print progress messages to the command line
interface, as in the case of 'git-migrate-import(1)' or
'git-lfs-prune(1)'.

This package aims to mimic the style of upstream Git's progress log
lines, which are identical in every way, except for the trailing period
at the end of 'done'.

Git does print this period, but Git LFS does not. Let's make the two
more similar by having LFS print this period, too.
2019-08-23 17:04:37 -04:00
Taylor Blau
de9152049c t: load shell scripts from $(dirname) instead of 't' 2018-07-10 13:51:40 -05:00
Taylor Blau
219b7e0a3d t: prefix all existing tests with t- 2018-07-09 16:24:25 -05:00