Page MenuHomePhabricator

D21041.id50129.diff
No OneTemporary

D21041.id50129.diff

diff --git a/src/workflow/ArcanistDiffWorkflow.php b/src/workflow/ArcanistDiffWorkflow.php
--- a/src/workflow/ArcanistDiffWorkflow.php
+++ b/src/workflow/ArcanistDiffWorkflow.php
@@ -2900,6 +2900,9 @@
'uri' => $staging_uri,
);
+ list($stdout) = execx('git ls-files -z -- %s', ':(attr:filter=lfs)');
+ $is_lfs = strpos($stdout, "\0") !== false;
+
// If the base commit is a real commit, we're going to push it. We don't
// use this, but pushing it to a ref reduces the amount of redundant work
// that Git does on later pushes by helping it figure out that the remote
@@ -2923,7 +2926,7 @@
$refs[] = array(
'ref' => $diff_tag,
'type' => 'diff',
- 'commit' => $commit,
+ 'commit' => $is_lfs ? $base_commit : $commit,
'remote' => $remote,
);
@@ -2949,6 +2952,14 @@
'use --skip-staging to skip this step.'));
}
+ if ($is_lfs) {
+ $ref = '+'.$commit.':'.$diff_tag;
+ $err = phutil_passthru(
+ 'git push -- %s %s',
+ $staging_uri,
+ $ref);
+ }
+
return $refs;
}

File Metadata

Mime Type
text/plain
Expires
Sun, Dec 1, 7:43 AM (9 h, 53 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6812016
Default Alt Text
D21041.id50129.diff (1 KB)

Event Timeline