Page MenuHomePhabricator

`arc weld` should do something
Closed, ResolvedPublic

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

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.
Mnkras added a subscriber: Mnkras.May 18 2015, 3:25 PM

how-about-no

this is better

epriestley assigned this task to jcox.Aug 22 2016, 9:17 PM

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 removed jcox as the assignee of this task.Apr 7 2017, 1:04 PM
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