[PATCH 1/2] submodule update: add `--init-default-path` switch

2016-05-23 Thread Stefan Beller
The new switch `--init-default-path` initializes the submodules which are configured in `submodule.defaultUpdatePath` instead of those given as command line arguments before updating. In the first implementation this is made incompatible with further command line arguments as it is unclear what the

[PATCH 2/2] clone: add --init-submodule= switch

2016-05-23 Thread Stefan Beller
The new switch passes the pathspec to `git submodule update --init` which is called after the actual clone is done. Additionally this configures the submodule.defaultUpdatePath to be the given pathspec, such that any future invocation of `git submodule update --init-default-paths` will keep up wit

Re: [PATCH v7 1/9] connect: document why we sometimes call get_port after get_host_and_port

2016-05-23 Thread Torsten Bögershausen
On 05/23/2016 11:30 PM, Junio C Hamano wrote: Torsten Bögershausen writes: get_host_and_port(&ssh_host, &port); +/* get_host_and_port may not return a port even when +* there is one: In the [host:port]:path case, +

Re: Odd Difference Between Windows Git and Standard Git

2016-05-23 Thread Torsten Bögershausen
On 05/23/2016 08:52 PM, Junio C Hamano wrote: Johannes Schindelin writes: Of course, if you are doing network mount between systems with and without filemode support, the result would depend on where you did the "git init", so that would not help. Which means that other probed things like sym

Re: [PATCH] builtin/commit.c: memoize git-path for COMMIT_EDITMSG

2016-05-23 Thread Pranit Bauva
Hey Junio, On Tue, May 24, 2016 at 12:46 AM, Junio C Hamano wrote: > Pranit Bauva writes: > >> This is a follow up commit for f932729c (memoize common git-path >> "constant" files, 10-Aug-2015). >> >> It serves two purposes: >> 1. It reduces the number of calls to git_path() . >> >> 2. It se

Re: Git reset --hard with staged changes

2016-05-23 Thread Christian Couder
On Mon, May 23, 2016 at 11:16 PM, Junio C Hamano wrote: > Christian Couder writes: > >>> This should be clarified to define what a tracked file is. I propose >>> appending: >>> >>> A file is considered tracked if it exists in a prior commit or in the >>> staging area. Note that a newly a

Re: [PATCH] builtin/commit.c: memoize git-path for COMMIT_EDITMSG

2016-05-23 Thread Pranit Bauva
Hey Junio On Tue, May 24, 2016 at 11:24 AM, Pranit Bauva wrote: >> And you do not free its return value. > This is one of the thing that bugging me with GIT_PATH_FUNC. Wouldn't > not freeing the memory lead to memory leaks? Slight misunderstanding. I got it now. Thanks! > Regards, > Pranit Bauv

<    1   2