Re: [PATCH 3/3] execv_dashed_external: wait for child on signal death

2017-01-06 Thread Jeff King
On Sat, Jan 07, 2017 at 08:28:22AM +0100, Johannes Sixt wrote: > > But when you have a dashed external (or an alias pointing to > > a builtin, which will re-exec git for the builtin), there's > > an extra process in the mix. For instance, running: > > > > git -c alias.l=log log > > This

Re: [PATCH 3/3] execv_dashed_external: wait for child on signal death

2017-01-06 Thread Johannes Sixt
Am 07.01.2017 um 02:22 schrieb Jeff King: When you hit ^C to interrupt a git command going to a pager, this usually leaves the pager running. But when a dashed external is in use, the pager ends up in a funny state and quits (but only after eating one more character from the terminal!). This

Re: [ANNOUNCE] git-test: run automated tests against a range of Git commits

2017-01-06 Thread Jeff King
On Fri, Jan 06, 2017 at 04:52:16PM +0100, Michael Haggerty wrote: > I just released `git test`, a script for running automated > tests across a range of Git commits and keeping track of the results in > git notes: > > https://github.com/mhagger/git-test > > This is a script that

Re: [PATCH v2 4/4] mergetool: fix running in subdir when rerere enabled

2017-01-06 Thread Richard Hansen
On 2017-01-06 04:42, Johannes Sixt wrote: Am 06.01.2017 um 02:09 schrieb Richard Hansen: If rerere is enabled and no pathnames are given, run cd_to_toplevel before running 'git diff --name-only' so that 'git diff --name-only' sees the pathnames emitted by 'git rerere remaining'. Also run

Re: [PATCH v2 2/4] t7610: make tests more independent and debuggable

2017-01-06 Thread Richard Hansen
On 2017-01-05 20:31, Stefan Beller wrote: On Thu, Jan 5, 2017 at 5:09 PM, Richard Hansen wrote: Reduce how much a test can interfere other tests: A bullet point list as an unordered list often indicates that you're doing multiple things at once, possibly unrelated, so

Re: [PATCH 4/5] unpack-trees: factor file removal out of check_updates

2017-01-06 Thread Jeff King
On Fri, Jan 06, 2017 at 01:03:29PM -0800, Stefan Beller wrote: > +static int remove_workingtree_files(struct unpack_trees_options *o, > + struct progress *progress) > +{ > + int i; > + unsigned cnt = 0; > + struct index_state *index = >result; > + > +

Re: [PATCH] branch_get_push: do not segfault when HEAD is detached

2017-01-06 Thread Jeff King
On Fri, Jan 06, 2017 at 08:19:53PM -0500, Kyle Meyer wrote: > > The other option is just "git checkout --detach", which is also used in > > the test suite. I tend to prefer it because it's a little more obvious > > to a reader. > > True, that does seem clearer. Seems I should've waited a bit

[PATCH 3/3] execv_dashed_external: wait for child on signal death

2017-01-06 Thread Jeff King
When you hit ^C to interrupt a git command going to a pager, this usually leaves the pager running. But when a dashed external is in use, the pager ends up in a funny state and quits (but only after eating one more character from the terminal!). This fixes it. Explaining the reason will require a

Re: [PATCH] branch_get_push: do not segfault when HEAD is detached

2017-01-06 Thread Kyle Meyer
Jeff King writes: > On Fri, Jan 06, 2017 at 08:09:32PM -0500, Kyle Meyer wrote: > >> > $ git grep -c HEAD^{} junio/pu -- t/ >> > junio/pu:t/t3200-branch.sh:3 >> > >> > Maybe use HEAD^0 just for consistency? >> >> Yes, thanks for pointing that out. > > The other option is just "git

[PATCH 2/3] execv_dashed_external: stop exiting with negative code

2017-01-06 Thread Jeff King
When we try to exec a git sub-command, we pass along the status code from run_command(). But that may return -1 if we ran into an error with pipe() or execve(). This tends to work (and end up as 255 due to twos-complement wraparound and truncation), but in general it's probably a good idea to

[PATCH 1/3] execv_dashed_external: use child_process struct

2017-01-06 Thread Jeff King
When we run a dashed external, we use the one-liner run_command_v_opt() to do so. Let's switch to using a child_process struct, which has two advantages: 1. We can drop all of the allocation and cleanup code for building our custom argv array, and just rely on the builtin argv_array

[PATCH 0/3] fix ^C killing pager when running alias

2017-01-06 Thread Jeff King
On Fri, Jan 06, 2017 at 06:20:42PM -0500, Jeff King wrote: > > In general, I think it is wrong to wait for child processes when a signal > > was received. After all, it is the purpose of a (deadly) signal to have the > > process go away. There may be programs that know it better, like less, but >

[PATCH v2] branch_get_push: do not segfault when HEAD is detached

2017-01-06 Thread Kyle Meyer
Move the detached HEAD check from branch_get_push_1() to branch_get_push() to avoid setting branch->push_tracking_ref when branch is NULL. Signed-off-by: Kyle Meyer --- remote.c | 6 +++--- t/t1514-rev-parse-push.sh | 6 ++ 2 files changed, 9 insertions(+),

Re: [PATCH] branch_get_push: do not segfault when HEAD is detached

2017-01-06 Thread Jeff King
On Fri, Jan 06, 2017 at 08:09:32PM -0500, Kyle Meyer wrote: > > $ git grep -c HEAD^{} junio/pu -- t/ > > junio/pu:t/t3200-branch.sh:3 > > > > Maybe use HEAD^0 just for consistency? > > Yes, thanks for pointing that out. The other option is just "git checkout --detach", which is also used in the

Re: [PATCH] branch_get_push: do not segfault when HEAD is detached

2017-01-06 Thread Kyle Meyer
Johannes Schindelin writes: [...] >> +test_expect_success 'resolving @{push} fails with a detached HEAD' ' >> +git checkout HEAD^{} && > > I seem to recall that we prefer HEAD^0 over HEAD^{} and the existing > scripts seem to agree with me: > > $ git grep -c

Re: [PATCH] submodule update --init: displays correct path from submodule

2017-01-06 Thread Stefan Beller
On Fri, Jan 6, 2017 at 4:55 PM, David Turner wrote: > (for the test) > Signed-off-by: David Turner > > TIL: super-prefix! yeah that was introduced recently for prefixes from "outside the repository" e.g. a superproject, its first user is grep

Re: [PATCH] submodule update --init: displays correct path from submodule

2017-01-06 Thread David Turner
(for the test) Signed-off-by: David Turner TIL: super-prefix! On Fri, 2017-01-06 at 16:19 -0800, Stefan Beller wrote: > In the submodule helper we did not correctly handled the display path > for initializing submodules when both the submodule is inside a > subdirectory

[PATCH] submodule update --init: displays correct path from submodule

2017-01-06 Thread Stefan Beller
In the submodule helper we did not correctly handled the display path for initializing submodules when both the submodule is inside a subdirectory as well as the command being invoked from a subdirectory (as viewed from the superproject). This was broken in 3604242f080, which was written at a

Re: Regression: Ctrl-c from the pager in an alias exits it

2017-01-06 Thread Jeff King
On Fri, Jan 06, 2017 at 11:42:25PM +0100, Johannes Sixt wrote: > > So I dunno. Maybe this waiting should be restricted only to certain > > cases like executing git sub-commands. > > If given it some thought. > > In general, I think it is wrong to wait for child processes when a signal > was

Re: Regression: Ctrl-c from the pager in an alias exits it

2017-01-06 Thread Johannes Sixt
Am 06.01.2017 um 20:41 schrieb Jeff King: On Fri, Jan 06, 2017 at 03:39:59PM +0100, Johannes Sixt wrote: diff --git a/run-command.c b/run-command.c index ca905a9e80..db47c429b7 100644 --- a/run-command.c +++ b/run-command.c @@ -29,6 +29,8 @@ static int installed_child_cleanup_handler; static

Git filesystem case-insensitive to case-sensitive system broken

2017-01-06 Thread Steven Robertson
Hello, I was doing development on a linux box on AWS, when we found a code bug that had me switching to running the code on a Mac instead. We discovered that we had accidentally named two files the same when looked at case-insensitively, which made git commands afterwards display the wrong thing.

minor bug: git submodule update --init from a subdir shows wrong path

2017-01-06 Thread David Turner
I believe (from bisection) that this was introduced in the transition to C at 3604242f080. I've attached a repro (against master). At the time the bug was introduced, the output in question went to stdout instead of stderr, so the attached test case will not quite work on the older version. But

Re: Rebasing a branch with merges

2017-01-06 Thread Philip Oakley
From: "Robert Dailey" Here's the scenario: I create a topic branch so one other developer and myself can work on a feature that takes 2 weeks to complete. During that 2 week period, changes are occurring on master that I need in my topic branch. Since I have a

[PATCH 2/5] unpack-trees: remove unneeded continue

2017-01-06 Thread Stefan Beller
The continue is the last statement in the loop, so not needed. This situation arose in 700e66d66 (2010-07-30, unpack-trees: let read-tree -u remove index entries outside sparse area) when statements after the continue were removed. Signed-off-by: Stefan Beller ---

[PATCH 3/5] unpack-trees: factor progress setup out of check_updates

2017-01-06 Thread Stefan Beller
This makes check_updates shorter and easier to understand. Signed-off-by: Stefan Beller --- unpack-trees.c | 32 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/unpack-trees.c b/unpack-trees.c index f16ef14294..971d091fd0

[PATCH 4/5] unpack-trees: factor file removal out of check_updates

2017-01-06 Thread Stefan Beller
This makes check_updates shorter and easier to understand. Signed-off-by: Stefan Beller --- unpack-trees.c | 29 + 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/unpack-trees.c b/unpack-trees.c index 971d091fd0..b954ec1233 100644

[PATCH 5/5] unpack-trees: factor working tree update out of check_updates

2017-01-06 Thread Stefan Beller
This makes check_updates shorter and easier to understand. Signed-off-by: Stefan Beller --- unpack-trees.c | 40 ++-- 1 file changed, 26 insertions(+), 14 deletions(-) diff --git a/unpack-trees.c b/unpack-trees.c index

Re: [PATCHv2] unpack-trees: move checkout state into check_updates

2017-01-06 Thread Stefan Beller
On Sat, Dec 31, 2016 at 5:26 PM, Junio C Hamano wrote: >> Signed-off-by: Stefan Beller >> --- > > I'd add René's Reviewed-by: here. done > > I think moving heavier and initialized variables earlier and more > lightweight and ephemeral ones like "i" later

[PATCHv3 1/5] unpack-trees: move checkout state into check_updates

2017-01-06 Thread Stefan Beller
The checkout state was introduced via 16da134b1f9 (read-trees: refactor the unpack_trees() part, 2006-07-30). An attempt to refactor the checkout state was done in b56aa5b268e (unpack-trees: pass checkout state explicitly to check_updates(), 2016-09-13), but we can go even further. The `struct

[PATCH 0/5] refactor unpack-trees

2017-01-06 Thread Stefan Beller
unpack-trees is a central file needed for the understanding of working tree manipulation. To help with the understanding refactor the code to be more readable. The first patch was a standalone patch 8 days ago; now incorporated into this series as a v3, reducing the scope of the checkout state.

Re: git branch --editdescription fatal error

2017-01-06 Thread Jeff King
On Fri, Jan 06, 2017 at 11:43:52AM -0800, Stefan Beller wrote: > >>> When executing "git branch --edit-description" on a branch with > >>> no description set, I get "fatal: could not unset > >>> 'branch..description". It would seem that the unsetting piece > >>> should occur only after

Re: git branch --editdescription fatal error

2017-01-06 Thread Ralf Thielow
2017-01-06 20:43 GMT+01:00 Stefan Beller : > On Fri, Jan 6, 2017 at 11:31 AM, Ralf Thielow wrote: >> 2017-01-06 18:55 GMT+01:00 Stefan Beller : >>> On Fri, Jan 6, 2017 at 9:25 AM, Jake Lambert wrote: Hello,

Re: [PATCH v4 00/23] Delete directories left empty after ref deletion

2017-01-06 Thread Jeff King
On Fri, Jan 06, 2017 at 05:22:20PM +0100, Michael Haggerty wrote: > This is v4 of this patch series. Thanks to Peff, Junio, Jake, and > Philip for their feedback about v3. I believe I have addressed all of > the comments about v1 [1], v2 [2], and v3 [3]. This version looks good to me. -Peff

Re: git branch --editdescription fatal error

2017-01-06 Thread Stefan Beller
On Fri, Jan 6, 2017 at 11:31 AM, Ralf Thielow wrote: > 2017-01-06 18:55 GMT+01:00 Stefan Beller : >> On Fri, Jan 6, 2017 at 9:25 AM, Jake Lambert wrote: >>> Hello, >>> >>> When executing "git branch --edit-description" on a branch

Re: Regression: Ctrl-c from the pager in an alias exits it

2017-01-06 Thread Jeff King
On Fri, Jan 06, 2017 at 03:39:59PM +0100, Johannes Sixt wrote: > > diff --git a/run-command.c b/run-command.c > > index ca905a9e80..db47c429b7 100644 > > --- a/run-command.c > > +++ b/run-command.c > > @@ -29,6 +29,8 @@ static int installed_child_cleanup_handler; > > > > static void

Re: git branch --editdescription fatal error

2017-01-06 Thread Ralf Thielow
2017-01-06 18:55 GMT+01:00 Stefan Beller : > On Fri, Jan 6, 2017 at 9:25 AM, Jake Lambert wrote: >> Hello, >> >> When executing "git branch --edit-description" on a branch with no >> description set, I get "fatal: could not unset >> 'branch..description".

Rebasing a branch with merges

2017-01-06 Thread Robert Dailey
Here's the scenario: I create a topic branch so one other developer and myself can work on a feature that takes 2 weeks to complete. During that 2 week period, changes are occurring on master that I need in my topic branch. Since I have a collaborator on the branch, I opt for merges instead of

Re: git branch --editdescription fatal error

2017-01-06 Thread Stefan Beller
On Fri, Jan 6, 2017 at 9:25 AM, Jake Lambert wrote: > Hello, > > When executing "git branch --edit-description" on a branch with no > description set, I get "fatal: could not unset 'branch..description". > It would seem that the unsetting piece should occur only after checking

git branch --editdescription fatal error

2017-01-06 Thread Jake Lambert
Hello, When executing "git branch --edit-description" on a branch with no description set, I get "fatal: could not unset 'branch..description". It would seem that the unsetting piece should occur only after checking if it was set in the first place. I am not too familiar with the inner

[PATCH v4 15/23] log_ref_write_1(): don't depend on logfile argument

2017-01-06 Thread Michael Haggerty
It's unnecessary to pass a strbuf holding the reflog path up and down the call stack now that it is hardly needed by the callers. Remove the places where log_ref_write_1() uses it, in preparation for making it internal to log_ref_setup(). Signed-off-by: Michael Haggerty ---

[PATCH v4 17/23] log_ref_write_1(): inline function

2017-01-06 Thread Michael Haggerty
Now files_log_ref_write() doesn't do anything beyond call log_ref_write_1(), so inline the latter into the former. Signed-off-by: Michael Haggerty --- refs/files-backend.c | 13 +++-- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git

[PATCH v4 06/23] raceproof_create_file(): new function

2017-01-06 Thread Michael Haggerty
Add a function that tries to create a file and any containing directories in a way that is robust against races with other processes that might be cleaning up empty directories at the same time. The actual file creation is done by a callback function, which, if it fails, should set errno to

[PATCH v4 04/23] safe_create_leading_directories_const(): preserve errno

2017-01-06 Thread Michael Haggerty
Some implementations of free() change errno (even thought they shouldn't): https://sourceware.org/bugzilla/show_bug.cgi?id=17924 So preserve the errno from safe_create_leading_directories() across the call to free(). Signed-off-by: Michael Haggerty --- sha1_file.c | 4

[PATCH v4 16/23] log_ref_setup(): manage the name of the reflog file internally

2017-01-06 Thread Michael Haggerty
Instead of writing the name of the reflog file into a strbuf that is supplied by the caller but not needed there, write it into a local temporary buffer and remove the strbuf parameter entirely. And while we're adjusting the function signature, reorder the arguments to move the input parameters

[PATCH v4 11/23] log_ref_write(): inline function

2017-01-06 Thread Michael Haggerty
This function doesn't do anything beyond call files_log_ref_write(), so replace it with the latter at its call sites. Signed-off-by: Michael Haggerty --- refs/files-backend.c | 24 ++-- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git

[PATCH v4 02/23] refname_is_safe(): correct docstring

2017-01-06 Thread Michael Haggerty
The behavior of refname_is_safe() was changed in e40f355 "refname_is_safe(): insist that the refname already be normalized", 2016-04-27 without a corresponding update to its docstring. The function is in fact stricter than documented, because it now insists that the result of normalizing

[PATCH v4 12/23] log_ref_setup(): separate code for create vs non-create

2017-01-06 Thread Michael Haggerty
The behavior of this function (especially how it handles errors) is quite different depending on whether we are willing to create the reflog vs. whether we are only trying to open an existing reflog. So separate the code paths. This also simplifies the next steps. Signed-off-by: Michael Haggerty

[PATCH v4 14/23] log_ref_setup(): pass the open file descriptor back to the caller

2017-01-06 Thread Michael Haggerty
This function will most often be called by log_ref_write_1(), which wants to append to the reflog file. In that case, it is silly to close the file only for the caller to reopen it immediately. So, in the case that the file was opened, pass the open file descriptor back to the caller.

[PATCH v4 08/23] lock_ref_sha1_basic(): use raceproof_create_file()

2017-01-06 Thread Michael Haggerty
Instead of coding the retry loop inline, use raceproof_create_file() to make lock acquisition safe against directory creation/deletion races. Signed-off-by: Michael Haggerty --- refs/files-backend.c | 35 +-- 1 file changed, 9 insertions(+),

[PATCH v4 07/23] lock_ref_sha1_basic(): inline constant

2017-01-06 Thread Michael Haggerty
`lflags` is set a single time then never changed, so just inline it. Signed-off-by: Michael Haggerty --- refs/files-backend.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/refs/files-backend.c b/refs/files-backend.c index be4ffdc..7d4658a 100644 ---

[PATCH v4 03/23] t5505: use "for-each-ref" to test for the non-existence of references

2017-01-06 Thread Michael Haggerty
Instead of looking on the filesystem inside ".git/refs/remotes/origin", use "git for-each-ref" to check for leftover references under the remote's old name. Signed-off-by: Michael Haggerty --- t/t5505-remote.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[PATCH v4 13/23] log_ref_setup(): improve robustness against races

2017-01-06 Thread Michael Haggerty
Change log_ref_setup() to use raceproof_create_file() to create the new logfile. This makes it more robust against a race against another process that might be trying to clean up empty directories while we are trying to create a new logfile. This also means that it will only call

[PATCH v4 18/23] delete_ref_loose(): derive loose reference path from lock

2017-01-06 Thread Michael Haggerty
It is simpler to derive the path to the file that must be deleted from "lock->ref_name" than from the lock_file object. Signed-off-by: Michael Haggerty --- refs/files-backend.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/refs/files-backend.c

[PATCH v4 10/23] rename_tmp_log(): improve error reporting

2017-01-06 Thread Michael Haggerty
* Don't capitalize error strings * Report true paths of affected files Signed-off-by: Michael Haggerty --- refs/files-backend.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/refs/files-backend.c b/refs/files-backend.c index 3f18a01..49a119c

[PATCH v4 01/23] files_rename_ref(): tidy up whitespace

2017-01-06 Thread Michael Haggerty
Signed-off-by: Michael Haggerty --- refs/files-backend.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/refs/files-backend.c b/refs/files-backend.c index f902393..be4ffdc 100644 --- a/refs/files-backend.c +++ b/refs/files-backend.c @@ -2631,7 +2631,7 @@

[PATCH v4 21/23] try_remove_empty_parents(): don't trash argument contents

2017-01-06 Thread Michael Haggerty
It's bad manners and surprising and therefore error-prone. Signed-off-by: Michael Haggerty --- refs/files-backend.c | 16 +--- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/refs/files-backend.c b/refs/files-backend.c index 92a9d99..88f8c7a

[PATCH v4 20/23] try_remove_empty_parents(): rename parameter "name" -> "refname"

2017-01-06 Thread Michael Haggerty
This is the standard nomenclature. Signed-off-by: Michael Haggerty --- refs/files-backend.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/refs/files-backend.c b/refs/files-backend.c index 9abd7c3..92a9d99 100644 --- a/refs/files-backend.c +++

[PATCH v4 09/23] rename_tmp_log(): use raceproof_create_file()

2017-01-06 Thread Michael Haggerty
Besides shortening the code, this saves an unnecessary call to safe_create_leading_directories_const() in almost all cases. Signed-off-by: Michael Haggerty --- refs/files-backend.c | 73 +--- 1 file changed, 30 insertions(+),

[PATCH v4 05/23] safe_create_leading_directories(): set errno on SCLD_EXISTS

2017-01-06 Thread Michael Haggerty
The exit path for SCLD_EXISTS wasn't setting errno, which some callers use to generate error messages for the user. Fix the problem and document that the function sets errno correctly to help avoid similar regressions in the future. Signed-off-by: Michael Haggerty ---

[PATCH v4 22/23] try_remove_empty_parents(): teach to remove parents of reflogs, too

2017-01-06 Thread Michael Haggerty
Add a new "flags" parameter that tells the function whether to remove empty parent directories of the loose reference file, of the reflog file, or both. The new functionality is not yet used. Signed-off-by: Michael Haggerty --- refs/files-backend.c | 24

[PATCH v4 23/23] files_transaction_commit(): clean up empty directories

2017-01-06 Thread Michael Haggerty
When deleting/pruning references, remove any directories that are made empty by the deletion of loose references or of reflogs. Otherwise such empty directories can survive forever and accumulate over time. (Even 'pack-refs', which is smart enough to remove the parent directories of loose

[PATCH v4 19/23] delete_ref_loose(): inline function

2017-01-06 Thread Michael Haggerty
It was hardly doing anything anymore, and had only one caller. Signed-off-by: Michael Haggerty --- refs/files-backend.c | 25 +++-- 1 file changed, 7 insertions(+), 18 deletions(-) diff --git a/refs/files-backend.c b/refs/files-backend.c index

[PATCH v4 00/23] Delete directories left empty after ref deletion

2017-01-06 Thread Michael Haggerty
This is v4 of this patch series. Thanks to Peff, Junio, Jake, and Philip for their feedback about v3. I believe I have addressed all of the comments about v1 [1], v2 [2], and v3 [3]. Changes since v3: * Insert a new first patch correcting the docstring of `refname_is_safe()`. * In

[ANNOUNCE] git-test: run automated tests against a range of Git commits

2017-01-06 Thread Michael Haggerty
I just released `git test`, a script for running automated tests across a range of Git commits and keeping track of the results in git notes: https://github.com/mhagger/git-test This is a script that I've been using in one form or another for years and I find it really handy [1].

Re: Regression: Ctrl-c from the pager in an alias exits it

2017-01-06 Thread Johannes Sixt
Am 06.01.2017 um 08:32 schrieb Jeff King: On Fri, Jan 06, 2017 at 02:26:02AM -0500, Jeff King wrote: You'll notice that it actually calls wait() on the pager. That's due to a3da882120 (pager: do wait_for_pager on signal death, 2009-01-22), which IIRC was addressing a very similar problem. We

Re: Encoding issue in git gui

2017-01-06 Thread Johannes Schindelin
Hi, On Fri, 6 Jan 2017, Anton Tsyganenko wrote: > When I run a tool from tools menu in the standard git gui, the output > seems to have wrong encoding. For example, add a tool called "encoding > test" that runs command "echo Проверка", then run it. In the output > window "Ð?Ñ?овеÑ?ка" in

Re: Squashing commits with git rebase -i may miscount commits in commit message

2017-01-06 Thread Johannes Schindelin
Hi, On Fri, 6 Jan 2017, Brandon Tolsch wrote: > git --version: 2.11.0 > > When using git rebase -i to squash a series of commits that includes > more than 10 commits, the generated commit message you are given to > edit counts the old messages incorrectly. It will say the total > number of

Re: [PATCH] branch_get_push: do not segfault when HEAD is detached

2017-01-06 Thread Johannes Schindelin
Hi Kyle, On Thu, 5 Jan 2017, Kyle Meyer wrote: > Move the detached HEAD check from branch_get_push_1() to > branch_get_push() to avoid setting branch->push_tracking_ref when > branch is NULL. > > Signed-off-by: Kyle Meyer Good point. > diff --git a/remote.c b/remote.c >

Re: Regression: Ctrl-c from the pager in an alias exits it

2017-01-06 Thread Trygve Aaberge
On Fri, Jan 06, 2017 at 02:32:25 -0500, Jeff King wrote: > And here's a patch to do that. It seems to work. Nice, thanks! This works very well for me too. -- Trygve Aaberge

Re: git branch -D doesn't work with deleted worktree

2017-01-06 Thread Duy Nguyen
On Thu, Jan 5, 2017 at 9:02 PM, Stefan Beller wrote: > On Thu, Jan 5, 2017 at 2:06 AM, Roland Illig wrote: >> Git 2.11.0 gives a wrong error message after the following commands: >> >> $ git init >> $ echo hello >file >> $ git add file >> $ git commit -m

Re: [PATCH v2 4/4] mergetool: fix running in subdir when rerere enabled

2017-01-06 Thread Johannes Sixt
Am 06.01.2017 um 02:09 schrieb Richard Hansen: If rerere is enabled and no pathnames are given, run cd_to_toplevel before running 'git diff --name-only' so that 'git diff --name-only' sees the pathnames emitted by 'git rerere remaining'. Also run cd_to_toplevel before running 'git rerere

Encoding issue in git gui

2017-01-06 Thread Anton Tsyganenko
When I run a tool from tools menu in the standard git gui, the output seems to have wrong encoding. For example, add a tool called "encoding test" that runs command "echo Проверка", then run it. In the output window "Проверка" in printed instead of "Проверка". signature.asc Description:

Squashing commits with git rebase -i may miscount commits in commit message

2017-01-06 Thread Brandon Tolsch
git --version: 2.11.0 When using git rebase -i to squash a series of commits that includes more than 10 commits, the generated commit message you are given to edit counts the old messages incorrectly. It will say the total number of commits is (actual % 10) (if they were 0-based) and it will