Re: [PATCH 2/2] docs/diffcore: unquote "Complete Rewrites" in headers

2017-02-28 Thread Jeff King
On Tue, Feb 28, 2017 at 09:59:05AM +0100, Patrick Steinhardt wrote: > The gitdiffcore documentation quotes the term "Complete Rewrites" in > headers for no real gain. This would make sense if the term could be > easily confused if not properly grouped together. But actually, the term > is quite ob

[PATCH 8/8] checkout: restrict @-expansions when finding branch

2017-02-28 Thread Jeff King
When we parse "git checkout $NAME", we try to interpret $NAME as a local branch-name. If it is, then we point HEAD to that branch. Otherwise, we detach the HEAD at whatever commit $NAME points to. We do the interpretation by calling strbuf_branchname(), and then blindly sticking "refs/heads/" on t

[PATCH 3/8] strbuf_branchname: add docstring

2017-02-28 Thread Jeff King
This function and its companion, strbuf_check_branch_ref(), did not have their purpose or semantics explained. Let's do so. Signed-off-by: Jeff King --- strbuf.h | 15 +++ 1 file changed, 15 insertions(+) diff --git a/strbuf.h b/strbuf.h index 47df0500d..6b51b2604 100644 --- a/strbu

[PATCH 4/8] interpret_branch_name: allow callers to restrict expansions

2017-02-28 Thread Jeff King
The original purpose of interpret_branch_name() was to be used by get_sha1() in resolving refs. As such, some of its expansions may point to refs outside of the local "refs/heads" namespace. Over time, the function has been picked up by other callers who want to use the ref-expansion to give the u

[PATCH 1/8] interpret_branch_name: move docstring to header file

2017-02-28 Thread Jeff King
We generally put docstrings with function declarations, because it's the callers who need to know how the function works. Let's do so for interpret_branch_name(). Signed-off-by: Jeff King --- cache.h | 21 + sha1_name.c | 21 - 2 files changed, 21 inse

Re: [PATCH 0/6] Use time_t

2017-02-28 Thread Johannes Schindelin
Hi Junio, On Mon, 27 Feb 2017, Junio C Hamano wrote: > Johannes Schindelin writes: > > > One notable fallout of this patch series is that on 64-bit Linux (and > > other platforms where `unsigned long` is 64-bit), we now limit the > > range of dates to LONG_MAX (i.e. the *signed* maximum value).

Re: [PATCH 2/6] Specify explicitly where we parse timestamps

2017-02-28 Thread Johannes Schindelin
Hi Junio, On Mon, 27 Feb 2017, Junio C Hamano wrote: > Junio C Hamano writes: > > >> - unsigned long number = strtoul(date, &end, 10); > >> + time_t number = parse_timestamp(date, &end, 10); > > > > This hunk does not belong to this step. Everybody else in this step > > obviously I meant "t

Re: [PATCH 2/2] apply: handle assertion failure gracefully

2017-02-28 Thread René Scharfe
Am 27.02.2017 um 23:33 schrieb Junio C Hamano: > René Scharfe writes: > >> Am 27.02.2017 um 21:04 schrieb Junio C Hamano: >>> René Scharfe writes: >>> > diff --git a/apply.c b/apply.c > index cbf7cc7f2..9219d2737 100644 > --- a/apply.c > +++ b/apply.c > @@ -3652,7 +3652,6 @@

Re: [PATCH] http: add an "auto" mode for http.emptyauth

2017-02-28 Thread Johannes Schindelin
Hi, On Mon, 27 Feb 2017, Junio C Hamano wrote: > Jeff King writes: > > > The auto mode may incur an extra round-trip over setting > > http.emptyauth=true, because part of the emptyauth hack is to feed > > this blank password to curl even before we've made a single request. > > IOW, people who

Re: Bug: "git worktree add" Unable to checkout a branch with no local ref

2017-02-28 Thread Duy Nguyen
On Mon, Feb 27, 2017 at 9:22 PM, Alexander Grigoriev wrote: > git version 2.10.2.windows.1: > If a remote branch has never been checked out locally (its ref only exists > in remotes// directory), "git worktree add" command is unable to > check it out by its normal short name (not prefixed by remot

[PATCH 2/2] docs/diffcore: unquote "Complete Rewrites" in headers

2017-02-28 Thread Patrick Steinhardt
The gitdiffcore documentation quotes the term "Complete Rewrites" in headers for no real gain. This would make sense if the term could be easily confused if not properly grouped together. But actually, the term is quite obvious and thus does not really need any quoting, especially regarding that it

[PATCH 1/2] docs/diffcore: fix grammar in diffcore-rename header

2017-02-28 Thread Patrick Steinhardt
Signed-off-by: Patrick Steinhardt --- Documentation/gitdiffcore.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/gitdiffcore.txt b/Documentation/gitdiffcore.txt index 46bc6d077..cf009a187 100644 --- a/Documentation/gitdiffcore.txt +++ b/Documentation/gitdiffco

Re: [BUG] branch renamed to 'HEAD'

2017-02-28 Thread Jacob Keller
On Mon, Feb 27, 2017 at 4:53 PM, Jeff King wrote: > On Mon, Feb 27, 2017 at 04:33:36PM -0800, Junio C Hamano wrote: > >> A flag to affect the behaviour (as opposed to &flag as a secondary >> return value, like Peff's patch does) can be made to work. Perhaps >> a flag that says "keep the input as

<    1   2