]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
libxfs-apply: CLI should specify source of commits
authorDave Chinner <david@fromorbit.com>
Thu, 30 Jul 2015 23:06:58 +0000 (09:06 +1000)
committerDave Chinner <david@fromorbit.com>
Thu, 30 Jul 2015 23:06:58 +0000 (09:06 +1000)
commit5bb5f5d12c9ef63d0b50c69d596ee5a6b95721e1
tree72f4adc0c6f64e4a2ef8f6ddc53df3e3b862f0f4
parent1f2d2b98bd116ba03493ed10c6e076c95a5401f8
libxfs-apply: CLI should specify source of commits

Currently the CLI interface is:

$ libxfs-apply <destination repo> <source repo commits>

And assumes that it is is run in the source repo. It makes
more sense to run it in the destination repository and specify
both the source repo and the commit ids in which it comes from.

Change the CLI argument parsing to use options rather than trying to
guess the intention from the number of CLI options presented. Also
add checking to ensure the options are presented correctly, add more
meaningful error messages and check that the source/destination
repositories are recognised as either kernel or libxfs repositories.

The resulting usage is:

$ libxfs-apply
Need to specify both source repo and commit id

Usage:
        libxfs-apply --source <repodir> --commit <commit_id>
libxfs-apply --patch <patchfile>

libxfs-apply should be run in the destination git repository.
$

And so now option parsing can be expanded indefinitely.

Signed-off-by: Dave Chinner <david@fromorbit.com>
tools/libxfs-apply