Re: Alternative to manual editing with git add --patch

2015-10-15 Thread Johannes Schindelin
Hi Sven & Junio, On Thu, 15 Oct 2015, Sven Helmberger wrote: > Am 14.10.2015 um 19:50 schrieb Junio C Hamano: > > Sven Helmberger writes: > > > > As a quick-and-dirty change, you could invent a new variant of > > 's'plit that breaks a N-line hunk into N hunks with

Re: [PATCH v3 1/3] Add Travis CI support

2015-10-15 Thread Lars Schneider
On 15 Oct 2015, at 10:12, Matthieu Moy wrote: > Lars Schneider writes: > >> I was reluctant to this because I feared problems. Especially while >> running tests in parallel. > > Isn't the point of using a CI tool to notice problems? ;-)

[PATCH] Use the alternates of the source repository for dissociating clone

2015-10-15 Thread Alexander Riesen
The "--dissociate" option required reference repositories, which sometimes demanded a look into the objects/info/alternates by the user. As this is something which can be figured out automatically, do it in the clone unless there is no other reference repositories. Signed-off-by: Alex Riesen

[PATCH 0/3] stripspace: Implement and use --count-lines option

2015-10-15 Thread Tobias Klauser
This patch set implements some of the project ideas around git stripspace suggested on [1]. [1] https://git.wiki.kernel.org/index.php/SmallProjectsIdeas The first patch moves the stripspace() function to the strbuf module (adding a prefix and changing all users accordingly, also a wrapper is

[PATCH 1/3] strbuf: make stripspace() part of strbuf

2015-10-15 Thread Tobias Klauser
Rename stripspace() to strbuf_stripspace() and move it to the strbuf module as suggested in [1]. Also switch all current users of stripspace() to the new function name and keep a temporary wrapper inline function for topic branches still using stripspace(). [1]

[PATCH 2/3] stripspace: Implement --count-lines option

2015-10-15 Thread Tobias Klauser
As suggested in the small project ideas [1], implement a --count-lines options for git stripspace to be able to omit calling git stripspace --strip-comments < infile | wc -l e.g. in git-rebase--interactive.sh. The above command can now be replaced by: git stripspace --strip-comments

[PATCH 3/3] git rebase -i: Use newly added --count-lines option for stripspace

2015-10-15 Thread Tobias Klauser
Use the newly added --count-lines option for 'git stripspace' to count lines instead of piping the entire output to 'wc -l'. Signed-off-by: Tobias Klauser --- git-rebase--interactive.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git

about rev-parse's quietness

2015-10-15 Thread stefan.naewe
Hello there. I'm using a bash function that does a combination of 'ls -l', 'git status', and 'git branch' to give me a quick overview of where I stand in the current git repo. I planned to extend that function to also list the to-be-pushed commits in the current branch, something like $ git

Re: [PATCH v3 1/3] Add Travis CI support

2015-10-15 Thread Johannes Schindelin
Hi, On Thu, 15 Oct 2015, Matthieu Moy wrote: > Lars Schneider writes: > > > I was reluctant to this because I feared problems. Especially while > > running tests in parallel. > > Isn't the point of using a CI tool to notice problems? ;-) > > More seriously, running

Re: [PATCH] Falis on commit --amend when already pushed

2015-10-15 Thread Matthieu Moy
Tomohiro Koana writes: > Thank you for the reply. Please, do not top-post on this list. Look at how other people write emails and try to mimick them. > I've taken a look at the list for small project ideas and our idea was > on the list, > which goes to show that what we

Re: [PATCH v3 1/3] Add Travis CI support

2015-10-15 Thread Jean-Noël Avila
Le 15/10/2015 00:52, Lars Schneider a écrit : > On 12 Oct 2015, at 22:20, Matthieu Moy wrote: > >> larsxschnei...@gmail.com writes: >> >>> --- /dev/null >>> +++ b/.travis.yml >>> @@ -0,0 +1,46 @@ >>> +language: c >>> + >>> +os: >>> + - linux >>> + - osx >>> + >>>

Re: How to rebase when some commit hashes are in some commit messages

2015-10-15 Thread Francois-Xavier Le Bail
On 13/10/2015 19:07, Jacob Keller wrote: > b) you are rebasing a commit which references another commit in the same > rebase > > I see no valid reason to reference a sha1 in this case. If you're > referencing as a "fixes", then you are being silly since you can just > squash the fix into the

Re: How to rebase when some commit hashes are in some commit messages

2015-10-15 Thread Johannes Schindelin
Hi Francois-Xavier, On Thu, 15 Oct 2015, Francois-Xavier Le Bail wrote: > On 13/10/2015 15:29, Philip Oakley wrote: > > > Thus the only sha1 numbers that could be used are those that are > > within the (possibly implied) instruction sheet (which will list the > > current sha1s that will be

Re: [PATCH v3 1/3] Add Travis CI support

2015-10-15 Thread Matthieu Moy
Lars Schneider writes: > I would like to get rid of the "sudo" calls, too. Unfortunately I > wasn't able to achieve this so far because these packages are not > white listed on Travis CI (see Jean-Noël answer in this thread). I think this would deserve a mention in the

Re: [PATCH] Falis on commit --amend when already pushed

2015-10-15 Thread Tomohiro Koana
Thank you for the reply. I've taken a look at the list for small project ideas and our idea was on the list, which goes to show that what we are working on is reasonable enough :D We'll read the documentations for git contributions thoroughly and send a patch again. As for the test, we're not

Re: [PATCH] Falis on commit --amend when already pushed

2015-10-15 Thread Matthieu Moy
Tomohiro Koana writes: > Hello all, > > I'm a third year student at the University of Tokyo and, in our > "Diving into open-source software" class, my friends and I decided to > work with git. Our final, hopefully, is contributing to git. Welcome on board :-). I give the

Re: How to rebase when some commit hashes are in some commit messages

2015-10-15 Thread Francois-Xavier Le Bail
On 13/10/2015 15:29, Philip Oakley wrote: > From: "Konstantin Khomoutov" >> On Tue, 13 Oct 2015 10:50:40 +0200 >> Francois-Xavier Le Bail wrote: >> >>> >> For example, if I rebase the following commits, I would want that >>> >> if the commit

[BUG] t7063-status-untracked-cache flaky?

2015-10-15 Thread Lars Schneider
Hi, I noticed that "t7063-status-untracked-cache.sh" occasionally fails with "not ok 24 - test sparse status with untracked cache". E.g. on OS X compiled with gcc: https://travis-ci.org/larsxschneider/git/jobs/85432514 E.g. on Linux compiled with gcc:

Re: [PATCH v3 1/3] Add Travis CI support

2015-10-15 Thread Lars Schneider
On 13 Oct 2015, at 12:32, Jean-Noël Avila wrote: > Le 11/10/2015 19:55, larsxschnei...@gmail.com a écrit : >> + >> +before_script: make >> + >> +script: make --quiet test > > Travis can be used in container mode but that would need getting rid of > "sudo" command and only

Re: [PATCH v3 1/3] Add Travis CI support

2015-10-15 Thread Matthieu Moy
Lars Schneider writes: > I was reluctant to this because I feared problems. Especially while > running tests in parallel. Isn't the point of using a CI tool to notice problems? ;-) More seriously, running tests in parallel shouldn't be a problem since each test runs

Re: How to rebase when some commit hashes are in some commit messages

2015-10-15 Thread Francois-Xavier Le Bail
On 13/10/2015 20:00, Mike Rappazzo wrote: > It seems reasonable that this could be added as a feature of > interactive rebase. The todo list could be automatically adjusted to > "reword" for those commits which are referring to other commits within > the same rebase. As each commit is

Re: Alternative to manual editing with git add --patch

2015-10-15 Thread Johannes Schindelin
Hi Sven, On Thu, 15 Oct 2015, Sven Helmberger wrote: > Am 15.10.2015 um 12:11 schrieb Johannes Schindelin: > > > > This is all technically sound. From a usability perspective I would wish > > more for a way to exclude or filter the lines by a pattern. > > Why not do both? Because sometimes

Re: Alternative to manual editing with git add --patch

2015-10-15 Thread Sven Helmberger
Am 15.10.2015 um 17:06 schrieb Johannes Schindelin: > > Because sometimes more is less. If users are overwhelmed with many, many > options, they are *less* likely to benefit from the few that are easy to > use because they won't find out about them. > Going from "I want to split at 'x'" to

Re: Alternative to manual editing with git add --patch

2015-10-15 Thread Sven Helmberger
Am 15.10.2015 um 12:11 schrieb Johannes Schindelin: > > This is all technically sound. From a usability perspective I would wish > more for a way to exclude or filter the lines by a pattern. Why not do both? The only thing that is unfortunate is that the "/" already is a command. Which would

Re: [PATCH] Use the alternates of the source repository for dissociating clone

2015-10-15 Thread Johannes Schindelin
Hi Alex, On Thu, 15 Oct 2015, Alexander Riesen wrote: > The "--dissociate" option required reference repositories, which sometimes > demanded a look into the objects/info/alternates by the user. As this > is something which can be figured out automatically, do it in the > clone unless there is

[PATCH] Allow "clone --dissociate" to dissociate from alternates

2015-10-15 Thread Alexander Riesen
The option requiring the explicit reference repositories is a bit of overkill: the alternates in the original repository *are* reference repositories and would be dissociated from should one pass any reference repository (even an unrelated one). Signed-off-by: Alex Riesen

Re: [PATCH v3] merge: fix cache_entry use-after-free

2015-10-15 Thread René Scharfe
Am 15.10.2015 um 21:02 schrieb David Turner: On Thu, 2015-10-15 at 05:35 +0200, René Scharfe wrote: Am 15.10.2015 um 00:07 schrieb David Turner: From: Keith McGuigan During merges, we would previously free entries that we no longer need in the destination index. But

Make "git checkout" automatically update submodules?

2015-10-15 Thread Kannan Goundan
Git submodules seem to be a great fit for one of our repos. The biggest pain point is that it's too easy to forget to update submodules. 1. I often forget since most repos don't need it. 2. Infrequent users of our repo almost never know to update submodules and end up coming to us with strange

Re: Make "git checkout" automatically update submodules?

2015-10-15 Thread Junio C Hamano
Kannan Goundan writes: > Git submodules seem to be a great fit for one of our repos. The biggest > pain point is that it's too easy to forget to update submodules. > ... > In the common case of the submodule content having no local edits, it would > be nice if "git checkout"

[PATCH 04/12] git submodule update: Announce outcome of submodule operation to stderr

2015-10-15 Thread Stefan Beller
Signed-off-by: Stefan Beller --- git-submodule.sh| 2 +- t/t7406-submodule-update.sh | 12 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/git-submodule.sh b/git-submodule.sh index 56a0524..bb8b2c7 100755 --- a/git-submodule.sh +++

[PATCH 06/12] git submodule update: Handle unmerged submodules in C

2015-10-15 Thread Stefan Beller
Signed-off-by: Stefan Beller --- builtin/submodule--helper.c | 15 +++ git-submodule.sh| 6 +- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/builtin/submodule--helper.c b/builtin/submodule--helper.c index 47dc9cb..f81f37a 100644

[PATCH 08/12] git submodule update: check for "none" in C

2015-10-15 Thread Stefan Beller
Signed-off-by: Stefan Beller --- builtin/submodule--helper.c | 38 -- git-submodule.sh| 8 +--- 2 files changed, 37 insertions(+), 9 deletions(-) diff --git a/builtin/submodule--helper.c b/builtin/submodule--helper.c index

[PATCH 05/12] git submodule update: Use its own list implementation.

2015-10-15 Thread Stefan Beller
Discussions turned out that we cannot parallelize the whole loop below `git submodule--helper list` in `git submodule update`, because some changes should be done only one at a time, such as messing up a submodule and leave it up to the user to cleanup the conflicted rebase or merge. The

[PATCH 09/12] git submodule update: Check url in C

2015-10-15 Thread Stefan Beller
Signed-off-by: Stefan Beller --- builtin/submodule--helper.c | 21 + git-submodule.sh| 10 -- 2 files changed, 21 insertions(+), 10 deletions(-) diff --git a/builtin/submodule--helper.c b/builtin/submodule--helper.c index

[PATCH 11/12] submodule--helper: Do not emit submodules to process directly.

2015-10-15 Thread Stefan Beller
This will allow us to refactor the loop to use the parallel process API. Signed-off-by: Stefan Beller --- builtin/submodule--helper.c | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/builtin/submodule--helper.c b/builtin/submodule--helper.c

[PATCH 02/12] git submodule update: Announce uninitialized modules on stderr

2015-10-15 Thread Stefan Beller
Signed-off-by: Stefan Beller --- git-submodule.sh | 2 +- t/t7400-submodule-basic.sh | 12 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/git-submodule.sh b/git-submodule.sh index 578ec48..eea27f8 100755 --- a/git-submodule.sh +++

[PATCH 01/12] git submodule update: Announce skipping submodules on stderr

2015-10-15 Thread Stefan Beller
Signed-off-by: Stefan Beller --- git-submodule.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git-submodule.sh b/git-submodule.sh index 8b0eb9a..578ec48 100755 --- a/git-submodule.sh +++ b/git-submodule.sh @@ -684,7 +684,7 @@ cmd_update()

[PATCH 07/12] submodule config: keep update strategy around

2015-10-15 Thread Stefan Beller
We need the submodule update strategies in a later patch. Signed-off-by: Stefan Beller --- submodule-config.c | 11 +++ submodule-config.h | 1 + 2 files changed, 12 insertions(+) diff --git a/submodule-config.c b/submodule-config.c index 393de53..175bcbb 100644

[PATCH 03/12] git submodule update: Move branch calculation to where it's needed

2015-10-15 Thread Stefan Beller
The branch variable is used only once so calculate it only when needed. Signed-off-by: Stefan Beller --- git-submodule.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git-submodule.sh b/git-submodule.sh index eea27f8..56a0524 100755 ---

[PATCH 10/12] git submodule update: Clone projects from within C

2015-10-15 Thread Stefan Beller
Signed-off-by: Stefan Beller --- builtin/submodule--helper.c | 56 - git-submodule.sh| 12 ++ 2 files changed, 63 insertions(+), 5 deletions(-) diff --git a/builtin/submodule--helper.c

[RFC PATCHv1 00/12] git submodule update in C with parallel cloning

2015-10-15 Thread Stefan Beller
So eventually we want to have projects with lots of submodules such as Android (which would have O(1000) submodules). The very first thing a user does is cloning a project, so we want to impress with speed there as well. git clone however is lazy and just calls `git submodule update --init

[PATCH 12/12] WIP/broken Clone all outstanding submodules in parallel

2015-10-15 Thread Stefan Beller
Our tests scream at this patch, it's just to show what I plan to do. Essentially moving the content of the loop into the get_next_task callback from the run_processes_parallel. Signed-off-by: Stefan Beller --- builtin/submodule--helper.c | 181

[PATCH] pull: add angle brackets to usage string

2015-10-15 Thread Alex Henrie
Signed-off-by: Alex Henrie --- builtin/pull.c | 2 +- contrib/examples/git-pull.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/builtin/pull.c b/builtin/pull.c index a39bb0a..bf3fd3f 100644 --- a/builtin/pull.c +++ b/builtin/pull.c

Re: about rev-parse's quietness

2015-10-15 Thread Junio C Hamano
writes: > Let's see: > $ git rev-parse --verify --quiet master@{xyz} || echo No > No > > $ git rev-parse --verify --quiet master@{u} || echo No > fatal: no upstream configured for branch 'master' > No Yup, that is unfortunate. The above two pass different

Re: [PATCH v3] merge: fix cache_entry use-after-free

2015-10-15 Thread Junio C Hamano
David Turner writes: >> > +static inline void drop_ce_ref(struct cache_entry *ce) >> > +{ >> > + if (ce != NULL) { >> > + assert(ce->ref_count >= 0); >> >> Shouldn't this be "> 0" to prevent double frees? > > No. If the ref_count is 1, then there is still

Re: [PATCH v2 16/31] mailinfo: move metainfo_charset to struct mailinfo

2015-10-15 Thread Eric Sunshine
On Wed, Oct 14, 2015 at 4:45 PM, Junio C Hamano wrote: > This requires us to pass the struct down to decode_header() and > convert_to_utf8() callchain. > > Signed-off-by: Junio C Hamano > --- > @@ -520,23 +519,24 @@ static struct strbuf

Re: [PATCH] Use the alternates of the source repository for dissociating clone

2015-10-15 Thread Junio C Hamano
Alexander Riesen writes: > The "--dissociate" option required reference repositories, which sometimes > demanded a look into the objects/info/alternates by the user. As this > is something which can be figured out automatically, do it in the > clone unless there is

Re: [PATCH 2/3] stripspace: Implement --count-lines option

2015-10-15 Thread Matthieu Moy
Tobias Klauser writes: > --- a/Documentation/git-stripspace.txt > +++ b/Documentation/git-stripspace.txt > @@ -9,7 +9,7 @@ git-stripspace - Remove unnecessary whitespace > SYNOPSIS > > [verse] > -'git stripspace' [-s | --strip-comments] < input > +'git

Re: [PATCH v3 1/3] Add Travis CI support

2015-10-15 Thread Matthieu Moy
Johannes Schindelin writes: > On Thu, 15 Oct 2015, Matthieu Moy wrote: > >> Since the tests are essentially IO-bound and not CPU-bound, it may even >> make sense to use -j3 here. > > I would like to caution against overloading Travis. They are really nice > to us, we

Re: [PATCH 1/3] strbuf: make stripspace() part of strbuf

2015-10-15 Thread Matthieu Moy
Tobias Klauser writes: > [1] > https://git.wiki.kernel.org/index.php/SmallProjectsIdeas#make_.27stripspace.28.29.27_part_of_strbuf I don't think we want such references in the commit message. It does make sense in a "below ---" comment, but commit messages are here to stay

Re: [PATCH 1/3] strbuf: make stripspace() part of strbuf

2015-10-15 Thread Matthieu Moy
Tobias Klauser writes: > Also switch all current users of stripspace() to the new function name > and keep a temporary wrapper inline function for topic branches still > using stripspace(). Since you have this temporary wrapper, it would have made sense to split the patch

Re: [PATCH 1/3] strbuf: make stripspace() part of strbuf

2015-10-15 Thread Junio C Hamano
Tobias Klauser writes: > Rename stripspace() to strbuf_stripspace() and move it to the strbuf > module as suggested in [1]. > > Also switch all current users of stripspace() to the new function name > and keep a temporary wrapper inline function for topic branches still >

Re: [BUG] t7063-status-untracked-cache flaky?

2015-10-15 Thread David Turner
On Thu, 2015-10-15 at 09:52 +0200, Lars Schneider wrote: > Hi, > > I noticed that "t7063-status-untracked-cache.sh" occasionally fails with "not > ok 24 - test sparse status with untracked cache". > > E.g. on OS X compiled with gcc: > https://travis-ci.org/larsxschneider/git/jobs/85432514 > >

[PATCH v4 14/26] refs.c: move is_branch to the common code

2015-10-15 Thread David Turner
From: Ronnie Sahlberg Signed-off-by: Ronnie Sahlberg Signed-off-by: David Turner Signed-off-by: Junio C Hamano --- refs-be-files.c | 5 - refs.c | 5 + 2 files changed, 5 insertions(+), 5

[PATCH v4 03/26] refs-be-files.c: rename refs to refs-be-files

2015-10-15 Thread David Turner
From: Ronnie Sahlberg Rename refs.c to refs-be-files.c to indicate that this file now holds the implementation for the files based refs backend. A smaller portion of the code in this file is backend agnostic and will be moved to a a new refs.c file that will hold all the

[PATCH v4 16/26] refs.c: move ref iterators to the common code

2015-10-15 Thread David Turner
From: Ronnie Sahlberg Signed-off-by: Ronnie Sahlberg Signed-off-by: Junio C Hamano --- refs-be-files.c | 82 - refs.c | 81

[PATCH v4 12/26] refs.c: move resolve_refdup to common

2015-10-15 Thread David Turner
From: Ronnie Sahlberg This function can be shared across all refs backends so move it to the common code. Signed-off-by: Ronnie Sahlberg Signed-off-by: David Turner Signed-off-by: Junio C Hamano ---

[PATCH v4 18/26] refs: move transaction functions into common code

2015-10-15 Thread David Turner
The common ref code will build up a ref transaction. Backends will then commit it. So the transaction creation and update functions should be in the common code. We also need to move the ref structs into the common code so that alternate backends can access them. Later, we will modify struct

[PATCH v4 00/26] refs backend pre-vtable patches

2015-10-15 Thread David Turner
Michael and Junio want to split the refs-backend patches into multiple sections: pre-vtable, vtable, and maybe lmdb. This is the pre-vtable section. It includes multiple fixes suggested by Michael: 1. When we move chunks around between files, make sure we don't cut new versions and paste old

[PATCH v4 02/26] refs: make repack_without_refs and is_branch public

2015-10-15 Thread David Turner
is_branch was already non-static, but this patch declares it in the header. Signed-off-by: Ronnie Sahlberg Signed-off-by: David Turner Signed-off-by: Junio C Hamano --- refs.c | 5 +++-- refs.h | 2 ++ 2 files changed, 5

[PATCH v4 19/26] refs.c: move refname_is_safe to the common code

2015-10-15 Thread David Turner
This function does not contain any backend specific code so we move it to the common code. This function might be used by other refs backends. Signed-off-by: Ronnie Sahlberg Signed-off-by: David Turner Signed-off-by: Junio C Hamano

[PATCH v4 10/26] refs.c: move warn_if_dangling_symref* to the common code

2015-10-15 Thread David Turner
From: Ronnie Sahlberg These functions do not use any backend specific code so we move them to the common code. Signed-off-by: Ronnie Sahlberg Signed-off-by: David Turner Signed-off-by: Junio C Hamano ---

[PATCH v4 07/26] refs.c: move read_ref_at to the common refs file

2015-10-15 Thread David Turner
From: Ronnie Sahlberg Move read_ref_at() to the refs.c file since this function does not contain any backend specific code. Signed-off-by: Ronnie Sahlberg Signed-off-by: David Turner Signed-off-by: Junio C Hamano

[PATCH v4 01/26] refs.c: create a public version of verify_refname_available

2015-10-15 Thread David Turner
From: Ronnie Sahlberg Create a public version of verify_refname_available that backends can provide. Signed-off-by: Ronnie Sahlberg Signed-off-by: David Turner Signed-off-by: Junio C Hamano --- refs.c |

[PATCH v4 21/26] refs.c: move peel_object to the common code

2015-10-15 Thread David Turner
This function does not contain any backend specific code so we move it to the common code. Signed-off-by: David Turner Signed-off-by: Junio C Hamano Signed-off-by: Michael Haggerty --- refs-be-files.c | 53

[PATCH v4 05/26] refs.c: move update_ref to refs.c

2015-10-15 Thread David Turner
From: Ronnie Sahlberg Move update_ref() to the refs.c file since this function does not contain any backend specific code. Move the ref classifier functions as well, since update_ref depends on them. Based on Ronnie Sahlberg's patch Signed-off-by: Ronnie Sahlberg

[PATCH v4 26/26] introduce "extensions" form of core.repositoryformatversion

2015-10-15 Thread David Turner
From: Jeff King Normally we try to avoid bumps of the whole-repository core.repositoryformatversion field. However, it is unavoidable if we want to safely change certain aspects of git in a backwards-incompatible way (e.g., modifying the set of ref tips that we must traverse to

[PATCH v4 24/26] refs: make files_log_ref_write functions public

2015-10-15 Thread David Turner
Because HEAD and stash are per-worktree, refs.c needs to go through the files backend to write these refs. In this patch, we make one files backend internal functions public. Later, we will use this to handle reflog updates for per-worktree symbolic refs (HEAD). Signed-off-by: David Turner

[PATCH v4 08/26] refs.c: move the hidden refs functions to the common code

2015-10-15 Thread David Turner
From: Ronnie Sahlberg Move the hidden refs functions to the refs.c file since these functions do not contain any backend specific code. Signed-off-by: Ronnie Sahlberg Signed-off-by: David Turner Signed-off-by: Junio C Hamano

[PATCH v4 13/26] refs.c: move check_refname_format to the common code

2015-10-15 Thread David Turner
From: Ronnie Sahlberg This function does not contain any backend specific code so we move it to the common code. Signed-off-by: Ronnie Sahlberg Signed-off-by: David Turner Signed-off-by: Junio C Hamano ---

[PATCH v4 04/26] refs.c: add a new refs.c file to hold all common refs code

2015-10-15 Thread David Turner
From: Ronnie Sahlberg Create a new refs.c file that will be used to hold all the refs code that is backend agnostic and will be shared across all backends. Signed-off-by: Ronnie Sahlberg Signed-off-by: Junio C Hamano --- Makefile |

[PATCH v4 15/26] refs.c: move prettify_refname to the common code

2015-10-15 Thread David Turner
From: Ronnie Sahlberg Signed-off-by: Ronnie Sahlberg Signed-off-by: Junio C Hamano --- refs-be-files.c | 9 - refs.c | 9 + 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/refs-be-files.c

[PATCH v4 20/26] refs.c: move copy_msg to the common code

2015-10-15 Thread David Turner
Rename copy_msg to copy_reflog_msg and make it public. Signed-off-by: David Turner Signed-off-by: Junio C Hamano Signed-off-by: Michael Haggerty --- refs-be-files.c | 28 +--- refs.c | 21

[PATCH v4 06/26] refs.c: move delete_pseudoref and delete_ref to the common code

2015-10-15 Thread David Turner
From: Ronnie Sahlberg Move delete_pseudoref() and delete_ref() to the refs.c file since these functions do not contain any backend specific code. We can't move delete_refs yet because it depends on the files-backend-specific repack_without_refs. Based on a patch by Ronnie

[PATCH v4 11/26] refs.c: move read_ref, read_ref_full and ref_exists to the common code

2015-10-15 Thread David Turner
From: Ronnie Sahlberg These functions do not depend on the backend implementation so we move them to the common code. Signed-off-by: Ronnie Sahlberg Signed-off-by: David Turner Signed-off-by: Junio C Hamano

[PATCH v4 22/26] refs.c: move should_autocreate_reflog to common code

2015-10-15 Thread David Turner
Signed-off-by: David Turner Signed-off-by: Junio C Hamano Signed-off-by: Michael Haggerty --- refs-be-files.c | 10 -- refs.c | 10 ++ refs.h | 2 ++ 3 files changed, 12 insertions(+), 10

[PATCH v4 25/26] refs: break out ref conflict checks

2015-10-15 Thread David Turner
Create new function verify_no_descendants, to hold one of the ref conflict checks used in verify_refname_available. Multiple backends will need this function, so it goes in the common code. rename_ref_available also moves to the common code, because alternate backends might need it and it has no

[PATCH v4 23/26] initdb: move safe_create_dir into common code

2015-10-15 Thread David Turner
In a moment, we'll create initdb functions for ref backends, and code from initdb that calls this function needs to move into the files backend. So this function needs to be public. Signed-off-by: David Turner Signed-off-by: Junio C Hamano

[PATCH v4 17/26] refs.c: move head_ref_namespaced to the common code

2015-10-15 Thread David Turner
From: Ronnie Sahlberg Signed-off-by: Ronnie Sahlberg Signed-off-by: Junio C Hamano --- refs-be-files.c | 15 --- refs.c | 15 +++ 2 files changed, 15 insertions(+), 15 deletions(-) diff --git

[PATCH v4 09/26] refs.c: move dwim and friend functions to the common refs code

2015-10-15 Thread David Turner
From: Ronnie Sahlberg These functions do not contain any backend specific code so we move them to the common code and share across all backends. Signed-off-by: Ronnie Sahlberg Signed-off-by: David Turner Signed-off-by: Junio

Re: [PATCH v3] merge: fix cache_entry use-after-free

2015-10-15 Thread David Turner
On Thu, 2015-10-15 at 05:35 +0200, René Scharfe wrote: > Am 15.10.2015 um 00:07 schrieb David Turner: > > From: Keith McGuigan > > > > During merges, we would previously free entries that we no longer need > > in the destination index. But those entries might also be

Re: [PATCH 2/3] stripspace: Implement --count-lines option

2015-10-15 Thread Matthieu Moy
Tobias Klauser writes: > + * comments are considered contents to be removed or not. Returns the > + * number of lines in the resulting buffer. We write comments at imperative tone, hence "Return", not "Returns". Other than that, I agree with Junio: * A preparatory patch

Re: [PATCH 2/3] stripspace: Implement --count-lines option

2015-10-15 Thread Junio C Hamano
Tobias Klauser writes: > diff --git a/Documentation/git-stripspace.txt > b/Documentation/git-stripspace.txt > index 60328d5..411e17c 100644 > --- a/Documentation/git-stripspace.txt > +++ b/Documentation/git-stripspace.txt > @@ -9,7 +9,7 @@ git-stripspace - Remove