]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
libxfs-apply: CLI should specify source of commits
authorDave Chinner <david@fromorbit.com>
Thu, 2 Jul 2015 03:04:37 +0000 (13:04 +1000)
committerDave Chinner <david@fromorbit.com>
Thu, 2 Jul 2015 03:04:37 +0000 (13:04 +1000)
commit18ffd9667fbeea233280fe268a72a0beab68751e
tree0ed59d9397337b735b695dc022e79db487136ce6
parenta902a3c54e73cc0ee4b832d1f7610384f1e5bd05
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