anchor.diff:                  {error, {name_already_open, _}} ->
                       show_rename_warning(),
                       read_full_log(?LOG_NAME);
  -                {error, {size_mismatch, Current, New}} ->
  -                    show_size_warning(Current, New),
  -                    resize_log(?LOG_NAME, Current, New),
  -                    load();
                   {error, {invalid_header, {vsn, Version}}} ->
                       upgrade_version(?LOG_NAME, Version),
                       load();
  +                {error, {badarg, size}} ->
  +                    open_new_log(?LOG_NAME);
                   {error, Reason} ->
                       handle_open_error(Reason),
                       disable_history(),
  
positive.code: resize_log(Name, _OldSize, NewSize) ->
      show('$#erlang-history-resize-attempt',
           "Attempting to resize the log history file to ~p...", [NewSize]),
      Opts = lists:keydelete(size, 1, log_options()),
      _ = case disk_log:open(Opts) of
          {error, {need_repair, _}} ->
              _ = repair_log(Name),
              disk_log:open(Opts);
          _ ->
              ok
      end,
      case disk_log:change_size(Name, NewSize) of
          ok ->
              show('$#erlang-history-resize-result',
                   "ok~n", []);
          {error, {new_size_too_small, _, _}} ->
              show('$#erlang-history-resize-result',
                   "failed (new size is too small)~n", []),
              disable_history();
  
negative.code: handle_open_error(Err) ->
      show_unexpected_warning({disk_log, open, 1}, Err).
  
  disk_log_info(Tag) ->
      {Tag, Value} = lists:keyfind(size, 1, disk_log:info(?LOG_NAME)),
      Value.
  
  find_wrap_values() ->
      ConfSize = case application:get_env(kernel, shell_history_file_bytes) of
          undefined -> ?DEFAULT_SIZE;
  