From: Sverre Rabbelier Date: Mon, 24 Aug 2009 20:52:35 GMT Subject: [PATCH v4 3/4] fast-import: add option command Message-ID: <1251147156-19279-4-git-send-email-srabbelier@gmail.com> In-Reply-To: <1251147156-19279-3-git-send-email-srabbelier@gmail.com> This allows the frontend to specify any of the supported options as long as no non-option command has been given. This way the user does not have to include any frontend-specific options, but instead she can rely on the frontend to tell fast-import what it needs. Also factor out parsing of argv and have it execute when we reach the first non-option command, or after all commands have been read and no non-option command has been encountered. Lastly do not read the marks file till after all options have been parsed, instead of when receiving the option. Signed-off-by: Sverre Rabbelier --- Same as v3 but with the --import-marks change already done in 2/4 Documentation/git-fast-import.txt | 23 ++++++++++++++ fast-import.c | 61 +++++++++++++++++++++++++++++------- 2 files changed, 72 insertions(+), 12 deletions(-) diff --git a/Documentation/git-fast-import.txt b/Documentation/git-fast-import.txt index c2f483a..ed8bd0d 100644 --- a/Documentation/git-fast-import.txt +++ b/Documentation/git-fast-import.txt @@ -303,6 +303,11 @@ and control the current import process. More detailed discussion standard output. This command is optional and is not needed to perform an import. +`option`:: + Specify any of the options listed under OPTIONS to change + fast-import's behavior to suit the frontend's needs. This command + is optional and is not needed to perform an import. + `commit` ~~~~~~~~ Create or update a branch with a new commit, recording one logical @@ -813,6 +818,24 @@ Placing a `progress` command immediately after a `checkpoint` will inform the reader when the `checkpoint` has been completed and it can safely access the refs that fast-import updated. +`option` +~~~~~~~~ +Processes the specified option so that git fast-import behaves in a +way that suits the frontend's needs. +Note that options specified by the frontend are overridden by any +options the user may specify to git fast-import itself. + +.... + 'option' SP