Skip to content

Commit

Permalink
wip: git clean before uploading
Browse files Browse the repository at this point in the history
  • Loading branch information
redstreet committed Aug 25, 2023
1 parent e08ed86 commit b81e13a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions git-remote-rclone
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,9 @@ class RCloneRemote(object):
'--export-marks={}'.format(str(self.marks_rclone))],
env=env, check=True)

# TODO: do this optionally? Based on some git config key/value?
subprocess.run(['git', 'gc', '--prune=now', '--aggressive'], env=env, check=True)

# which refs do we have now?
after = self.run_cmd(['git', 'for-each-ref', "--format= %(refname) %(objectname) "])

Expand Down

0 comments on commit b81e13a

Please sign in to comment.