[1/5] and [2/5] - cleanup patches
[3/5] - refactor of a function that seemed a little unintuitive
[4/5] - just a preparatory step adding part of the logic
[5/5] - main patch that tries to improve the error messages
Changes in v2:
- dropped [1/5] of v1
[1/5]
- incroporated suggestions of Junio
[2/5]
- new in this series
- just a little thing I thought could improve things
[3/5]
- used the name 'validate_branch_creation' for the refactor
instead of 'validate_branch_update'
- changed the parameter names
[5/5]
- In v1 I added the connector string and removed it when it wasn't
necessary. It's not possible to do that as that string has to be
translated too and it won't have the same number of characters in
other languages. So, I switched to adding the connector only when
needed. Though this seems to introduce some redundancy, I find it
to be the only reliable way.
- tweaked commit message a little as suggested by Stefan
There is no change in the error messages themselves. So the sample input
output interaction sent for v1 still holds.
This series applies on top of 'master' and can be found in my fork[1].
In case you were wondering, the Travis-CI tests did pass.
[1]: https://github.com/sivaraam/git/tree/work/branch-move-revamp
[2]: https://travis-ci.org/sivaraam/git/builds/279199977
Kaartic Sivaraam (5):
branch: improve documentation and naming of certain parameters
branch: re-order function arguments to group related arguments
branch: cleanup branch name validation
branch: introduce dont_fail parameter for create validation
builtin/branch: give more useful error messages when renaming
branch.c | 69 +++++++++++++++++++++++++++++++++++++++---------------
branch.h | 53 ++++++++++++++++++++++++++++++-----------
builtin/branch.c | 43 ++++++++++++++++++++++++++++------
builtin/checkout.c | 8 +++----
t/t3200-branch.sh | 4 ++++
5 files changed, 133 insertions(+), 44 deletions(-)
--
2.14.1.935.ge2b2bcd8a