HackerTrans
TopNewTrendsCommentsPastAskShowJobs

skribanto

no profile record

comments

skribanto
·قبل 3 أشهر·discuss
From my understanding git reflog works on refs and jj op log works on fhe repo as a whole.

E.g. if I rebase some stacked branches then I want to undo it, with git I would reset each branch separately.

With jj you can timetravel the state of the repo in ine command
skribanto
·قبل 6 أشهر·discuss
rerere can help, but OP probably has their own workflow
skribanto
·قبل 7 أشهر·discuss
Why couldnt you flatten it?
skribanto
·قبل 8 أشهر·discuss
swap with last element then truncate at the end
skribanto
·قبل 9 أشهر·discuss
Well, it can make some chained function composition easier.

  Ick1 result1 = potentiallyNull1();
  Ick2 result2 = (result1 == null) ? null : potentiallyNull2(result1);
  Ick3 result3 = (result2 == null) ? null : potentiallyNull3(result2);
vs

  Ick3 result3 = potentiallyNone1()
    .flatMap(potentiallyNone2)
    .flatMap(potentiallyNone3);
You could maybe move the null check inside the method in the former and it cleans it up a bit, but in the latter you can have methods that are explicitly marked as taking NonNull in their type signature which is nice.