[PATCH v5 03/27] refs: add a backend method structure with transaction functions

2016-02-17 Thread David Turner
From: Ronnie Sahlberg Add a ref structure for storage backend methods. Start by adding a method pointer for the transaction commit function. Add a function set_refs_backend to switch between storage backends. The files based storage backend is the default. Signed-off-by: Ronnie Sahlberg Signed

[PATCH v5 05/27] refs: add method for do_for_each_ref

2016-02-17 Thread David Turner
Add a ref backend method for do_for_each_ref. Signed-off-by: David Turner --- refs.c | 8 refs/files-backend.c | 7 +-- refs/refs-internal.h | 5 + 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/refs.c b/refs.c index bfe3b4e..253e566 100644 --- a/r

[PATCH v5 18/27] refs: resolve symbolic refs first

2016-02-17 Thread David Turner
Before committing ref updates, split symbolic ref updates into two parts: an update to the underlying ref, and a log-only update to the symbolic ref. This ensures that both references are locked correctly while their reflogs are updated. It is still possible to confuse git by concurrent updates,

[PATCH v5 22/27] clone: allow ref storage backend to be set for clone

2016-02-17 Thread David Turner
Add a new option, --ref-storage, to allow the ref storage backend to be set on new clones. Submodules must use the same ref storage as the parent repository, so we also pass the --ref-storage option option when cloning submodules. Signed-off-by: David Turner Signed-off-by: SZEDER Gábor --- Doc

[PATCH v5 12/27] refs: forbid cross-backend ref renames

2016-02-17 Thread David Turner
This would be pretty weird, but since it will break, we should prevent it. Signed-off-by: David Turner --- refs.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/refs.c b/refs.c index f5754f2..8eb04da 100644 --- a/refs.c +++ b/refs.c @@ -1306,5 +1306,11 @@ int delete_refs(struct string

[PATCH v5 27/27] tests: add ref-storage argument

2016-02-17 Thread David Turner
Add a --ref-storage argument to make it easy to test alternate ref storage backends. Modify many tests to work under alternate ref storage backends. Conditionally skip tests that are not expected to succeed under this condition. Most of this is straightforward. Of particular note are the followin

[PATCH v5 11/27] refs: add method to rename refs

2016-02-17 Thread David Turner
Signed-off-by: David Turner --- refs.c | 5 + refs/files-backend.c | 4 +++- refs/refs-internal.h | 8 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/refs.c b/refs.c index e222d02..f5754f2 100644 --- a/refs.c +++ b/refs.c @@ -1303,3 +1303,8 @@ int delete

[PATCH v5 24/27] refs: add register_ref_storage_backends()

2016-02-17 Thread David Turner
This new function will register all known ref storage backends... once there are any other than the default. For now, it's a no-op. Signed-off-by: David Turner --- builtin/init-db.c | 3 +++ config.c | 25 + refs.c| 13 + refs.h

[PATCH v5 20/27] init: allow alternate ref strorage to be set for new repos

2016-02-17 Thread David Turner
git init learns a new argument --ref-storage. Presently, only "files" is supported, but later we will add other storage backends. When this argument is used, the repository's extensions.refStorage configuration value is set (as well as core.repositoryformatversion), and the ref storage backend's

[PATCH v5 26/27] refs: tests for lmdb backend

2016-02-17 Thread David Turner
Add tests for the database backend. Signed-off-by: David Turner Helped-by: Dennis Kaarsemaker --- t/t1460-refs-lmdb-backend.sh| 1109 +++ t/t1470-refs-lmdb-backend-reflog.sh | 359 t/t1480-refs-lmdb-submodule.sh | 85 +++ t/test-lib.s

[PATCH v5 23/27] svn: learn ref-storage argument

2016-02-17 Thread David Turner
git svn learns to pass the ref-storage command-line argument (to init and clone) through to git init. Signed-off-by: David Turner Signed-off-by: SZEDER Gábor --- contrib/completion/git-completion.bash | 2 +- git-svn.perl | 6 +- 2 files changed, 6 insertions(+), 2

[PATCH v5 21/27] refs: check submodules' ref storage config

2016-02-17 Thread David Turner
All submodules must have the same ref storage (for now). Confirm that this is so before attempting to do anything with submodule refs. Signed-off-by: David Turner --- refs.c | 54 refs.h | 2 +- refs/files-backend

[PATCH v5 25/27] refs: add LMDB refs storage backend

2016-02-17 Thread David Turner
Add a database backend for refs using LMDB. This backend runs git for-each-ref about 30% faster than the files backend with fully-packed refs on a repo with ~120k refs. It's also about 4x faster than using fully-unpacked refs. In addition, and perhaps more importantly, it avoids case-conflict is

[PATCH v5 07/27] refs: add methods for reflog

2016-02-17 Thread David Turner
In the file-based backend, the reflog piggybacks on the ref lock. Since other backends won't have the same sort of ref lock, ref backends must also handle reflogs. Signed-off-by: Ronnie Sahlberg Signed-off-by: David Turner --- refs.c | 46 ++

[PATCH v5 04/27] refs: add methods for misc ref operations

2016-02-17 Thread David Turner
From: Ronnie Sahlberg Add ref backend methods for: resolve_ref_unsafe, verify_refname_available, pack_refs, peel_ref, create_symref, resolve_gitlink_ref. Signed-off-by: Ronnie Sahlberg Signed-off-by: David Turner --- refs.c | 36 refs/files-b

[PATCH v5 09/27] refs: add method for delete_refs

2016-02-17 Thread David Turner
In the file-based backend, delete_refs has some special optimization to deal with packed refs. In other backends, we might be able to make ref deletion faster by putting all deletions into a single transaction. So we need a special backend function for this. Signed-off-by: David Turner --- ref

[PATCH v5 16/27] refs: don't dereference on rename

2016-02-17 Thread David Turner
When renaming refs, don't dereference either the origin or the destination before renaming. The origin does not need to be dereferenced because it is presently forbidden to rename symbolic refs. Not dereferencing the destination fixes a bug where renaming on top of a broken symref would use the p

[PATCH v5 02/27] refs: move for_each_*ref* functions into common code

2016-02-17 Thread David Turner
Make do_for_each_ref take a submodule as an argument instead of a ref_cache. Since all for_each_*ref* functions are defined in terms of do_for_each_ref, we can then move them into the common code. Later, we can simply make do_for_each_ref into a backend function. Signed-off-by: David Turner ---

[PATCH v5 15/27] refs: allow log-only updates

2016-02-17 Thread David Turner
The refs infrastructure learns about log-only ref updates, which only update the reflog. Later, we will use this to separate symbolic reference resolution from ref updating. Signed-off-by: David Turner --- refs/files-backend.c | 15 ++- refs/refs-internal.h | 7 +++ 2 files cha

[PATCH v5 08/27] refs: add method for initial ref transaction commit

2016-02-17 Thread David Turner
Signed-off-by: Ronnie Sahlberg Signed-off-by: David Turner --- refs.c | 6 ++ refs/files-backend.c | 5 +++-- refs/refs-internal.h | 1 + 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/refs.c b/refs.c index 4733935..970729c 100644 --- a/refs.c +++ b/refs.c @@ -

[PATCH v5 14/27] refs: move duplicate check to common code

2016-02-17 Thread David Turner
The check for duplicate refnames in a transaction is needed for all backends, so move it to the common code. ref_transaction_commit_fn gains a new argument, the sorted string_list of affected refnames. Signed-off-by: David Turner --- refs.c | 69 +++

[PATCH v5 19/27] refs: always handle non-normal refs in files backend

2016-02-17 Thread David Turner
Always handle non-normal (per-worktree or pseudo) refs in the files backend instead of alternate backends. Sometimes a ref transaction will update both a per-worktree ref and a normal ref. For instance, an ordinary commit might update refs/heads/master and HEAD (or at least HEAD's reflog). Updat

[PATCH v5 06/27] refs: add do_for_each_per_worktree_ref

2016-02-17 Thread David Turner
Alternate refs backends might still use files to store per-worktree refs. So the files backend's ref-loading infrastructure should be available to those backends, just for use on per-worktree refs. Add do_for_each_per_worktree_ref, which iterates over per-worktree refs. Signed-off-by: David Turn

[PATCH v5 13/27] refs: make lock generic

2016-02-17 Thread David Turner
Instead of using a files-backend-specific struct ref_lock, the generic ref_transaction struct should provide a void pointer that backends can use for their own lock data. Signed-off-by: David Turner --- refs/files-backend.c | 29 - refs/refs-internal.h | 2 +- 2 file

[PATCH v5 17/27] refs: on symref reflog expire, lock symref not referrent

2016-02-17 Thread David Turner
When locking a symbolic ref to expire a reflog, lock the symbolic ref (using REF_NODEREF) instead of its referent. Add a test for this. Signed-off-by: David Turner --- refs/files-backend.c | 3 ++- t/t1410-reflog.sh| 10 ++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --g

[PATCH v5 10/27] refs: add methods to init refs db

2016-02-17 Thread David Turner
Alternate refs backends might not need the refs/heads directory and so on, so we make ref db initialization part of the backend. Signed-off-by: David Turner --- builtin/init-db.c| 20 ++-- refs.c | 5 + refs.h | 2 ++ refs/files-backend.c | 1

[PATCH v5 01/27] refs: Move head_ref{,_submodule} to the common code

2016-02-17 Thread David Turner
These don't use any backend-specific functions. These were previously defined in terms of the do_head_ref helper function, but since they are otherwise identical, we don't need that function. Signed-off-by: David Turner --- refs.c | 23 +++ refs/files-backend.c

[PATCH v5 00/27] refs backends

2016-02-17 Thread David Turner
This version incorporates numerous changes suggested by Michael Haggerty. Also a few by Duy Nguyen. Of particular note are a few new patches: refs: Move head_ref{,_submodule} to the common code. Michael pointed out that these didn't directly use backend-specific functions. refs: add method for

Re: [PATCH v4 14/21] refs: always handle non-normal refs in files backend

2016-02-17 Thread David Turner
On Fri, 2016-02-12 at 16:07 +0100, Michael Haggerty wrote: > On 02/05/2016 08:44 PM, David Turner wrote: > > Always handle non-normal (per-worktree or pseudo) refs in the files > > backend instead of alternate backends. > > > > Sometimes a ref transaction will update both a per-worktree ref and >

Re: [PATCH v2 10/26] wrapper.c: allow to create an empty file with write_file()

2016-02-17 Thread Duy Nguyen
On Thu, Feb 18, 2016 at 5:29 AM, Junio C Hamano wrote: > Nguyễn Thái Ngọc Duy writes: > >> This is used later on to create empty .git/worktrees/xxx/locked when >> "git worktree lock" is called with no reason given. >> >> Signed-off-by: Nguyễn Thái Ngọc Duy >> --- >> wrapper.c | 2 +- >> 1 file

Re: [PATCH v4 13/21] refs: resolve symbolic refs first

2016-02-17 Thread David Turner
On Fri, 201-02-12 at 15:09 +0100, Michael Haggerty wrote:] > On 02/05/2016 08:44 PM, David Turner wrote: > > Before committing ref updates, split symbolic ref updates into two > > parts: an update to the underlying ref, and a log-only update to > > the > > symbolic ref. This ensures that both refe

Re: failed submodule update re-run results in no checked out files?

2016-02-17 Thread Jacob Keller
On Wed, Feb 17, 2016 at 4:15 PM, Stefan Beller wrote: > On Wed, Feb 17, 2016 at 3:54 PM, Jacob Keller wrote: >> Hi, >> >> I am having an issue currently when using Git with a remote server >> which has a limited number of ssh connections. >> >> The ssh server sometimes closes connections due to t

Re: failed submodule update re-run results in no checked out files?

2016-02-17 Thread Stefan Beller
On Wed, Feb 17, 2016 at 3:54 PM, Jacob Keller wrote: > Hi, > > I am having an issue currently when using Git with a remote server > which has a limited number of ssh connections. > > The ssh server sometimes closes connections due to too many concurrent > connections. I will get the following outp

failed submodule update re-run results in no checked out files?

2016-02-17 Thread Jacob Keller
Hi, I am having an issue currently when using Git with a remote server which has a limited number of ssh connections. The ssh server sometimes closes connections due to too many concurrent connections. I will get the following output from git in this case when performing a submodule update of a s

Re: What's cooking in git.git (Feb 2016, #05; Wed, 17)

2016-02-17 Thread Jeff King
On Wed, Feb 17, 2016 at 02:34:08PM -0800, Junio C Hamano wrote: > * jk/tighten-alloc (2016-02-15) 18 commits > - ewah: convert to REALLOC_ARRAY, etc > - convert ewah/bitmap code to use xmalloc > - diff_populate_gitlink: use a strbuf > - transport_anonymize_url: use xstrfmt > - git-compat-util

What's cooking in git.git (Feb 2016, #05; Wed, 17)

2016-02-17 Thread Junio C Hamano
Here are the topics that have been cooking. Commits prefixed with '-' are only in 'pu' (proposed updates) while commits prefixed with '+' are in 'next'. The ones marked with '.' do not appear in any of the integration branches, but I am still holding onto them. There are a few undecided topics a

Re: [PATCH v2 10/26] wrapper.c: allow to create an empty file with write_file()

2016-02-17 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy writes: > This is used later on to create empty .git/worktrees/xxx/locked when > "git worktree lock" is called with no reason given. > > Signed-off-by: Nguyễn Thái Ngọc Duy > --- > wrapper.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/wrapper.c

Re: [PATCH v6 01/11] ref-filter: use string_list_split over strbuf_split

2016-02-17 Thread Jeff King
On Wed, Feb 17, 2016 at 02:19:39PM -0800, Junio C Hamano wrote: > So, is everybody happy with this round? > > With another series on top for the "conditional" stuff, I guess we > are ready to do the formatting for "git branch --list", which would > be a big step forward. I have not looked with n

Re: [PATCH v6 01/11] ref-filter: use string_list_split over strbuf_split

2016-02-17 Thread Eric Sunshine
On Wed, Feb 17, 2016 at 5:19 PM, Junio C Hamano wrote: > Jeff King writes: >> On Wed, Feb 17, 2016 at 05:11:50PM -0500, Eric Sunshine wrote: >>> On Wed, Feb 17, 2016 at 1:06 PM, Karthik Nayak >>> wrote: >>> > From: Jeff King >>> > >>> > We don't do any post-processing on the resulting strbufs,

Re: [PATCH v6 01/11] ref-filter: use string_list_split over strbuf_split

2016-02-17 Thread Junio C Hamano
Jeff King writes: > On Wed, Feb 17, 2016 at 05:11:50PM -0500, Eric Sunshine wrote: > >> On Wed, Feb 17, 2016 at 1:06 PM, Karthik Nayak wrote: >> > From: Jeff King >> > >> > We don't do any post-processing on the resulting strbufs, so it is >> > simpler to just use string_list_split, which takes

Re: [PATCH v6 01/11] ref-filter: use string_list_split over strbuf_split

2016-02-17 Thread Jeff King
On Wed, Feb 17, 2016 at 05:11:50PM -0500, Eric Sunshine wrote: > On Wed, Feb 17, 2016 at 1:06 PM, Karthik Nayak wrote: > > From: Jeff King > > > > We don't do any post-processing on the resulting strbufs, so it is > > simpler to just use string_list_split, which takes care of removing > > the de

Re: [PATCH v6 01/11] ref-filter: use string_list_split over strbuf_split

2016-02-17 Thread Eric Sunshine
On Wed, Feb 17, 2016 at 1:06 PM, Karthik Nayak wrote: > From: Jeff King > > We don't do any post-processing on the resulting strbufs, so it is > simpler to just use string_list_split, which takes care of removing > the delimiter for us. > > Written-by: Jeff King Perhaps Peff can give his sign-o

Re: GSoC 2016: applications open, deadline = Fri, 19/2

2016-02-17 Thread Junio C Hamano
Jeff King writes: > On Wed, Feb 17, 2016 at 09:21:20PM +0100, Matthieu Moy wrote: > >> > I am wondering if we heard from libgit2 folks if they want us to >> > host them (or they want to participate in GSoC at all). >> >> The libgit2 mention is left from previous versions of this page. I left >>

Windows git bash - child processes see system PATH environment variable instead of user...

2016-02-17 Thread Edward Marshall
This happens on my Windows 7 Home Premium x64 SP1 Desktop, but not on my Windows 10 Pro x64 laptop. Everything used to work fine until I updated my Desktop to the latest version of Git (the laptop has the same version but was a totally clean install as it is a new laptop) Edward@Edward-PC MINGW64

Re: [PATCH v5 2/3] config: add 'type' to config_source struct that identifies config type

2016-02-17 Thread Junio C Hamano
Junio C Hamano writes: > larsxschnei...@gmail.com writes: > >> From: Lars Schneider >> >> Use the config type to print more detailed error messages that inform >> the user about the origin of a config error (file, stdin, blob). > > "type" is too broad a word in the context of configuration file,

Re: [PATCH v5 15/15] config: rename git_config_set_or_die to git_config_set

2016-02-17 Thread Junio C Hamano
Michael Blume writes: [administrivia: please cull unnecessary parts from your quote] >> 1 warning generated. >> AR libgit.a >> LINK git-credential-store >> Undefined symbols for architecture x86_64: >> "_git_config_set_or_die", referenced from: >> _probe_utf8_pathname_composition

Re: [PATCH +warn] Implement https public key pinning

2016-02-17 Thread Junio C Hamano
Christoph Egger writes: > Add the http.pinnedpubkey configuration option for public key > pinning. It allows any string supported by libcurl -- > base64(sha256(pubkey)) or filename of the full public key. > > If cURL does not support pinning (is too old) output a warning to the > user. > > Signed

Re: [PATCH v5 15/15] config: rename git_config_set_or_die to git_config_set

2016-02-17 Thread Michael Blume
On Wed, Feb 17, 2016 at 12:57 PM, Michael Blume wrote: > On Tue, Feb 16, 2016 at 4:56 AM, Patrick Steinhardt wrote: >> Rename git_config_set_or_die functions to git_config_set, leading >> to the new default behavior of dying whenever a configuration >> error occurs. >> >> By now all callers that

Re: [PATCH v5 15/15] config: rename git_config_set_or_die to git_config_set

2016-02-17 Thread Michael Blume
On Tue, Feb 16, 2016 at 4:56 AM, Patrick Steinhardt wrote: > Rename git_config_set_or_die functions to git_config_set, leading > to the new default behavior of dying whenever a configuration > error occurs. > > By now all callers that shall die on error have been transitioned > to the _or_die vari

Re: [PATCH 05/20] rename_tmp_log(): use raceproof_create_file()

2016-02-17 Thread Junio C Hamano
Michael Haggerty writes: > 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 | 76 > ++-- > 1 file change

[no subject]

2016-02-17 Thread Kevin Daudt
subscribe git -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH v4 15/21] init: allow alternate ref strorage to be set for new repos

2016-02-17 Thread David Turner
On Fri, 2016-02-12 at 16:26 +0100, Michael Haggerty wrote: > On 02/05/2016 08:44 PM, David Turner wrote: > > git init learns a new argument --ref-storage. Presently, only > > "files" is supported, but later we will add other storage backends. > > > > When this argument is used, the repository's e

Re: GSoC 2016: applications open, deadline = Fri, 19/2

2016-02-17 Thread Jeff King
On Wed, Feb 17, 2016 at 09:21:20PM +0100, Matthieu Moy wrote: > > I am wondering if we heard from libgit2 folks if they want us to > > host them (or they want to participate in GSoC at all). > > The libgit2 mention is left from previous versions of this page. I left > a message on their IRC chann

Re: [PATCH 04/20] lock_ref_sha1_basic(): use raceproof_create_file()

2016-02-17 Thread Junio C Hamano
Michael Haggerty writes: > 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 > --- Makes sense. -- To unsubscribe from this list: send the line "unsubscribe git" in

Re: [PATCH v4 19/21] refs: add register_ref_storage_backends()

2016-02-17 Thread David Turner
On Fri, 2016-02-12 at 16:42 +0100, Michael Haggerty wrote: > On 02/05/2016 08:44 PM, David Turner wrote: > > This new function will register all known ref storage backends... > > once > > there are any other than the default. For now, it's a no-op. > > > > Signed-off-by: David Turner > > --- > >

Re: [PATCH v4 20/21] refs: add LMDB refs storage backend

2016-02-17 Thread David Turner
On Sun, 2016-02-14 at 19:04 +0700, Duy Nguyen wrote: > On Sat, Feb 6, 2016 at 2:44 AM, David Turner < > dtur...@twopensource.com> wrote: > > +static char *get_refdb_path(const char *base) > > +{ > > + static struct strbuf path_buf = STRBUF_INIT; > > + strbuf_reset(&path_buf); > > +

Re: GSoC 2016: applications open, deadline = Fri, 19/2

2016-02-17 Thread Matthieu Moy
Junio C Hamano writes: > Matthieu Moy writes: > >> Feel free to start writting an idea for >> http://git.github.io/SoC-2016-Ideas/. It'd be nice to have a few more >> ideas before Friday. We can polish them later if needed. > > The top of the page says it is shared between Git and libgit2; > sho

Re: [PATCH v2 0/3] fix "v"iew subcommand in "git am -i"

2016-02-17 Thread Jeff King
On Wed, Feb 17, 2016 at 11:15:13AM -0800, Junio C Hamano wrote: > So the first patch in this series factors out a helper function to > let the caller run the pager the right way. They make the third > patch to fix the breakage in "am" trivial. Compared to v1, the > helper was much simplified wit

Re: [PATCH 03/20] raceproof_create_file(): new function

2016-02-17 Thread Junio C Hamano
Michael Haggerty writes: > I was thinking about moving this function, along with > safe_create_leading_directories() and > safe_create_leading_directories_const(), to a more general module like > path.c. But it didn't seem worth the code churn. I think it would be a better longer-term endgame st

Re: [PATCH 02/20] safe_create_leading_directories(): set errno on SCLD_EXISTS

2016-02-17 Thread Junio C Hamano
Michael Haggerty writes: > The exit path for SCLD_EXISTS wasn't setting errno, as expected by at > least one caller. Fix the problem and document that the function sets > errno correctly to help avoid similar regressions in the future. > diff --git a/sha1_file.c b/sha1_file.c > index 568120e..a1

[PATCH v2 2/3] pager: factor out a helper to prepare a child process to run the pager

2016-02-17 Thread Junio C Hamano
When running a pager, we need to run the program git_pager() gave us, but we need to make sure we spawn it via the shell (i.e. it is valid to say PAGER='less -S', for example) and give default values to $LESS and $LV environment variables. Factor out these details to a separate helper function. S

[PATCH v2 3/3] am -i: fix "v"iew

2016-02-17 Thread Junio C Hamano
The 'v'iew subcommand of the interactive mode of "git am -i" was broken by the rewrite to C we did at around 2.6.0 timeframe at 7ff26832 (builtin-am: implement -i/--interactive, 2015-08-04); we used to spawn the pager via the shell, accepting things like PAGER='less -S' in the environment

[PATCH v2 0/3] fix "v"iew subcommand in "git am -i"

2016-02-17 Thread Junio C Hamano
The 'v'iew subcommand of the interactive mode of "git am -i" was broken by the rewrite to C we did at around 2.6.0 timeframe at 7ff26832 (builtin-am: implement -i/--interactive, 2015-08-04); we used to spawn the pager via the shell, accepting things like PAGER='less -S' in the environment

[PATCH v2 1/3] pager: lose a separate argv[]

2016-02-17 Thread Junio C Hamano
These days, using the embedded args array in the child_process structure is the norm. Follow that practice. Signed-off-by: Junio C Hamano --- * Same as v1 pager.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pager.c b/pager.c index 070dc11..5dbcc5a 100644 --- a/pager

Re: GSoC 2016: applications open, deadline = Fri, 19/2

2016-02-17 Thread Matthieu Moy
Lars Schneider writes: > Coincidentally I started working on similar thing already (1) and I have > lots of ideas around it. I guess it's time to start sharing these ideas then ;-). I think there's a lot to do. If we want to push this idea as a GSoC project, we need: * A rough plan. We can't e

Re: GSoC 2016: applications open, deadline = Fri, 19/2

2016-02-17 Thread Junio C Hamano
Matthieu Moy writes: > Feel free to start writting an idea for > http://git.github.io/SoC-2016-Ideas/. It'd be nice to have a few more > ideas before Friday. We can polish them later if needed. The top of the page says it is shared between Git and libgit2; should that be really the case? We lat

Re: [PATCH v5 2/3] config: add 'type' to config_source struct that identifies config type

2016-02-17 Thread Junio C Hamano
larsxschnei...@gmail.com writes: > From: Lars Schneider > > Use the config type to print more detailed error messages that inform > the user about the origin of a config error (file, stdin, blob). "type" is too broad a word in the context of configuration file, and does not help readers as a var

Re: GSoC 2016: applications open, deadline = Fri, 19/2

2016-02-17 Thread Lars Schneider
On 17 Feb 2016, at 18:24, Thomas Gummerer wrote: > On 02/10, Matthieu Moy wrote: >> Work on the application itself, and on the list of ideas. > > One potential idea: > > Make destructive git commands more safe for the user. > > Some commands (e.g. git reset --hard, git clean -f, etc.) can > p

Re: [PATCH v5 02/12] ref-filter: use strbuf_split_str_omit_term()

2016-02-17 Thread Karthik Nayak
On Wed, Feb 17, 2016 at 11:47 PM, Eric Sunshine wrote: > On Wed, Feb 17, 2016 at 1:07 PM, Karthik Nayak wrote: >> On Wed, Feb 17, 2016 at 11:09 PM, Eric Sunshine >> wrote: >>> I reviewed the entire series again, including Peff's changes, so this >>> entire series is: >>> >>> Reviewed-by: Er

Re: [PATCH v5 02/12] ref-filter: use strbuf_split_str_omit_term()

2016-02-17 Thread Eric Sunshine
On Wed, Feb 17, 2016 at 1:07 PM, Karthik Nayak wrote: > On Wed, Feb 17, 2016 at 11:09 PM, Eric Sunshine > wrote: >> I reviewed the entire series again, including Peff's changes, so this >> entire series is: >> >> Reviewed-by: Eric Sunshine >> >> Karthik, feel free to include my Reviewed-by:

Re: [PATCH v5 02/12] ref-filter: use strbuf_split_str_omit_term()

2016-02-17 Thread Karthik Nayak
On Wed, Feb 17, 2016 at 11:09 PM, Eric Sunshine wrote: > On Wed, Feb 17, 2016 at 12:04 PM, Karthik Nayak wrote: >> On Wed, Feb 17, 2016 at 2:39 AM, Eric Sunshine >> wrote: >>> My initial reaction was negative due to the heavy review burden this >>> series has demanded thus far, however, my mind

[PATCH v6 05/11] ref-filter: introduce color_atom_parser()

2016-02-17 Thread Karthik Nayak
Introduce color_atom_parser() which will parse a "color" atom and store its color in the "used_atom" structure for further usage in populate_value(). Helped-by: Ramsay Jones Helped-by: Eric Sunshine Signed-off-by: Karthik Nayak --- ref-filter.c | 25 - 1 file changed, 1

[PATCH v6 10/11] ref-filter: introduce contents_atom_parser()

2016-02-17 Thread Karthik Nayak
Introduce contents_atom_parser() which will parse the '%(contents)' atom and store information into the 'used_atom' structure based on the modifiers used along with the atom. Also introduce body_atom_parser() and subject_atom_parser() for parsing atoms '%(body)' and '%(subject)' respectively. Help

[PATCH v6 06/11] ref-filter: introduce parse_align_position()

2016-02-17 Thread Karthik Nayak
>From populate_value() extract parse_align_position() which given a string would give us the alignment position. This is a preparatory patch as to introduce prefixes for the %(align) atom and avoid redundancy in the code. Helped-by: Eric Sunshine Signed-off-by: Karthik Nayak --- ref-filter.c |

[PATCH v6 11/11] ref-filter: introduce objectname_atom_parser()

2016-02-17 Thread Karthik Nayak
Introduce objectname_atom_parser() which will parse the '%(objectname)' atom and store information into the 'used_atom' structure based on the modifiers used along with the atom. Helped-by: Ramsay Jones Helped-by: Eric Sunshine Signed-off-by: Karthik Nayak --- ref-filter.c | 35 +++

[PATCH v6 08/11] ref-filter: align: introduce long-form syntax

2016-02-17 Thread Karthik Nayak
Introduce optional prefixes "width=" and "position=" for the align atom so that the atom can be used as "%(align:width=,position=)". Add Documentation and tests for the same. Helped-by: Eric Sunshine Signed-off-by: Karthik Nayak --- Documentation/git-for-each-ref.txt | 20 ++ r

[PATCH v6 03/11] ref-filter: introduce struct used_atom

2016-02-17 Thread Karthik Nayak
Introduce the 'used_atom' structure to replace the existing implementation of 'used_atom' (which is a list of atoms). This helps us parse atoms beforehand and store required details into the 'used_atom' for future usage. Helped-by: Eric Sunshine Signed-off-by: Karthik Nayak --- ref-filter.c | 3

[PATCH v6 09/11] ref-filter: introduce remote_ref_atom_parser()

2016-02-17 Thread Karthik Nayak
Introduce remote_ref_atom_parser() which will parse the '%(upstream)' and '%(push)' atoms and store information into the 'used_atom' structure based on the modifiers used along with the corresponding atom. Helped-by: Ramsay Jones Helped-by: Eric Sunshine Signed-off-by: Karthik Nayak --- ref-fi

[PATCH v6 07/11] ref-filter: introduce align_atom_parser()

2016-02-17 Thread Karthik Nayak
Introduce align_atom_parser() which will parse an 'align' atom and store the required alignment position and width in the 'used_atom' structure for further usage in populate_value(). Since this patch removes the last usage of match_atom_name(), remove the function from ref-filter.c. Helped-by: Er

[PATCH v6 01/11] ref-filter: use string_list_split over strbuf_split

2016-02-17 Thread Karthik Nayak
From: Jeff King We don't do any post-processing on the resulting strbufs, so it is simpler to just use string_list_split, which takes care of removing the delimiter for us. Written-by: Jeff King Signed-off-by: Karthik Nayak --- ref-filter.c | 29 +++-- 1 file changed,

[PATCH v6 04/11] ref-filter: introduce parsing functions for each valid atom

2016-02-17 Thread Karthik Nayak
Parsing atoms is done in populate_value(), this is repetitive and hence expensive. Introduce a parsing function which would let us parse atoms beforehand and store the required details into the 'used_atom' structure for further usage. Helped-by: Eric Sunshine Helped-by: Ramsay Jones Helped-by: A

[PATCH v6 02/11] ref-filter: bump 'used_atom' and related code to the top

2016-02-17 Thread Karthik Nayak
Bump code to the top for usage in further patches. Signed-off-by: Karthik Nayak --- ref-filter.c | 30 +++--- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/ref-filter.c b/ref-filter.c index 19367ce..6a73c5b 100644 --- a/ref-filter.c +++ b/ref-filter.c @@

[PATCH v6 00/11] ref-filter: use parsing functions

2016-02-17 Thread Karthik Nayak
This series cleans up populate_value() in ref-filter, by moving out the parsing part of atoms to separate parsing functions. This ensures that parsing is only done once and also improves the modularity of the code. v1: http://thread.gmane.org/gmane.comp.version-control.git/281180 v2: http://thread

Re: [PATCH] git-cvsserver.perl: fix typo

2016-02-17 Thread Junio C Hamano
GyuYong Jung writes: > Signed-off-by: GyuYong Jung > --- > git-cvsserver.perl | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/git-cvsserver.perl b/git-cvsserver.perl > index 95e69b1..02c0445 100755 > --- a/git-cvsserver.perl > +++ b/git-cvsserver.perl > @@ -2664,7 +2664

Re: [PATCH v5 02/12] ref-filter: use strbuf_split_str_omit_term()

2016-02-17 Thread Junio C Hamano
Jeff King writes: > On Tue, Feb 16, 2016 at 04:28:10PM -0800, Junio C Hamano wrote: > >> Jeff King writes: >> >> > On Tue, Feb 16, 2016 at 04:12:08PM -0800, Junio C Hamano wrote: >> > >> >> > To be honest, though, I am now on the fence, considering the possible >> >> > whitespace issue. >> >>

Re: [PATCH v5 02/12] ref-filter: use strbuf_split_str_omit_term()

2016-02-17 Thread Eric Sunshine
On Wed, Feb 17, 2016 at 12:04 PM, Karthik Nayak wrote: > On Wed, Feb 17, 2016 at 2:39 AM, Eric Sunshine > wrote: >> My initial reaction was negative due to the heavy review burden this >> series has demanded thus far, however, my mind was changing even as I >> composed the above response. [...]

Re: GSoC 2016: applications open, deadline = Fri, 19/2

2016-02-17 Thread Thomas Gummerer
On 02/10, Matthieu Moy wrote: > Work on the application itself, and on the list of ideas. One potential idea: Make destructive git commands more safe for the user. Some commands (e.g. git reset --hard, git clean -f, etc.) can potentially destroy some of the users work. Store the information tha

Re: [PATCH v5 02/12] ref-filter: use strbuf_split_str_omit_term()

2016-02-17 Thread Karthik Nayak
On Wed, Feb 17, 2016 at 2:39 AM, Eric Sunshine wrote: > On Tue, Feb 16, 2016 at 3:49 PM, Jeff King wrote: >> On Tue, Feb 16, 2016 at 03:12:29PM -0500, Eric Sunshine wrote: >>> > Did you consider just using string_list_split for this? AFAICT, you >>> > don't care about the results being strbufs th

Re: [PATCH v5 02/12] ref-filter: use strbuf_split_str_omit_term()

2016-02-17 Thread Karthik Nayak
On Wed, Feb 17, 2016 at 12:52 AM, Jeff King wrote: > On Wed, Feb 17, 2016 at 12:30:05AM +0530, Karthik Nayak wrote: > >> Use the newly introduced strbuf_split_str_omit_term() rather than >> using strbuf_split_str() and manually removing the ',' terminator. >> >> Helped-by: Eric Sunshine >> Signed

Re: [PATCH v4 3/3] config: add '--show-origin' option to print the origin of a config value

2016-02-17 Thread Junio C Hamano
Lars Schneider writes: >> There is no need for this patch series to address this anomaly; it's >> perhaps low-hanging fruit for someone wanting to join the project. The >> only very minor wrinkle is that we'd still need to recognize --null as >> a deprecated (and undocumented) alias for --nul. >

Re: [PATCH 4/4] remote: use remote_is_configured() for add and rename

2016-02-17 Thread Johannes Schindelin
Hi Tomas, On Wed, 17 Feb 2016, Thomas Gummerer wrote: > On 02/17, Johannes Schindelin wrote: > > > > diff --git a/t/t5505-remote.sh b/t/t5505-remote.sh > > index 94079a0..19e8e34 100755 > > --- a/t/t5505-remote.sh > > +++ b/t/t5505-remote.sh > > @@ -51,6 +51,11 @@ test_expect_success setup ' > >

Re: GSoC 2016: applications open, deadline = Fri, 19/2

2016-02-17 Thread Christian Couder
Hi Johannes, On Wed, Feb 17, 2016 at 2:09 PM, Johannes Schindelin wrote: > >> Then there is also git-bisect.sh with nearly 700 lines, which is also >> not as easy. > > Nothing is easy, but bisect has a much better chance to be finally > converted into a builtin: there is already a bisect--helper

Re: [PATCH 0/3] Turn git-rebase--*.sh to external helpers

2016-02-17 Thread Duy Nguyen
On Wed, Feb 17, 2016 at 9:22 PM, Johannes Schindelin wrote: > I already started a different route locally (nothing to show yet, mostly > because I have to write emails and try to triage the bug tracker instead > of doing real work *grmbl*): add a rebase--helper and off-load heavy-duty > work from

Re: [PATCH 4/4] remote: use remote_is_configured() for add and rename

2016-02-17 Thread Thomas Gummerer
On 02/17, Johannes Schindelin wrote: > Hi Peff & Thomas, > > On Mon, 15 Feb 2016, Jeff King wrote: > > This original is quite confusing. I thought at first that there was > > perhaps something going on with allowing repeated re-configuration of > > the same remote, as long as some parameters matche

Re: [PATCH 0/3] Turn git-rebase--*.sh to external helpers

2016-02-17 Thread Johannes Schindelin
Hi, On Wed, 17 Feb 2016, Nguyễn Thái Ngọc Duy wrote: > We do want to turn all these scripts to C in the end, regardless if the > conversion is part of any GSoC. So I dug up my code and prepared this. > Now we need people to convert any git-rebase*.sh to C :) While I would love to see all these s

Re: [PATCH 3/3] rebase: turn git-rebase--*.sh into separate programs

2016-02-17 Thread Matthieu Moy
Nguyễn Thái Ngọc Duy writes: > + git_quiet=$GIT_QUIET > + git_reflog_action=$GIT_REFLOG_ACTION > + export GIT_PAGER > + # these are for write_basic_state() > + export allow_rerere_autoupdate gpg_sign_opt head_name onto > + export orig_head state_dir strategy strategy_opts

Re: [PATCH 2/3] rebase: move cleanup code to exit_rebase()

2016-02-17 Thread Matthieu Moy
Nguyễn Thái Ngọc Duy writes: > Signed-off-by: Nguyễn Thái Ngọc Duy This patch could use a little bit more verbose commit message IMHO. At this point it's not completely clear why you need to move this code to git--rebase-lib.sh. My understanding is that you want to have this code in the lib.h

Re: [PATCH 4/4] remote: use remote_is_configured() for add and rename

2016-02-17 Thread Johannes Schindelin
Hi Peff & Thomas, On Mon, 15 Feb 2016, Jeff King wrote: > On Mon, Feb 15, 2016 at 06:42:30PM +0100, Thomas Gummerer wrote: > > > Both remote add and remote rename use a slightly different hand-rolled > > check if the remote exits. The hand-rolled check may have some subtle > > cases in which it

[PATCH 3/3] rebase: turn git-rebase--*.sh into separate programs

2016-02-17 Thread Nguyễn Thái Ngọc Duy
This is the first step of turning any of these scripts into C. We can see now what variables are exchanged between git-rebase.sh and the subscript (but we don't see all in this patch, variables may have been exported earlier in git-rebase.sh) Signed-off-by: Nguyễn Thái Ngọc Duy --- Makefile

[PATCH 2/3] rebase: move cleanup code to exit_rebase()

2016-02-17 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- git-rebase--lib.sh (mode +x) | 38 ++ git-rebase.sh| 37 + 2 files changed, 39 insertions(+), 36 deletions(-) mode change 100644 => 100755 git-rebase--lib.sh diff --gi

  1   2   >