Page MenuHomePhabricator

`arc weld` should do something
Closed, ResolvedPublic

Assigned To
Authored By
epriestley
May 18 2015, 3:22 PM
Referenced Files
None
Tokens
"Pirate Logo" token, awarded by 20after4."100" token, awarded by yelirekim."Pterodactyl" token, awarded by joshuaspence."Manufacturing Defect?" token, awarded by cburroughs.

Description

Seems obvious in retrospect.

Event Timeline

epriestley raised the priority of this task from to Low.
epriestley updated the task description. (Show Details)
epriestley added a project: Arcanist.
epriestley added a subscriber: epriestley.

This will further familiarize you with arc. This may make sense to hold until some time after T5055, when arc workflows may change a bit. See also T11429.

My best idea for the behavior of arc weld is to work like cat, except overlap the characters of the leading and trailing lines of each file randomly (for each <line, character> position, randomly select the character from either the first or second file, creating an alloyed region where both files are equally represented). This makes sense with the weld command thematically, and has the distinct benefit of being utterly useless.

For example, if you have this file:

x.txt
XXXXX
XXXXX
XXXXX
XXXXX
XXXXX

...and this file:

y.txt
YYYYY
YYYYY
YYYYY
YYYYY
YYYYY

...and you ran cat x.txt y.txt, you'd get this output:

cat x.txt y.txt
XXXXX
XXXXX
XXXXX
XXXXX
XXXXX
YYYYY
YYYYY
YYYYY
YYYYY
YYYYY

But if you ran arc weld x.txt y.txt, imagine getting this output!

arc weld x.txt y.txt
XXXXX
XXXXX
XXXXX
XYYXY
YXYYX
YYYYY
YYYYY
YYYYY

The files have been welded together! Amazing!

(You are free to choose any other behavior -- even a useful one -- the requirement is only that arc weld do something.)

epriestley added a subscriber: jcox.

This should clearly be priority: Unbreak now!

Such useful.

Also, arc weld should support a few cli arguments:

--mig - merge the result into your git repository
--tig - diff against the repository and pipe the output through tig