Re: [RFC/PATCH] clone: add `--shallow-submodules` flag

2016-03-12 Thread Junio C Hamano
Stefan Beller writes: > Why is it interesting for submodules but not for standard repositories? > > If I clone a repository without submodules, it is also not recorded > that I cloned with an explicit depth=1. If you fetch, you may end up with > a deeper history as git fetch

[PATCH] sequencer.c: fix detection of duplicate s-o-b

2016-03-12 Thread Willy Tarreau
Hi, after I upgraded my machine, I switched from git 1.7.12.2 to 2.6.4 and experienced an annoying regression when dealing with stable kernel backports. I'm using a "dorelease" script which relies on git-cherry-pick's ability to properly detect duplicate s-o-b to ensure that all merged commits

Graph sloc tool for git repos

2016-03-12 Thread Kai Hendry
Hi there, I penned a script to plot SLOC of a git project using GNUplot & I thought the fastest way to count code fluctuations was via `git show --numstat`. However that requires some awk counting of the lines:

[PATCH/RFC/GSoC 16/17] editor: implement git_sequence_editor() and launch_sequence_editor()

2016-03-12 Thread Paul Tan
Signed-off-by: Paul Tan --- cache.h | 1 + editor.c | 27 +-- strbuf.h | 1 + 3 files changed, 27 insertions(+), 2 deletions(-) diff --git a/cache.h b/cache.h index aa5e97c..d7a6fc6 100644 --- a/cache.h +++ b/cache.h @@ -1222,6 +1222,7 @@ extern

[PATCH/RFC/GSoC 13/17] rebase-todo: introduce rebase_todo_list

2016-03-12 Thread Paul Tan
Implement rebase_todo_list, which is a resizable array of rebase_todo_items. Signed-off-by: Paul Tan --- rebase-todo.c | 107 ++ rebase-todo.h | 27 +++ 2 files changed, 134 insertions(+) diff --git

[PATCH/RFC/GSoC 08/17] rebase-common: let refresh_and_write_cache() take a flags argument

2016-03-12 Thread Paul Tan
refresh_and_write_cache() is a handy function for refreshing the index and writing the resulting index back to the filesystem. However, it always calls refresh_cache() with REFRESH_QUIET. Allow callers to modify the behavior of refresh_cache() by allowing callers to pass a flags argument to

[PATCH/RFC/GSoC 12/17] rebase-todo: introduce rebase_todo_item

2016-03-12 Thread Paul Tan
In an interactive rebase, commands are read and executed from a todo list (.git/rebase-merge/git-rebase-todo) to perform the rebase. In the upcoming re-implementation of git-rebase -i in C, it is useful to be able to parse each command into a data structure which can then be operated on.

[PATCH/RFC/GSoC 10/17] rebase-common: implement cache_has_uncommitted_changes()

2016-03-12 Thread Paul Tan
In the upcoming git-rebase-to-C rewrite, it is a common opertation to check if the index has uncommitted changes, so that rebase can complain that the index is dirty, or commit the uncommitted changes in the index. builtin/pull.c already implements the function we want. Move it to rebase-common.c

[PATCH/RFC/GSoC 14/17] status: use rebase_todo_list

2016-03-12 Thread Paul Tan
Since 84e6fb9 (status: give more information during rebase -i, 2015-07-06), git status during an interactive rebase will show the list of commands that are done and yet to be done. It implemented its own hand-rolled parser in order to achieve this. Now that we are able to fully parse interactive

[PATCH/RFC/GSoC 06/17] rebase-am: introduce am backend for builtin rebase

2016-03-12 Thread Paul Tan
Since 7f59dbb (Rewrite rebase to use git-format-patch piped to git-am., 2005-11-14), git-rebase will by default use "git am" to rebase commits. This is done by first checking out to the new base commit, generating a series of patches with the commits to replay, and then applying them with git-am.

[PATCH/RFC/GSoC 09/17] rebase-common: implement cache_has_unstaged_changes()

2016-03-12 Thread Paul Tan
In the upcoming git-rebase-to-C rewrite, it is a common operation to check if the worktree has unstaged changes, so that it can complain that the worktree is dirty. builtin/pull.c already implements this function. Move it to rebase-common.c so that it can be shared between all rebase backends and

[PATCH/RFC/GSoC 11/17] rebase-merge: introduce merge backend for builtin rebase

2016-03-12 Thread Paul Tan
Since 58634db (rebase: Allow merge strategies to be used when rebasing, 2006-06-21), git-rebase supported rebasing with a merge strategy when the -m switch is used. Re-implement a skeletal version of the above method of rebasing in a new rebase-merge backend for our builtin-rebase. This skeletal

[PATCH/RFC/GSoC 07/17] rebase-common: implement refresh_and_write_cache()

2016-03-12 Thread Paul Tan
In the upcoming git-rebase to C rewrite, it is a common operation to refresh the index and write the resulting index. builtin/am.c already implements refresh_and_write_cache(), which is what we want. Move it to rebase-common.c, so that it can be shared with all the rebase backends, including

[PATCH/RFC/GSoC 17/17] rebase-interactive: introduce interactive backend for builtin rebase

2016-03-12 Thread Paul Tan
Since 1b1dce4 (Teach rebase an interactive mode, 2007-06-25), git-rebase supports an interactive mode when passed the -i switch. In interactive mode, git-rebase allows users to edit the list of patches (using the user's GIT_SEQUENCE_EDITOR), so that the user can reorder, edit and delete patches.

[PATCH/RFC/GSoC 15/17] wrapper: implement append_file()

2016-03-12 Thread Paul Tan
Signed-off-by: Paul Tan --- cache.h | 1 + wrapper.c | 23 +++ 2 files changed, 24 insertions(+) diff --git a/cache.h b/cache.h index 55d443e..aa5e97c 100644 --- a/cache.h +++ b/cache.h @@ -1700,6 +1700,7 @@ static inline ssize_t write_str_in_full(int

[PATCH/RFC/GSoC 05/17] rebase-options: implement rebase_options_load() and rebase_options_save()

2016-03-12 Thread Paul Tan
These functions can be used for loading and saving common rebase options into a state directory. Signed-off-by: Paul Tan --- rebase-common.c | 69 + rebase-common.h | 4 2 files changed, 73 insertions(+) diff

[PATCH/RFC/GSoC 03/17] builtin-rebase: implement skeletal builtin rebase

2016-03-12 Thread Paul Tan
Signed-off-by: Paul Tan --- Makefile | 5 + builtin.h| 1 + builtin/rebase.c | 31 +++ git.c| 1 + 4 files changed, 34 insertions(+), 4 deletions(-) create mode 100644 builtin/rebase.c diff --git a/Makefile

[PATCH/RFC/GSoC 02/17] sha1_name: implement get_oid() and friends

2016-03-12 Thread Paul Tan
5f7817c (define a structure for object IDs, 2015-03-13) introduced the object_id struct to replace the used of unsigned char[] arrays to hold object IDs. This gives us the benefit of compile-time checking for misuse. To fully take advantage of compile-time type-checking, introduce the get_oid_*()

[PATCH/RFC/GSoC 00/17] A barebones git-rebase in C

2016-03-12 Thread Paul Tan
Hi all, Last year I rewrote git-am from shell script to C. This succeeded in speeding up a non-interactive git-rebase by 6-7x[1], which is really handly when rebasing multiple topic branches. [1] http://thread.gmane.org/gmane.comp.version-control.git/271967 However, it turns out that when

[PATCH/RFC/GSoC 01/17] perf: introduce performance tests for git-rebase

2016-03-12 Thread Paul Tan
To determine the speedup (or slowdown) of the upcoming git-rebase rewrite to C, add a simple performance test for each of the 3 git-rebase backends (am, merge and interactive). Signed-off-by: Paul Tan --- t/perf/p3400-rebase.sh | 25 +

Re: [ANNOUNCE] Git v2.8.0-rc2

2016-03-12 Thread Max Horn
> On 11 Mar 2016, at 00:04, Junio C Hamano wrote: > > A release candidate Git v2.8.0-rc2 is now available for testing > at the usual places. It is comprised of 459 non-merge commits > since v2.7.0, contributed by 60 people, 19 of which are new faces. > [...] > Updates