Re: [Alt. PATCH] ls-remote: deprecate -h as short for --heads

2017-10-21 Thread Jeff King
On Fri, Oct 20, 2017 at 02:35:36PM +0900, Junio C Hamano wrote: > I may be biased as every time I think about this one, the first one > that comes to my mind is how "grep -h" (not "git grep", but GNU > grep) behaves. Yes, "-h" means something else, but by itself, the > command does not make sense

Re: [PATCH 0/3] a small branch API clean-up

2017-10-21 Thread Junio C Hamano
Kaartic Sivaraam writes: > On Fri, 2017-10-13 at 14:11 +0900, Junio C Hamano wrote: >> This started as a little clean-up for a NEEDSWORK comment in >> branch.h, but it ended up adding a rather useful safety feature. >> > > Part of this series seems to duplicate the work done in part of my > seri

Re: [PATCH 3/3] branch: forbid refs/heads/HEAD

2017-10-21 Thread Junio C Hamano
Kaartic Sivaraam writes: >> The only difference is improved tests where we use show-ref to make >> sure refs/heads/HEAD does not exist when it shouldn't, exercise >> update-ref to create and delete refs/heads/HEAD, and also make sure >> it can be deleted with "git branch -d". > > In which case yo

Re: [PATCH 2/3] branch: split validate_new_branchname() into two

2017-10-21 Thread Junio C Hamano
Kaartic Sivaraam writes: >> +/* >> + * Check if a branch 'name' can be created as a new branch; die otherwise. >> + * 'force' can be used when it is OK for the named branch already exists. >> + * Return 1 if the named branch already exists; return 0 otherwise. >> + * Fill ref with the full refnam

Re: [Alt. PATCH] ls-remote: deprecate -h as short for --heads

2017-10-21 Thread René Scharfe
Am 20.10.2017 um 07:35 schrieb Junio C Hamano: > Jeff King writes: > >> It seems weird and inconsistent to me that the meaning of "-h" >> depends on the position and presence of other unrelated options. The position is relevant with parse-options for *each* flag for a different reason as well:

Re: [PATCH 4/4] worktree: handle broken symrefs in find_shared_symref()

2017-10-21 Thread Eric Sunshine
On Thu, Oct 19, 2017 at 1:49 PM, Jeff King wrote: > The refs_resolve_ref_unsafe() function may return NULL even > with a REF_ISSYMREF flag if a symref points to a broken ref. > As a result, it's possible for find_shared_symref() to > segfault when it passes NULL to strcmp(). > [...] > We can fix t

Re: [Alt. PATCH] ls-remote: deprecate -h as short for --heads

2017-10-21 Thread Junio C Hamano
René Scharfe writes: > FWIW, I use "-?" for that everywhere. I have yet to find a command or > environment where it does something dangerous. Yeah, it would have made the world a better place if we made that choice back in 2008. If we start a transition to make it so right now, we might be abl

Re: [RFE] Add minimal universal release management capabilities to GIT

2017-10-21 Thread nicolas . mailhot
- Mail original - De: "Stefan Beller" >> Unfortunately Git is so good more and more developers start to procrastinate >> on any activity that happens outside of GIT, >> starting with cutting releases. The meme "one only needs a git commit hash" >> is going strong, even infecting insti

Re: [PATCH 4/4] worktree: handle broken symrefs in find_shared_symref()

2017-10-21 Thread Jeff King
On Sat, Oct 21, 2017 at 06:49:15AM -0400, Eric Sunshine wrote: > On Thu, Oct 19, 2017 at 1:49 PM, Jeff King wrote: > > The refs_resolve_ref_unsafe() function may return NULL even > > with a REF_ISSYMREF flag if a symref points to a broken ref. > > As a result, it's possible for find_shared_symref

RE: [RFE] Add minimal universal release management capabilities to GIT

2017-10-21 Thread Randall S. Becker
-Original Message- From: git-ow...@vger.kernel.org [mailto:git-ow...@vger.kernel.org] On Behalf of.mail...@laposte.net On October 20, 2017 6:41 AM, nicolas wrote: To: git@vger.kernel.org Subject: [RFE] Add minimal universal release management capabilities to GIT >Git is a wonderful tool,

Re: [PATCH 4/4] worktree: handle broken symrefs in find_shared_symref()

2017-10-21 Thread Junio C Hamano
Jeff King writes: > On Sat, Oct 21, 2017 at 06:49:15AM -0400, Eric Sunshine wrote: > >> On Thu, Oct 19, 2017 at 1:49 PM, Jeff King wrote: >> > The refs_resolve_ref_unsafe() function may return NULL even >> > with a REF_ISSYMREF flag if a symref points to a broken ref. >> > As a result, it's poss

Re: [PATCH v4] commit: check result of resolve_ref_unsafe

2017-10-21 Thread Junio C Hamano
Jeff King writes: >> Hello, >> I think this way is better for user experience: >> * git doesn't crash; >> * warning is shown; >> * commit has been successfully created then it's safe to show a summary >> message >> with already known information and without resolved HEAD. > > I'm on the fence be

Re: [PATCH 1/6] t0021/rot13-filter: refactor packet reading functions

2017-10-21 Thread Junio C Hamano
Christian Couder writes: > To make it possible in a following commit to move packet > reading and writing functions into a Packet.pm module, > let's refactor these functions, so they don't handle > printing debug output and exiting. > > Signed-off-by: Christian Couder > --- > t/t0021/rot13-filt

Re: [PATCH 4/6] t0021/rot13-filter: add packet_initialize()

2017-10-21 Thread Junio C Hamano
Christian Couder writes: > +sub packet_initialize { > + my ($name, $version) = @_; > + > + ( packet_txt_read() eq ( 0, $name . "-client" ) ) || die "bad > initialize"; > + ( packet_txt_read() eq ( 0, "version=" . $version ) ) || die "bad > version"; > + ( packet_bin_read

Re: [PATCH 5/6] t0021/rot13-filter: add capability functions

2017-10-21 Thread Junio C Hamano
Christian Couder writes: > Add functions to help read and write capabilities. > These functions will be reused in following patches. One more thing that is more noteworthy (read: do not forget to describe it in the proposed log message) is that the original used to require capabilities to come i

Re: [PATCH 0/6] Create Git/Packet.pm

2017-10-21 Thread Junio C Hamano
Christian Couder writes: > Goal > Totally offtopic, but is it only me who finds these "section headers" in cover letters from some people irritating and/or jarring? It perhaps is because I view the cover letter more as a part of conversation, not a presentation. And when you walk up to so

Re: [PATCH v3 4/4] status: test --ignored=matching

2017-10-21 Thread Junio C Hamano
Jameson Miller writes: > Add tests around status reporting ignord files that match an exclude > pattern for both --untracked-files=normal and --untracked-files=all. > > Signed-off-by: Jameson Miller > --- > t/t7519-ignored-mode.sh | 183 > > 1 f

Re: [PATCH 0/3] a small branch API clean-up

2017-10-21 Thread Kaartic Sivaraam
On Sat, 2017-10-21 at 17:52 +0900, Junio C Hamano wrote: > > Sorry, but I am not sure what you are asking. > > I was looking at the code, noticed NEEDSWORK comment and worked on > cleaning things up---you seem to feel that I need a reason, or > perhaps even your permission, when I try improving

Re: [PATCH 3/3] branch: forbid refs/heads/HEAD

2017-10-21 Thread Kaartic Sivaraam
On Sat, 2017-10-21 at 17:57 +0900, Junio C Hamano wrote: > ... The code may already > handle it, or there may need even more code to support the rename; I > didn't check. > As far as I could see there the code does seem to already handle the rename. This part of builtin/branch.c is what seems to