Skip to content

Commit 60879ef

Browse files
committed
I noticed git went from 50MB to 2GB…
1 parent 07f3e9d commit 60879ef

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

lib/utils.ts

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,17 @@ export function find_in_PATH(program: string) {
4949
export async function rsync(from: Path, to: Path, additional_args: string[] = []) {
5050
console.log(`rsync ${from.string} ${to.string}`)
5151
to.parent().mkdir('p')
52-
const v = Deno.env.get("VERBOSE") ? 'v' : ''
53-
const args = [`-a${v}`, '--delete', ...additional_args, `${from.string}/`, to.string]
52+
const args = [
53+
'--archive',
54+
'--hard-links', // or hard links get broken in the result
55+
'--delete']
56+
if (Deno.env.get("VERBOSE")) {
57+
args.push('--verbose')
58+
}
59+
args.push(
60+
...additional_args,
61+
`${from.string}/`,
62+
to.string)
5463
const {success} = await new Deno.Command("rsync", {args}).spawn().status
5564
if (!success) throw new Error("rsync failed")
5665
}

0 commit comments

Comments
 (0)