#!/bin/bash program_invocation_name=$0 if type gettext &>/dev/null; then _() { gettext -- "$@"; } else _() { echo "$*"; } fi IFS= die() { printf "$(_ "$1")" "${@:2}" exit 2 } # Input Format # ------------ # With the exception of raw file data (which Git does not interpret) # the fast-import input format is text (ASCII) based. This text based # format simplifies development and debugging of frontend programs, # especially when a higher level language such as Perl, Python or # Ruby is being used. # # fast-import is very strict about its input. Where we say SP below we mean # *exactly* one space. Likewise LF means one (and only one) linefeed # and HT one (and only one) horizontal tab. # Supplying additional whitespace characters will cause unexpected # results, such as branch names or file names with leading or trailing # spaces in their name, or early termination of fast-import when it encounters # unexpected input. # # Stream Comments # ~~~~~~~~~~~~~~~ # To aid in debugging frontends fast-import ignores any line that # begins with `#` (ASCII pound/hash) up to and including the line # ending `LF`. A comment line may contain any sequence of bytes # that does not contain an LF and therefore may be used to include # any detailed debugging information that might be specific to the # frontend and useful when inspecting a fast-import data stream. get_line() { line='#' while [[ ${line:0:1} == '#' ]]; do read -r line || break done } # # Date Formats # ~~~~~~~~~~~~ # The following date formats are supported. A frontend should select # the format it will use for this import by passing the format name # in the --date-format= command-line option. # # `raw`:: # This is the Git native format and is `