Skip to content

alternative copy-diffs implementations #43

@ryan-williams

Description

@ryan-williams

the current "rsync the .git directory" approach is elegant and robust but unfortunately slow. Two others that we should support / experiment with:

  1. leverage git push instead of the main rsync call
    • the original implementation worked this way, but was very brittle:
      • stitching together the staged and unstaged states was done via writing diffs to files, packing them into a tar file, (s)cp'ing the tar file to the remote, unpacked, and applying+adding+applying
      • did not support untracked files, offered no reasonable way to do so
      • did not robustly/correctly copy branch/upstream/refs stats.
    • I think that this post-push work could be more easily done by carefully rsyncing only certain pieces of the .git directory, as well as rsyncing relevant changed files from the local repo, similarly to how the current rsync-based implementation works.
  2. don't copy any git state over, only rsync the files that git knows about / is not ignoring
    • this is likely fairly straightforward to do, should be quick, and is ideal for the case where the ultimate to desire is to have e.g. a remote watchman building or packing some artifact(s).

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions