Re: Small issue with "add untracked" option of 'git add -i'

2017-06-20 Thread Kevin Daudt
On Wed, Jun 21, 2017 at 08:25:26AM +0530, Kaartic Sivaraam wrote: > > I tried applying the patch and building it locally. For some reason I > couldn't see the change in effect. What could I be missing? > Did you make sure you used the git you built, and also the relevant subcommands? What does

Re: [PATCHv2] submodules: overhaul documentation

2017-06-20 Thread Jonathan Tan
Thanks, this looks like a good explanation. Some more nits, but overall I feel like I understand this and have learned something from it. On Tue, Jun 20, 2017 at 3:56 PM, Stefan Beller wrote: > +A submodule is another Git repository tracked inside a repository. > +The tracked

[PATCH/FINALRFC] Documentation/git-submodule: cleanup

2017-06-20 Thread Kaartic Sivaraam
The "add" section for 'git-submodule' is redundant in its description and the short synopsis line. Fix it. Remove the redundant mentioning of the 'repository' argument being mandatory. The text is hard to read because of back-references, so remove those. Replace the word "humanish" by

Re: Small issue with "add untracked" option of 'git add -i'

2017-06-20 Thread Kaartic Sivaraam
On Mon, 2017-06-12 at 10:59 -0700, Junio C Hamano wrote: > Together with your other wishes, perhaps something like this is what > you have in mind.  The original tried to throw in a blank line as a > separator to help interactive users to more easily tell the boundary > of blocks of text, but it

[PATCH/FINAL] status: contextually notify user about an initial commit

2017-06-20 Thread Kaartic Sivaraam
The existing message, "Initial commit", makes sense for the commit template notifying users that it's their initial commit, but is confusing when merely checking the status of a fresh repository (or orphan branch) without having any commits yet. Change the output of "status" to say "No commits

Re: [PATCH 1/3] Contextually notify user about an initial commit

2017-06-20 Thread Kaartic Sivaraam
On Tue, 2017-06-20 at 16:41 +0200, Ævar Arnfjörð Bjarmason wrote: > Right now 1/3 breaks the test suite. That's a big no-no, any given > commit should not break the test suite to not break bisecting. > > But aside from that the general pattern we follow is that if code > behavior changes, tests

Re: [PATCH v3 11/20] path: construct correct path to a worktree's index

2017-06-20 Thread Jonathan Nieder
Subject: worktree_git_path() should not use file relocation git_path is a convenience function that usually produces a string $GIT_DIR/. Since v2.5.0-rc0~143^2~35 (git_path(): be aware of file relocation in $GIT_DIR, 2014-11-30), as a side benefit callers get support for path relocation

Re: [PATCH v3 11/20] path: construct correct path to a worktree's index

2017-06-20 Thread Jonathan Nieder
Hi again, Brandon Williams wrote: > When working with worktrees the git directory is split into two part, > the per-worktree gitdir and a commondir which contains things which are > shared among all worktrees (like the object store). With this notion of > having a split git directory, 557bd833b

Re: [PATCH v3 11/20] path: construct correct path to a worktree's index

2017-06-20 Thread Brandon Williams
On 06/20, Jonathan Nieder wrote: > Hi, > > Brandon Williams wrote: > > > When working with worktrees the git directory is split into two part, > > the per-worktree gitdir and a commondir which contains things which are > > shared among all worktrees (like the object store). With this notion of

Why 10k remotes? Was: Re: [RFC/PATCH 0/5] remote: eliminate remote->{fetch,push}_refspec and lazy parsing of refspecs

2017-06-20 Thread SZEDER Gábor
On Sat, Jun 17, 2017 at 2:33 PM, Jeff King wrote: > On Sat, Jun 17, 2017 at 02:25:39PM +0200, SZEDER Gábor wrote: >> Indeed. Even in my repos with close to 10k remotes the amount of >> memory wasted by the duplicated refspecs is not an problem, there are >> more pressing issues

Re: [PATCH v3 11/20] path: construct correct path to a worktree's index

2017-06-20 Thread Jonathan Nieder
Hi, Brandon Williams wrote: > When working with worktrees the git directory is split into two part, > the per-worktree gitdir and a commondir which contains things which are > shared among all worktrees (like the object store). With this notion of > having a split git directory, 557bd833b

[PATCHv2] submodules: overhaul documentation

2017-06-20 Thread Stefan Beller
This patch aims to detangle (a) the usage of `git-submodule` from (b) the concept of submodules and (c) how the actual implementation looks like, such as where they are configured and (d) what the best practices are. To do so, move the conceptual parts of the 'git-submodule' man page to a new man

Re: [PATCH v3 10/20] path: convert do_git_path to take a 'struct repository'

2017-06-20 Thread Jonathan Tan
On Tue, 20 Jun 2017 12:19:41 -0700 Brandon Williams wrote: > +static void do_git_path(const struct repository *repo, > + const struct worktree *wt, struct strbuf *buf, > const char *fmt, va_list args) > { > int gitdir_len; > -

Re: [PATCH v3 05/20] environment: place key repository state in the_repository

2017-06-20 Thread Jonathan Tan
On Tue, 20 Jun 2017 12:19:36 -0700 Brandon Williams wrote: > Migrate 'git_dir', 'git_common_dir', 'git_object_dir', 'git_index_file', > 'git_graft_file', and 'namespace' to be stored in 'the_repository'. > > Signed-off-by: Brandon Williams > --- > cache.h

Re: [PATCH v3 04/20] repository: introduce the repository object

2017-06-20 Thread Brandon Williams
On 06/20, Jonathan Tan wrote: > On Tue, 20 Jun 2017 12:19:35 -0700 > Brandon Williams wrote: > > > Introduce the repository object 'struct repository' which can be used to > > hold all state pertaining to a git repository. > > > > Some of the benefits of object-ifying a

Re: [RFC/PATCH] submodules: overhaul documentation

2017-06-20 Thread Stefan Beller
On Mon, Jun 19, 2017 at 11:10 AM, Brandon Williams wrote: > I would probably change the first sentence to: > > A submodule is another Git repository tracked at an arbitrary place > inside the working tree. The tracking doesn't happen at an arbitrary place, but in the

Re: [PATCH v3 04/20] repository: introduce the repository object

2017-06-20 Thread Jonathan Tan
On Tue, 20 Jun 2017 12:19:35 -0700 Brandon Williams wrote: > Introduce the repository object 'struct repository' which can be used to > hold all state pertaining to a git repository. > > Some of the benefits of object-ifying a repository are: > > 1. Make the code base more

Re: [PATCH v3 11/20] path: construct correct path to a worktree's index

2017-06-20 Thread Stefan Beller
On Tue, Jun 20, 2017 at 12:19 PM, Brandon Williams wrote: > When working with worktrees the git directory is split into two part, > the per-worktree gitdir and a commondir which contains things which are > shared among all worktrees (like the object store). With this notion of

Re: [PATCH 22/26] diff.c: color moved lines differently

2017-06-20 Thread Stefan Beller
On Tue, Jun 20, 2017 at 1:13 PM, Jonathan Tan wrote: > I just glanced through this file, because it seems similar to the > versions I have previously reviewed. Yes, this has not changed much. The thing that took so long were patches 1-20 to do. In these later patches

Re: [PATCH 22/26] diff.c: color moved lines differently

2017-06-20 Thread Jonathan Tan
I just glanced through this file, because it seems similar to the versions I have previously reviewed. I'll skip patches 23 onwards in this round of review because (i) I would be happy if just patches 1-22 were included in the tree and (ii) those patches might end up changing anyway because of

Re: [PATCH 15/26] submodule.c: migrate diff output to use emit_diff_symbol

2017-06-20 Thread Jonathan Tan
On Mon, 19 Jun 2017 19:48:05 -0700 Stefan Beller wrote: > As the submodule process is no longer attached to the same stdout as > the superprojects process, we need to pass coloring explicitly. I found this confusing - what difference does the stdout make? If they were the

Re: [PATCH 11/26] diff.c: emit_diff_symbol learns DIFF_SYMBOL_FILEPAIR

2017-06-20 Thread Jonathan Tan
On Mon, 19 Jun 2017 19:48:01 -0700 Stefan Beller wrote: > @@ -676,6 +677,14 @@ static void emit_diff_symbol(struct diff_options *o, > enum diff_symbol s, > } > emit_line(o, context, reset, line, len); > break; > + case

Re: [PATCH v3 04/20] repository: introduce the repository object

2017-06-20 Thread Stefan Beller
On Tue, Jun 20, 2017 at 12:19 PM, Brandon Williams wrote: > Introduce the repository object 'struct repository' which can be used to > hold all state pertaining to a git repository. > > Some of the benefits of object-ifying a repository are: > > 1. Make the code base more

Re: [PATCH v3 00/20] repository object

2017-06-20 Thread Stefan Beller
On Tue, Jun 20, 2017 at 12:19 PM, Brandon Williams wrote: > I decided to split up the original series into three parts in order to make > review a little bit easier. As such this series is dependent on on > 'bw/config-h' and 'bw/ls-files-sans-the-index' which should be moving

[PATCH v3 14/20] config: read config from a repository object

2017-06-20 Thread Brandon Williams
Teach the config machinery to read config information from a repository object. This involves storing a 'struct config_set' inside the repository object and adding a number of functions (repo_config*) to be able to query a repository's config. The current config API enables lazy-loading of the

[PATCH v3 16/20] submodule-config: store the_submodule_cache in the_repository

2017-06-20 Thread Brandon Williams
Refactor how 'the_submodule_cache' is handled so that it can be stored inside of a repository object. Also migrate 'the_submodule_cache' to be stored in 'the_repository'. Signed-off-by: Brandon Williams --- repository.c | 6 + repository.h | 4

[PATCH v3 19/20] repository: enable initialization of submodules

2017-06-20 Thread Brandon Williams
Introduce 'repo_submodule_init()' which performs initialization of a 'struct repository' as a submodule of another 'struct repository'. The resulting submodule can be in one of three states: 1. The submodule is initialized and has a worktree. 2. The submodule is initialized but does not

[PATCH v3 12/20] path: add repo_git_path and strbuf_repo_git_path

2017-06-20 Thread Brandon Williams
Introduce 'repo_git_path' and 'strbuf_repo_git_path' which take a repository struct and constructs a path into the repository's git directory. Signed-off-by: Brandon Williams --- path.c | 21 + path.h | 8 2 files changed, 29 insertions(+) diff

[PATCH v3 13/20] path: add repo_worktree_path and strbuf_repo_worktree_path

2017-06-20 Thread Brandon Williams
Introduce 'repo_worktree_path' and 'strbuf_repo_worktree_path' which take a repository struct and constructs a path relative to the repository's worktree. Signed-off-by: Brandon Williams --- path.c | 41 + path.h | 8 2 files

[PATCH v3 15/20] repository: add index_state to struct repo

2017-06-20 Thread Brandon Williams
Signed-off-by: Brandon Williams --- repository.c | 16 repository.h | 6 ++ 2 files changed, 22 insertions(+) diff --git a/repository.c b/repository.c index 3dcfec3b8..883e6e9e9 100644 --- a/repository.c +++ b/repository.c @@ -175,5 +175,21 @@ void

[PATCH v3 10/20] path: convert do_git_path to take a 'struct repository'

2017-06-20 Thread Brandon Williams
In preparation to adding 'git_path' like functions which operate on a 'struct repository' convert 'do_git_path' to take a 'struct repository'. Signed-off-by: Brandon Williams --- path.c | 42 -- 1 file changed, 28 insertions(+), 14

[PATCH v3 07/20] path: create path.h

2017-06-20 Thread Brandon Williams
Move all path related declarations from cache.h to a new path.h header file. This makes cache.h smaller and makes it easier to add new path related functions. Signed-off-by: Brandon Williams --- cache.h | 59 +-- path.c

[PATCH v3 09/20] path: convert strbuf_git_common_path to take a 'struct repository'

2017-06-20 Thread Brandon Williams
Signed-off-by: Brandon Williams --- path.c | 13 - path.h | 8 ++-- worktree.c | 3 ++- 3 files changed, 16 insertions(+), 8 deletions(-) diff --git a/path.c b/path.c index 2434921d8..9be6804a9 100644 --- a/path.c +++ b/path.c @@ -524,11 +524,12 @@

[PATCH v3 08/20] path: always pass in commondir to update_common_dir

2017-06-20 Thread Brandon Williams
Instead of passing in 'NULL' and having 'update_common_dir()' query for the commondir, have the callers of 'update_common_dir()' be responsible for providing the commondir. Signed-off-by: Brandon Williams --- path.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)

[PATCH v3 18/20] submodule: convert is_submodule_initialized to work on a repository

2017-06-20 Thread Brandon Williams
Convert 'is_submodule_initialized()' to take a repository object and while we're at it, lets rename the function to 'is_submodule_active()' and remove the NEEDSWORK comment. Signed-off-by: Brandon Williams --- builtin/grep.c | 3 ++- builtin/submodule--helper.c

[PATCH v3 20/20] ls-files: use repository object

2017-06-20 Thread Brandon Williams
Convert ls-files to use a repository struct and recurse submodules inprocess. Signed-off-by: Brandon Williams --- builtin/ls-files.c | 195 ++--- git.c | 2 +-

[PATCH v3 17/20] submodule: add repo_read_gitmodules

2017-06-20 Thread Brandon Williams
Teach the repo object to be able to populate the submodule_cache by reading the repository's gitmodules file. Signed-off-by: Brandon Williams --- submodule.c | 15 +++ submodule.h | 2 ++ 2 files changed, 17 insertions(+) diff --git a/submodule.c b/submodule.c

[PATCH v3 04/20] repository: introduce the repository object

2017-06-20 Thread Brandon Williams
Introduce the repository object 'struct repository' which can be used to hold all state pertaining to a git repository. Some of the benefits of object-ifying a repository are: 1. Make the code base more readable and easier to reason about. 2. Allow for working on multiple repositories,

[PATCH v3 11/20] path: construct correct path to a worktree's index

2017-06-20 Thread Brandon Williams
When working with worktrees the git directory is split into two part, the per-worktree gitdir and a commondir which contains things which are shared among all worktrees (like the object store). With this notion of having a split git directory, 557bd833b (git_path(): be aware of file relocation in

[PATCH v3 06/20] environment: store worktree in the_repository

2017-06-20 Thread Brandon Williams
Migrate 'work_tree' to be stored in 'the_repository'. Signed-off-by: Brandon Williams --- environment.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/environment.c b/environment.c index aa79ef83e..3fd4b1084 100644 --- a/environment.c +++

[PATCH v3 05/20] environment: place key repository state in the_repository

2017-06-20 Thread Brandon Williams
Migrate 'git_dir', 'git_common_dir', 'git_object_dir', 'git_index_file', 'git_graft_file', and 'namespace' to be stored in 'the_repository'. Signed-off-by: Brandon Williams --- cache.h | 1 - environment.c | 58 +-

[PATCH v3 02/20] setup: add comment indicating a hack

2017-06-20 Thread Brandon Williams
'GIT_TOPLEVEL_PREFIX_ENVIRONMENT' was added in (b58a68c1c setup: allow for prefix to be passed to git commands) to aid in fixing a bug where 'ls-files' and 'grep' were not able to properly recurse when called from within a subdirectory. Add a 'NEEDSWORK' comment indicating that this envvar should

[PATCH v3 03/20] environment: remove namespace_len variable

2017-06-20 Thread Brandon Williams
Use 'skip_prefix' instead of 'starts_with' so that we can drop the need to keep around 'namespace_len'. Signed-off-by: Brandon Williams --- environment.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/environment.c b/environment.c index

[PATCH v3 01/20] setup: don't perform lazy initialization of repository state

2017-06-20 Thread Brandon Williams
Under some circumstances (bogus GIT_DIR value or the discovered gitdir is '.git') 'setup_git_directory()' won't initialize key repository state. This leads to inconsistent state after running the setup code. To account for this inconsistent state, lazy initialization is done once a caller asks

[PATCH v3 00/20] repository object

2017-06-20 Thread Brandon Williams
I decided to split up the original series into three parts in order to make review a little bit easier. As such this series is dependent on on 'bw/config-h' and 'bw/ls-files-sans-the-index' which should be moving into 'next' soon. Due to this I was able to greatly shrink this series in terms of

Re: [RFC/PATCH] submodules: overhaul documentation

2017-06-20 Thread Stefan Beller
On Tue, Jun 20, 2017 at 11:18 AM, Jonathan Tan wrote: >> +DESCRIPTION >> +--- >> + >> +A submodule is another Git repository tracked in a subdirectory of your >> +repository. The tracked repository has its own history, which does not >> +interfere with the

Re: [PATCH] die routine: change recursion limit from 1 to 1024

2017-06-20 Thread Jeff King
On Tue, Jun 20, 2017 at 08:49:59PM +0200, Ævar Arnfjörð Bjarmason wrote: > As you can see the third most common case is that we needlessly print > out the warning, i.e. we have only one error anyway, but we can't > guarantee that, so it probably makes sense to emit it. Right, my suggestion

Re: [PATCH] die routine: change recursion limit from 1 to 1024

2017-06-20 Thread Ævar Arnfjörð Bjarmason
On Tue, Jun 20 2017, Jeff King jotted: > On Mon, Jun 19, 2017 at 10:00:36PM +, Ævar Arnfjörð Bjarmason wrote: > >> Change the recursion limit for the default die routine from a *very* >> low 1 to 1024. This ensures that infinite recursions are broken, but >> doesn't lose error messages. >>

Re: Transform log message during migration svn -> git (using git-svn)

2017-06-20 Thread Andreas Heiduk
Am 20.06.2017 um 14:32 schrieb paul.mat...@s4m.com: > Well this is a possibility, of course. Our problem is that our SVN > repository contains about 220.000 revisions currently. As a colleague of > mine said that the command you suggest might take about 4 seconds per > revision, it would take

Re: [GSoC][PATCH 4/6] submodule: port submodule subcommand status

2017-06-20 Thread Brandon Williams
On 06/20, Prathamesh Chavan wrote: > The mechanism used for porting submodule subcommand 'status' > is similar to that used for subcommand 'foreach'. nit: since 'foreach' is stalled atm it may be confusing to reference that change when it hasn't been merged in yet. > The function cmd_status from

Re: [PATCHv2] Tweak help auto-correct phrasing.

2017-06-20 Thread Kaartic Sivaraam
On Tue, 2016-12-20 at 09:02 -0500, Marc Branchaud wrote: > When auto-correct is enabled, an invalid git command prints a warning > and > a continuation message, which differs depending on whether or not > help.autoCorrect is positive or negative. > > With help.autoCorrect = 15: > >    WARNING:

Re: [PATCH/RFC] Cleanup Documentation

2017-06-20 Thread Kaartic Sivaraam
On Tue, 2017-06-20 at 09:57 -0700, Stefan Beller wrote: > canonical: "according to recognized rules or scientific laws." > sounds about right. :) > I actually used as I found it to have the meaning of "conforming to orthodox or recognized rules" :) > While this was just reflowed and not newly

Re: [GSoC][PATCH 2/6] submodule--helper: introduce get_submodule_displaypath and for_each_submodule_list

2017-06-20 Thread Brandon Williams
On 06/20, Prathamesh Chavan wrote: > Functions get_submodule_displaypath and for_each_submodule_list > for using them in the later patches, related to porting submodule > subcommands from shell to C. > These new functions are also used in ported submodule subcommand > init I didn't see anything

Re: [PATCHv2] Tweak help auto-correct phrasing.

2017-06-20 Thread Marc Branchaud
On 2017-06-20 02:04 PM, Kaartic Sivaraam wrote: On Tue, 2016-12-20 at 09:02 -0500, Marc Branchaud wrote: When auto-correct is enabled, an invalid git command prints a warning and a continuation message, which differs depending on whether or not help.autoCorrect is positive or negative. With

Re: [RFC/PATCH] submodules: overhaul documentation

2017-06-20 Thread Jonathan Tan
On Wed, 7 Jun 2017 11:53:54 -0700 Stefan Beller wrote: [snip] > +DESCRIPTION > +--- > + > +A submodule is another Git repository tracked in a subdirectory of your > +repository. The tracked repository has its own history, which does not > +interfere with the history

Re: [PATCHv2] Tweak help auto-correct phrasing.

2017-06-20 Thread Kaartic Sivaraam
On Tue, 2016-12-20 at 09:02 -0500, Marc Branchaud wrote: > When auto-correct is enabled, an invalid git command prints a warning > and > a continuation message, which differs depending on whether or not > help.autoCorrect is positive or negative. > > With help.autoCorrect = 15: > >    WARNING:

Re: [GSoC][PATCH 5/6] submodule: port submodule subcommand sync from shell to C

2017-06-20 Thread Stefan Beller
On Mon, Jun 19, 2017 at 2:50 PM, Prathamesh Chavan wrote: > The mechanism used for porting the submodule subcommand 'sync' is > similar to that of 'foreach', where we split the function cmd_sync > from shell into three functions in C, module_sync, > for_each_submodule_list and

Re: [GSoC][PATCH 1/6] dir: create function count_slashes

2017-06-20 Thread Stefan Beller
On Mon, Jun 19, 2017 at 2:50 PM, Prathamesh Chavan wrote: > Similar functions exist in apply.c and builtin/show-branch.c for > counting the number of slashes in a string. Also in the later > patches, we introduce a third caller for the same. Hence, we unify > it now by cleaning

Re: [PATCH/RFC] Cleanup Documentation

2017-06-20 Thread Stefan Beller
On Tue, Jun 20, 2017 at 9:57 AM, Stefan Beller wrote: > > With or without this nit addressed, this patch looks good to me, > Well actually not quite. The subject (and commit message) is very vague, maybe: Documentation/git-submodule: cleanup "add" section The "add"

Re: [PATCH/RFC] Cleanup Documentation

2017-06-20 Thread Stefan Beller
On Mon, Jun 19, 2017 at 8:12 PM, Kaartic Sivaraam wrote: > Make following changes to the git-submodule > documentation: > > * Remove redundancy > * Remove unclear back reference > * Use more appropriate word > * Quote important word > > Suggestions-by: Stefan

Re: Git Strange behaviour with remote deleted branch

2017-06-20 Thread Jeff King
On Mon, Jun 19, 2017 at 05:46:22PM -0400, Paul Smith wrote: > On Mon, 2017-06-19 at 23:33 +0200, Reda Lyazidi wrote: > > with git I noticed when I removed a remote branch with git push origin > > --delete > > in my clone when I used git branch -a I don't the deleted branch > > but my colleagues

Re: [PATCH] die routine: change recursion limit from 1 to 1024

2017-06-20 Thread Jeff King
On Tue, Jun 20, 2017 at 11:54:59AM -0400, Jeff King wrote: > > Now, git-grep could make use of the pluggable error facility added in > > commit c19a490e37 ("usage: allow pluggable die-recursion checks", > > 2013-04-16). > > Yeah, I think this is a bug in git-grep and should be fixed, independent

Re: [PATCH] die routine: change recursion limit from 1 to 1024

2017-06-20 Thread Jeff King
On Mon, Jun 19, 2017 at 10:00:36PM +, Ævar Arnfjörð Bjarmason wrote: > Change the recursion limit for the default die routine from a *very* > low 1 to 1024. This ensures that infinite recursions are broken, but > doesn't lose error messages. > > The intent of the existing code, as explained

Re: Transform log message during migration svn -> git (using git-svn)

2017-06-20 Thread Jeff King
On Tue, Jun 20, 2017 at 02:46:22PM +0200, Lars Schneider wrote: > > > On 20 Jun 2017, at 14:32, wrote: > > > > Well this is a possibility, of course. Our problem is that our SVN > > repository contains about 220.000 revisions currently. As a colleague

Re: [PATCH 1/3] Contextually notify user about an initial commit

2017-06-20 Thread Ævar Arnfjörð Bjarmason
On Tue, Jun 20 2017, Kaartic Sivaraam jotted: > Thanks for trying to help. A few comments regarding your suggestions. > >> * Let's do that spacing fix (unrelated fix) in its own commit. >> > Ok. That's a good point. > >> * You should add tests along with the code being changed, and >> especially

Re: "There are too many unreachable loose objects" - why don't we run 'git prune' automatically?

2017-06-20 Thread Jeff King
On Sun, Jun 18, 2017 at 03:22:29PM +0200, Lars Schneider wrote: > > To be honest, the fact that we have to write this warning at all is a > > sign that Git is not doing a very good job. The best place to spend > > effort would be to teach git-gc to pack all of the unreachable objects > > into a

Re: [RFC/PATCH v4 00/49] Add initial experimental external ODB support

2017-06-20 Thread Christian Couder
On Tue, Jun 20, 2017 at 9:54 AM, Christian Couder wrote: > > Future work > ~~~ > > First sorry about the state of this patch series, it is not as clean > as I would have liked, butI think it is interesting to get feedback > from the mailing list at this point,

Re: Better usability of stash refs

2017-06-20 Thread Robert Dailey
On Mon, Jun 19, 2017 at 3:56 PM, Jeff King wrote: > On Mon, Jun 19, 2017 at 03:32:54PM -0500, Robert Dailey wrote: > >> To drop a stash, I have to do this (example): >> >> $ git stash drop stash@{3} >> >> Using the full "stash@{N}" seems superfluous since the documentation >>

Re: [PATCH 1/3] Contextually notify user about an initial commit

2017-06-20 Thread Kaartic Sivaraam
Thanks for trying to help. A few comments regarding your suggestions. >  * Let's do that spacing fix (unrelated fix) in its own commit. > Ok. That's a good point. >   * You should add tests along with the code being changed, and > especially change tests that would fail with your new code,

Re: Transform log message during migration svn -> git (using git-svn)

2017-06-20 Thread Lars Schneider
> On 20 Jun 2017, at 14:32, wrote: > > Well this is a possibility, of course. Our problem is that our SVN > repository contains about 220.000 revisions currently. As a colleague of > mine said that the command you suggest might take about 4 seconds per

AW: Transform log message during migration svn -> git (using git-svn)

2017-06-20 Thread paul.mattke
Well this is a possibility, of course. Our problem is that our SVN repository contains about 220.000 revisions currently. As a colleague of mine said that the command you suggest might take about 4 seconds per revision, it would take about 10 days to do this for our whole repository. So of course

[PATCH] git-p4: changelist template with p4 -G change -o

2017-06-20 Thread Miguel Torroja
The option -G of p4 (python marshal output) gives more context about the data being output. That's useful when using the command "change -o" as we can distinguish between warning/error line and real change description. Some p4 plugin/hooks in the server side generates some warnings when executed.

Re: Behavior of 'git fetch' for commit hashes

2017-06-20 Thread eero.aaltonen
On 20.06.2017 01:26, Jonathan Tan wrote: > On Mon, 19 Jun 2017 10:49:36 -0700 > Jonathan Tan wrote: > >> On Mon, 19 Jun 2017 12:09:28 + >> wrote: >> >>> For version 2.13.3 > > Firstly, exactly which version of Git doesn't work? I'm

Re: Transform log message during migration svn -> git (using git-svn)

2017-06-20 Thread Lars Schneider
> On 20 Jun 2017, at 09:32, paul.mat...@s4m.com wrote: > > Hi there, > > this is actually not really a bug report, but much more a feature request > (if I did not oversee an already existing feature like this): > > We want to migrate our SVN repository to GIT and will be using git-svn for >

[RFC/PATCH v4 04/49] Add Git/Packet.pm from parts of t0021/rot13-filter.pl

2017-06-20 Thread Christian Couder
This will make it possible to reuse packet reading and writing functions in other test scripts. Signed-off-by: Christian Couder --- perl/Git/Packet.pm | 71 ++ 1 file changed, 71 insertions(+) create mode 100644

[RFC/PATCH v4 07/49] Git/Packet.pm: add packet_initialize()

2017-06-20 Thread Christian Couder
Add a function to initialize the communication. And use this function in 't/t0021/rot13-filter.pl'. Signed-off-by: Christian Couder --- perl/Git/Packet.pm | 13 + t/t0021/rot13-filter.pl | 8 +--- 2 files changed, 14 insertions(+), 7 deletions(-)

[RFC/PATCH v4 08/49] Git/Packet: add capability functions

2017-06-20 Thread Christian Couder
Add functions to help read and write capabilities. Use these functions in 't/t0021/rot13-filter.pl'. Signed-off-by: Christian Couder --- perl/Git/Packet.pm | 33 + t/t0021/rot13-filter.pl | 9 ++--- 2 files changed, 35

[RFC/PATCH v4 10/49] external odb foreach

2017-06-20 Thread Christian Couder
From: Jeff King --- external-odb.c | 14 ++ external-odb.h | 6 ++ odb-helper.c | 15 +++ odb-helper.h | 4 4 files changed, 39 insertions(+) diff --git a/external-odb.c b/external-odb.c index 1ccfa99a01..42978a3298 100644 ---

[RFC/PATCH v4 11/49] t0400: add 'put' command to odb-helper script

2017-06-20 Thread Christian Couder
Signed-off-by: Christian Couder --- t/t0400-external-odb.sh | 23 +++ 1 file changed, 23 insertions(+) diff --git a/t/t0400-external-odb.sh b/t/t0400-external-odb.sh index fe85413725..6c6da5cf4f 100755 --- a/t/t0400-external-odb.sh +++

[RFC/PATCH v4 17/49] lib-httpd: pass config file to start_httpd()

2017-06-20 Thread Christian Couder
This makes it possible to start an apache web server with different config files. This will be used in a later patch to pass a config file that makes apache store external objects. Signed-off-by: Christian Couder --- t/lib-httpd.sh | 6 -- 1 file changed, 4

[RFC/PATCH v4 44/49] odb-helper: add have_object_process()

2017-06-20 Thread Christian Couder
Signed-off-by: Christian Couder --- odb-helper.c | 103 --- 1 file changed, 91 insertions(+), 12 deletions(-) diff --git a/odb-helper.c b/odb-helper.c index 2e5d8af526..01cd6a713c 100644 --- a/odb-helper.c +++

[RFC/PATCH v4 23/49] t0420: add test with HTTP external odb

2017-06-20 Thread Christian Couder
This tests that an apache web server can be used as an external object database and store files in their native format instead of converting them to a Git object. Signed-off-by: Christian Couder --- t/t0420-transfer-http-e-odb.sh | 150

[RFC/PATCH v4 36/49] odb-helper: add read_packetized_git_object_to_fd()

2017-06-20 Thread Christian Couder
Signed-off-by: Christian Couder --- odb-helper.c | 84 +++- 1 file changed, 78 insertions(+), 6 deletions(-) diff --git a/odb-helper.c b/odb-helper.c index 0017faa36e..a27208463c 100644 --- a/odb-helper.c +++

[RFC/PATCH v4 21/49] odb-helper: add 'store_plain_objects' to 'struct odb_helper'

2017-06-20 Thread Christian Couder
This adds a configuration option odb..plainObjects and the corresponding boolean variable called 'store_plain_objects' in 'struct odb_helper' to make it possible for external object databases to store object as plain objects instead of Git objects. The existing odb_helper_fetch_object() is

[RFC/PATCH v4 25/49] external-odb: add external_odb_fault_in_object()

2017-06-20 Thread Christian Couder
Signed-off-by: Christian Couder --- external-odb.c | 21 - external-odb.h | 1 + odb-helper.c | 7 +++ odb-helper.h | 1 + 4 files changed, 25 insertions(+), 5 deletions(-) diff --git a/external-odb.c b/external-odb.c index

[RFC/PATCH v4 09/49] Add initial external odb support

2017-06-20 Thread Christian Couder
From: Jeff King Signed-off-by: Christian Couder --- Makefile| 2 + cache.h | 9 ++ external-odb.c | 115 +++ external-odb.h | 8 ++ odb-helper.c| 245

[RFC/PATCH v4 22/49] pack-objects: don't pack objects in external odbs

2017-06-20 Thread Christian Couder
Objects managed by an external ODB should not be put into pack files. Signed-off-by: Christian Couder --- builtin/pack-objects.c | 4 1 file changed, 4 insertions(+) diff --git a/builtin/pack-objects.c b/builtin/pack-objects.c index f672225def..e423f685ff 100644

[RFC/PATCH v4 39/49] odb-helper: add write_object_process()

2017-06-20 Thread Christian Couder
Signed-off-by: Christian Couder --- odb-helper.c | 76 +--- 1 file changed, 73 insertions(+), 3 deletions(-) diff --git a/odb-helper.c b/odb-helper.c index b2d86a7928..e21113c0b8 100644 --- a/odb-helper.c +++

[RFC/PATCH v4 28/49] contrib: add long-running-read-object/example.pl

2017-06-20 Thread Christian Couder
From: Ben Peart Signed-off-by: Ben Peart Signed-off-by: Christian Couder --- contrib/long-running-read-object/example.pl | 114 1 file changed, 114 insertions(+) create mode 100644

[RFC/PATCH v4 20/49] lib-httpd: add apache-e-odb.conf

2017-06-20 Thread Christian Couder
This is an apache config file to test external object databases. It uses the upload.sh and list.sh cgi that have been added previously to make apache store external objects. Signed-off-by: Christian Couder --- t/lib-httpd/apache-e-odb.conf | 214

[RFC/PATCH v4 35/49] Add t0460 to test passing git objects

2017-06-20 Thread Christian Couder
Signed-off-by: Christian Couder --- t/t0460-read-object-git.sh | 29 t/t0460/read-object-git| 67 ++ 2 files changed, 96 insertions(+) create mode 100755 t/t0460-read-object-git.sh create mode 100755

[RFC/PATCH v4 24/49] odb-helper: start fault in implementation

2017-06-20 Thread Christian Couder
Signed-off-by: Christian Couder --- external-odb.c | 24 ++-- odb-helper.c | 30 -- odb-helper.h | 8 +++- t/t0400-external-odb.sh| 2 ++

[RFC/PATCH v4 45/49] clone: add initial param to write_remote_refs()

2017-06-20 Thread Christian Couder
Signed-off-by: Christian Couder --- builtin/clone.c | 19 +-- 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/builtin/clone.c b/builtin/clone.c index 370a233d22..bd690576e6 100644 --- a/builtin/clone.c +++ b/builtin/clone.c @@ -572,7 +572,7

[RFC/PATCH v4 46/49] clone: add --initial-refspec option

2017-06-20 Thread Christian Couder
Signed-off-by: Christian Couder --- builtin/clone.c | 55 ++- 1 file changed, 54 insertions(+), 1 deletion(-) diff --git a/builtin/clone.c b/builtin/clone.c index bd690576e6..dda0ad360b 100644 --- a/builtin/clone.c +++

[RFC/PATCH v4 43/49] odb-helper: advertise 'put' capability

2017-06-20 Thread Christian Couder
Signed-off-by: Christian Couder --- odb-helper.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/odb-helper.c b/odb-helper.c index 2cd1f25e83..2e5d8af526 100644 --- a/odb-helper.c +++ b/odb-helper.c @@ -67,7 +67,11 @@ static int

[RFC/PATCH v4 48/49] Add test for 'clone --initial-refspec'

2017-06-20 Thread Christian Couder
Signed-off-by: Christian Couder --- t/t5616-clone-initial-refspec.sh | 48 1 file changed, 48 insertions(+) create mode 100755 t/t5616-clone-initial-refspec.sh diff --git a/t/t5616-clone-initial-refspec.sh

[RFC/PATCH v4 41/49] external-odb: add external_odb_do_fetch_object()

2017-06-20 Thread Christian Couder
Signed-off-by: Christian Couder --- external-odb.c | 52 ++-- 1 file changed, 30 insertions(+), 22 deletions(-) diff --git a/external-odb.c b/external-odb.c index 8c2570b2e7..c39f207dd3 100644 --- a/external-odb.c +++

[RFC/PATCH v4 49/49] t: add t0430 to test cloning using bundles

2017-06-20 Thread Christian Couder
Signed-off-by: Christian Couder --- t/t0430-clone-bundle-e-odb.sh | 91 +++ 1 file changed, 91 insertions(+) create mode 100755 t/t0430-clone-bundle-e-odb.sh diff --git a/t/t0430-clone-bundle-e-odb.sh

[RFC/PATCH v4 42/49] odb-helper: advertise 'have' capability

2017-06-20 Thread Christian Couder
Signed-off-by: Christian Couder --- odb-helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/odb-helper.c b/odb-helper.c index e21113c0b8..2cd1f25e83 100644 --- a/odb-helper.c +++ b/odb-helper.c @@ -67,7 +67,7 @@ static int

[RFC/PATCH v4 47/49] clone: disable external odb before initial clone

2017-06-20 Thread Christian Couder
Signed-off-by: Christian Couder --- builtin/clone.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/builtin/clone.c b/builtin/clone.c index dda0ad360b..a0d7b2bd2f 100644 --- a/builtin/clone.c +++ b/builtin/clone.c @@ -933,6 +933,7 @@ int cmd_clone(int

  1   2   >