On Mon, Feb 23, 2015 at 03:16:59PM +0100, Michael J Gruber wrote:
> --to requires a directory, not a file. Say so in the usage string.
Sounds like a good goal, but...
> - OPT_FILENAME(0, "to", &opts.new_worktree,
> + OPT_STRING(0, "to", &opts.new_worktree, N_("dir"),
> N_("check a branch out in a separate working
> directory")),
OPT_FILENAME also calls fix_filename(), which munges the filename so
that relative paths given by the user will work, even though git has
chdir'd to the root of the working tree.
So you need to handle that somewhere. I think it might be less painful
to teach OPT_FILENAME to be more flexible in the usage message it
prints.
-Peff
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html