git-helpers icon indicating copy to clipboard operation
git-helpers copied to clipboard

alternative copy-diffs implementations

Open ryan-williams opened this issue 11 years ago • 0 comments

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).

ryan-williams avatar Dec 12 '14 22:12 ryan-williams