git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kaartic Sivaraam <kaartic.sivaraam@gmail.com>
To: git@vger.kernel.org
Subject: [RFC PATCH v3 0/4] give more useful error messages while renaming branch
Date: Thu,  2 Nov 2017 12:22:38 +0530	[thread overview]
Message-ID: <20171102065242.25299-1-kaartic.sivaraam@gmail.com> (raw)

In builtin/branch, the error messages weren't handled directly by the branch
renaming function and was left to the other function. Though this avoids
redundancy this gave unclear error messages in some cases. So, make builtin/branch
give more useful error messages.

Changes in v3:

	Incorporated suggestions from v2 to improve code and commit message. To
	be more precise about the code part,

	In 2/4 slightly re-ordered the parameters to move the flag parameters to
	the end.

	In 3/4, changed the return type of the branchname validation functions to
	be the enum (whose values they return) as suggested by Stefan.

	Dropped the PATCH 3/5 of v2 as there was another series[1] that did the
	refactor and got merged to 'next'. I have now re-rolled the series over
	'next' [pointing at 273055501 (Sync with master, 2017-10-24)].
 
	This has made the code in 3/4 a little clumsy (at least to me) as I
	tried to achieve to achieve what the previous patches did with the new
	validate*_branchname functionS. Let me know, if it looks too bad.

So this could go on top of 'next' without any conflicts but in case I
missed something, let me know. The series could be found in my fork[2].


Any feedback welcome.

Thanks,
Kaartic

[1] : https://public-inbox.org/git/20171013051132.3973-1-gitster@pobox.com

[2] : https://github.com/sivaraam/git/tree/work/branch-revamp


Kaartic Sivaraam (4):
  branch: improve documentation and naming of 'create_branch()'
  branch: re-order function arguments to group related arguments
  branch: introduce dont_fail parameter for branchname validation
  builtin/branch: give more useful error messages when renaming

 branch.c           | 63 ++++++++++++++++++++++++++++++------------------------
 branch.h           | 57 ++++++++++++++++++++++++++++++++++++++----------
 builtin/branch.c   | 49 ++++++++++++++++++++++++++++++++++--------
 builtin/checkout.c | 11 +++++-----
 4 files changed, 127 insertions(+), 53 deletions(-)

-- 
2.15.0.rc2.401.g3db9995f9

             reply	other threads:[~2017-11-02  6:53 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-02  6:52 Kaartic Sivaraam [this message]
2017-11-02  6:52 ` [RFC PATCH v3 1/4] branch: improve documentation and naming of 'create_branch()' Kaartic Sivaraam
2017-11-02  6:52 ` [RFC PATCH v3 2/4] branch: re-order function arguments to group related arguments Kaartic Sivaraam
2017-11-02  6:52 ` [RFC PATCH v3 3/4] branch: introduce dont_fail parameter for branchname validation Kaartic Sivaraam
2017-11-02  6:52 ` [RFC PATCH v3 4/4] builtin/branch: give more useful error messages when renaming Kaartic Sivaraam
2017-11-02  6:55 ` [RFC PATCH v3 0/4] give more useful error messages while renaming branch Kaartic Sivaraam
  -- strict thread matches above, loose matches on Subject: below --
2017-09-25  8:20 [RFC PATCH v2 0/5] Give more useful error messages when renaming a branch Kaartic Sivaraam
2017-11-02  6:54 ` [RFC PATCH v3 0/4] give more useful error messages while renaming branch Kaartic Sivaraam

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171102065242.25299-1-kaartic.sivaraam@gmail.com \
    --to=kaartic.sivaraam@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).