[PATCH 2/4] push, fetch: error out for submodule entries not pointing to commits

2017-09-12 Thread Jonathan Nieder
<sbel...@google.com> Signed-off-by: Jonathan Nieder <jrnie...@gmail.com> --- submodule.c| 33 + t/t5531-deep-submodule-push.sh | 10 ++ 2 files changed, 35 insertions(+), 8 deletions(-) diff --git a/submodule.c b/submodule.

[PATCH 1/4] pack: make packed_git_mru global a value instead of a pointer

2017-09-12 Thread Jonathan Nieder
-by: Stefan Beller <sbel...@google.com> Signed-off-by: Jonathan Nieder <jrnie...@gmail.com> Acked-by: Jeff King <p...@peff.net> --- Unchanged from https://public-inbox.org/git/20170830064827.gb153...@aiede.mtv.corp.google.com/. I agree with the comments there that it would be nice to ma

[PATCH 0/4] Fixes from the per-repository object store series

2017-09-12 Thread Jonathan Nieder
should make them easier to review and for people to benefit from these fixes without having to wait for the rest of the series to settle. Thoughts of all kinds welcome. Jonathan Nieder (1): pack: make packed_git_mru global a value instead of a pointer Stefan Beller (3): push, fetch: error out

Re: Commit dropped when swapping commits with rebase -i -p

2017-09-01 Thread Jonathan Nieder
Hi, Sebastian Schuberth wrote: > On Wed, Aug 30, 2017 at 8:07 PM, Martin Ågren wrote: >> The man-page for git rebase says that combining -p with -i is "generally >> not a good idea unless you know what you are doing (see BUGS below)". > > Thanks for pointing this out

Re: [PATCH] hashmap: add API to disable item counting when threaded

2017-09-01 Thread Jonathan Nieder
Hi, Johannes Schindelin wrote: > On Wed, 30 Aug 2017, Jeff Hostetler wrote: >> This is to address concerns raised by ThreadSanitizer on the mailing >> list about threaded unprotected R/W access to map.size with my previous >> "disallow rehash" change (0607e10009ee4e37cb49b4cec8d28a9dda1656a4).

Re: [PATCH] doc/for-each-ref: explicitly specify option names

2017-09-01 Thread Jonathan Nieder
Kevin Daudt wrote: > For count, sort and format, only the argument names were listed under > OPTIONS, not the option names. > > Add the option names to make it clear the options exist nit: missing full-stop (.) at end of sentence. > Signed-off-by: Kevin Daudt > --- >

Re: [PATCH] pull: honor submodule.recurse config option

2017-09-01 Thread Jonathan Nieder
Hi, Nicolas Morey-Chaisemartin wrote: > git pull used to not parse the submodule.recurse config option and simply > consider the --recurse-submodules CLI option. > When using the config option, submodules would only be fetched recursively > while the CLi option would tigger both fetch and

Re: [PATCH 0/1] Add stash entry count summary to short status output

2017-08-31 Thread Jonathan Nieder
Hi Sonny, Sonny Michaud wrote: > Any assistance would be greatly appreciated; I just wanted to get > started by hacking first and asking questions later!      Welcome to the Git project, and sorry for the silence before. Getting to see what people are working on is one of

[PATCH 39/39] pack: allow sha1_loose_object_info to handle arbitrary repositories

2017-08-30 Thread Jonathan Nieder
Signed-off-by: Stefan Beller <sbel...@google.com> Signed-off-by: Jonathan Nieder <jrnie...@gmail.com> --- That's the end of the series. Thanks for reading. sha1_file.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/sha1_file.c b/sha1_file.c inde

[PATCH 37/39] pack: allow map_sha1_file_1 to handle arbitrary repositories

2017-08-30 Thread Jonathan Nieder
Signed-off-by: Stefan Beller <sbel...@google.com> Signed-off-by: Jonathan Nieder <jrnie...@gmail.com> --- sha1_file.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/sha1_file.c b/sha1_file.c index 930705f59b..7fc5ebf2af 100644 --- a/sha1_file.c +++ b

[PATCH 38/39] pack: allow map_sha1_file to handle arbitrary repositories

2017-08-30 Thread Jonathan Nieder
Signed-off-by: Stefan Beller <sbel...@google.com> Signed-off-by: Jonathan Nieder <jrnie...@gmail.com> --- object-store.h | 3 +-- sha1_file.c| 5 +++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/object-store.h b/object-store.h index fe2187fd65..57b8d

[PATCH 36/39] pack: allow open_sha1_file to handle arbitrary repositories

2017-08-30 Thread Jonathan Nieder
Signed-off-by: Stefan Beller <sbel...@google.com> Signed-off-by: Jonathan Nieder <jrnie...@gmail.com> --- sha1_file.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/sha1_file.c b/sha1_file.c index 282ed7bd1b..930705f59b 100644 --- a/sha1_file.c +++ b

[PATCH 35/39] pack: allow stat_sha1_file to handle arbitrary repositories

2017-08-30 Thread Jonathan Nieder
Signed-off-by: Stefan Beller <sbel...@google.com> Signed-off-by: Jonathan Nieder <jrnie...@gmail.com> --- sha1_file.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/sha1_file.c b/sha1_file.c index ac57eea0f2..282ed7bd1b 100644 --- a/sha1_file.c +++ b

[PATCH 34/39] pack: allow sha1_file_name to handle arbitrary repositories

2017-08-30 Thread Jonathan Nieder
Signed-off-by: Stefan Beller <sbel...@google.com> Signed-off-by: Jonathan Nieder <jrnie...@gmail.com> --- object-store.h | 3 +-- sha1_file.c| 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/object-store.h b/object-store.h index 518da80367..fe218

[PATCH 32/39] pack: allow prepare_packed_git to handle arbitrary repositories

2017-08-30 Thread Jonathan Nieder
Signed-off-by: Stefan Beller <sbel...@google.com> Signed-off-by: Jonathan Nieder <jrnie...@gmail.com> --- packfile.c | 18 +- packfile.h | 3 +-- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/packfile.c b/packfile.c index 4652be0b6e..23a83

[PATCH 33/39] pack: allow reprepare_packed_git to handle arbitrary repositories

2017-08-30 Thread Jonathan Nieder
Signed-off-by: Stefan Beller <sbel...@google.com> Signed-off-by: Jonathan Nieder <jrnie...@gmail.com> --- packfile.c | 8 packfile.h | 3 +-- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/packfile.c b/packfile.c index 23a835f7fb..67274d01fd 100644 --- a/pack

[PATCH 30/39] pack: allow prepare_packed_git_mru to handle arbitrary repositories

2017-08-30 Thread Jonathan Nieder
Signed-off-by: Stefan Beller <sbel...@google.com> Signed-off-by: Jonathan Nieder <jrnie...@gmail.com> --- packfile.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/packfile.c b/packfile.c index 977e714d9a..9bb93ce256 100644 --- a/packfile.c +++

[PATCH 31/39] pack: allow prepare_packed_git_one to handle arbitrary repositories

2017-08-30 Thread Jonathan Nieder
Signed-off-by: Stefan Beller <sbel...@google.com> Signed-off-by: Jonathan Nieder <jrnie...@gmail.com> --- packfile.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/packfile.c b/packfile.c index 9bb93ce256..4652be0b6e 100644 --- a/packfile.c +++ b/packfile

[PATCH 28/39] pack: allow install_packed_git to handle arbitrary repositories

2017-08-30 Thread Jonathan Nieder
Signed-off-by: Stefan Beller <sbel...@google.com> Signed-off-by: Jonathan Nieder <jrnie...@gmail.com> --- packfile.c | 6 +++--- packfile.h | 3 +-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/packfile.c b/packfile.c index 86c3964018..51af035965 100644 --- a/pack

[PATCH 29/39] pack: allow rearrange_packed_git to handle arbitrary repositories

2017-08-30 Thread Jonathan Nieder
Signed-off-by: Stefan Beller <sbel...@google.com> Signed-off-by: Jonathan Nieder <jrnie...@gmail.com> --- packfile.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/packfile.c b/packfile.c index 51af035965..977e714d9a 100644 --- a/packfile.c +++ b/packfile.

[PATCH 27/39] object-store: allow foreach_alt_odb to handle arbitrary repositories

2017-08-30 Thread Jonathan Nieder
From: Stefan Beller <sbel...@google.com> Signed-off-by: Stefan Beller <sbel...@google.com> Signed-off-by: Jonathan Nieder <jrnie...@gmail.com> --- object-store.h | 3 +-- sha1_file.c| 14 +++--- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/objec

[PATCH 26/39] object-store: allow prepare_alt_odb to handle arbitrary repositories

2017-08-30 Thread Jonathan Nieder
From: Stefan Beller <sbel...@google.com> Signed-off-by: Jonathan Nieder <jrnie...@gmail.com> Signed-off-by: Stefan Beller <sbel...@google.com> --- cache.h| 4 object-store.h | 3 +-- sha1_file.c| 65 ++---

[PATCH 25/39] sha1_file: allow alt_odb_usable to handle arbitrary repositories

2017-08-30 Thread Jonathan Nieder
Signed-off-by: Jonathan Nieder <jrnie...@gmail.com> Signed-off-by: Stefan Beller <sbel...@google.com> --- sha1_file.c | 16 +--- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/sha1_file.c b/sha1_file.c index e7c86e5363..b854cad970 100644 --- a/sha1_

[PATCH 24/39] pack: add repository argument to map_sha1_file

2017-08-30 Thread Jonathan Nieder
passing a repository other than the_repository at compile time. While at it, move the declaration to object-store.h, where it should be easier to find. Signed-off-by: Stefan Beller <sbel...@google.com> Signed-off-by: Jonathan Nieder <jrnie...@gmail.com> --- cache.h| 1 - object

[PATCH 23/39] pack: add repository argument to sha1_file_name

2017-08-30 Thread Jonathan Nieder
passing a repository other than the_repository at compile time. While at it, move the declaration to object-store.h, where it should be easier to find. Signed-off-by: Stefan Beller <sbel...@google.com> Signed-off-by: Jonathan Nieder <jrnie...@gmail.com> --- cache.h| 8 --

[PATCH 22/39] pack: add repository argument to reprepare_packed_git

2017-08-30 Thread Jonathan Nieder
/packed_git.cocci. As with the previous commits, use a macro to catch callers passing a repository other than the_repository at compile time. Signed-off-by: Stefan Beller <sbel...@google.com> Signed-off-by: Jonathan Nieder <jrnie...@gmail.com> --- builtin/gc.c| 2

[PATCH 21/39] pack: add repository argument to prepare_packed_git

2017-08-30 Thread Jonathan Nieder
/packed_git.cocci. As with the previous commits, use a macro to catch callers passing a repository other than the_repository at compile time. Signed-off-by: Stefan Beller <sbel...@google.com> Signed-off-by: Jonathan Nieder <jrnie...@gmail.com> --- builtin/count-objects.c | 2 +- bu

[PATCH 20/39] pack: add repository argument to prepare_packed_git_mru

2017-08-30 Thread Jonathan Nieder
to catch callers passing a repository other than the_repository at compile time. Signed-off-by: Stefan Beller <sbel...@google.com> Signed-off-by: Jonathan Nieder <jrnie...@gmail.com> --- packfile.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packfile.c b/pack

[PATCH 19/39] pack: add repository argument to rearrange_packed_git

2017-08-30 Thread Jonathan Nieder
callers passing a repository other than the_repository at compile time. Signed-off-by: Stefan Beller <sbel...@google.com> Signed-off-by: Jonathan Nieder <jrnie...@gmail.com> --- packfile.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packfile.c b/pack

[PATCH 18/39] pack: add repository argument to prepare_packed_git_one

2017-08-30 Thread Jonathan Nieder
to catch callers passing a repository other than the_repository at compile time. Signed-off-by: Stefan Beller <sbel...@google.com> Signed-off-by: Jonathan Nieder <jrnie...@gmail.com> --- packfile.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/packfile.c b/pack

[PATCH 17/39] pack: add repository argument to install_packed_git

2017-08-30 Thread Jonathan Nieder
callers passing a repository other than the_repository at compile time. Signed-off-by: Stefan Beller <sbel...@google.com> Signed-off-by: Jonathan Nieder <jrnie...@gmail.com> --- fast-import.c | 2 +- http.c| 3 ++- packfile.c| 4 ++-- packfile.h| 3 ++- 4 files changed,

[PATCH 16/39] object-store: add repository argument to foreach_alt_odb

2017-08-30 Thread Jonathan Nieder
ry yet. As with the previous commits, use a macro to catch callers passing a repository other than the_repository at compile time. While at it, move the declaration to object-store.h, where it should be easier to find. Signed-off-by: Stefan Beller <sbel...@google.com> Signed-off-by: Jonathan Nieder <jrn

[PATCH 15/39] object-store: add repository argument to prepare_alt_odb

2017-08-30 Thread Jonathan Nieder
ry yet. As with the previous commits, use a macro to catch callers passing a repository other than the_repository at compile time. While at it, move the declaration to object-store.h, where it should be easier to find. Signed-off-by: Stefan Beller <sbel...@google.com> Signed-off-by: Jonathan Nieder <jrn

[PATCH 14/39] sha1_file: add repository argument to sha1_loose_object_info

2017-08-30 Thread Jonathan Nieder
ry yet. As with the previous commits, use a macro to catch callers passing a repository other than the_repository at compile time. Signed-off-by: Stefan Beller <sbel...@google.com> Signed-off-by: Jonathan Nieder <jrnie...@gmail.com> --- sha1_file.c | 9 + 1 file changed, 5 insertio

[PATCH 13/39] sha1_file: add repository argument to map_sha1_file_1

2017-08-30 Thread Jonathan Nieder
ry yet. As with the previous commits, use a macro to catch callers passing a repository other than the_repository at compile time. Signed-off-by: Stefan Beller <sbel...@google.com> Signed-off-by: Jonathan Nieder <jrnie...@gmail.com> --- sha1_file.c | 11 ++- 1 file changed, 6 insertio

[PATCH 12/39] sha1_file: add repository argument to open_sha1_file

2017-08-30 Thread Jonathan Nieder
ry yet. As with the previous commits, use a macro to catch callers passing a repository other than the_repository at compile time. Signed-off-by: Stefan Beller <sbel...@google.com> Signed-off-by: Jonathan Nieder <jrnie...@gmail.com> --- sha1_file.c | 6 -- 1 file changed, 4 insertions(+), 2 deleti

[PATCH 11/39] sha1_file: add repository argument to stat_sha1_file

2017-08-30 Thread Jonathan Nieder
ry yet. As with the previous commits, use a macro to catch callers passing a repository other than the_repository at compile time. Signed-off-by: Stefan Beller <sbel...@google.com> Signed-off-by: Jonathan Nieder <jrnie...@gmail.com> --- sha1_file.c | 9 + 1 file changed, 5 insertions(+), 4

[PATCH 10/39] sha1_file: add repository argument to link_alt_odb_entries

2017-08-30 Thread Jonathan Nieder
ry yet. As with the previous commits, use a macro to catch callers passing a repository other than the_repository at compile time. Signed-off-by: Stefan Beller <sbel...@google.com> Signed-off-by: Jonathan Nieder <jrnie...@gmail.com> --- sha1_file.c | 19 +-- 1 file changed, 1

[PATCH 09/39] sha1_file: add repository argument to read_info_alternates

2017-08-30 Thread Jonathan Nieder
ry yet. As with the previous commit, use a macro to catch callers passing a repository other than the_repository at compile time. Signed-off-by: Stefan Beller <sbel...@google.com> Signed-off-by: Jonathan Nieder <jrnie...@gmail.com> --- sha1_file.c | 11 +++ 1 file changed, 7 insertio

[PATCH 08/39] sha1_file: add repository argument to link_alt_odb_entry

2017-08-30 Thread Jonathan Nieder
ry yet. As with the previous commit, use a macro to catch callers passing a repository other than the_repository at compile time. Signed-off-by: Stefan Beller <sbel...@google.com> Signed-off-by: Jonathan Nieder <jrnie...@gmail.com> --- sha1_file.c | 8 +--- 1 file changed, 5 insertions(+), 3

[PATCH 07/39] sha1_file: add repository argument to alt_odb_usable

2017-08-30 Thread Jonathan Nieder
common compilers like gcc 4.8.4 do not consider "r == the_repository" a compile-time constant. Signed-off-by: Stefan Beller <sbel...@google.com> Signed-off-by: Jonathan Nieder <jrnie...@gmail.com> --- sha1_file.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-)

[PATCH 06/39] pack: move approximate object count to object store

2017-08-30 Thread Jonathan Nieder
-by: Stefan Beller <sbel...@google.com> Signed-off-by: Jonathan Nieder <jrnie...@gmail.com> --- object-store.h | 10 +- packfile.c | 11 +-- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/object-store.h b/object-store.h index 14129fbba1..99f77

[PATCH 04/39] object-store: move packed_git and packed_git_mru to object store

2017-08-30 Thread Jonathan Nieder
#includes of repository.h and object-store.h where needed. Signed-off-by: Stefan Beller <sbel...@google.com> Signed-off-by: Jonathan Nieder <jrnie...@gmail.com> --- builtin/count-objects.c | 6 -- builtin/fsck.c | 7 +-- builtin/gc.c

[PATCH 05/39] pack: move prepare_packed_git_run_once to object store

2017-08-30 Thread Jonathan Nieder
Each repository's object store can be initialized independently, so they must not share a run_once variable. Signed-off-by: Stefan Beller <sbel...@google.com> Signed-off-by: Jonathan Nieder <jrnie...@gmail.com> --- object-store.h | 8 +++- packfile.c | 7 +++ 2 files

[PATCH 03/39] object-store: move alt_odb_list and alt_odb_tail to object store

2017-08-30 Thread Jonathan Nieder
Signed-off-by: Stefan Beller <sbel...@google.com> Signed-off-by: Jonathan Nieder <jrnie...@gmail.com> --- builtin/fsck.c | 4 +++- cache.h| 4 ++-- object-store.h | 6 +- packfile.c | 3 ++- sha1_file.c| 25 - sha1_name.c| 3 ++- 6

[PATCH 02/39] repository: introduce object store field

2017-08-30 Thread Jonathan Nieder
struct will gain members very soon (starting with the next patch). Signed-off-by: Stefan Beller <sbel...@google.com> Signed-off-by: Jonathan Nieder <jrnie...@gmail.com> --- Are there any straightforward ways to avoid the empty struct? Should the struct have a placeholder member to avo

[PATCH 01/39] pack: make packed_git_mru global a value instead of a pointer

2017-08-30 Thread Jonathan Nieder
-by: Stefan Beller <sbel...@google.com> Signed-off-by: Jonathan Nieder <jrnie...@gmail.com> --- builtin/pack-objects.c | 4 ++-- cache.h| 4 ++-- packfile.c | 12 +--- 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/builtin/pack-objects.c b/

[PATCH 00/39] per-repository object store, part 1

2017-08-30 Thread Jonathan Nieder
ds welcome, as always. Thanks, Jonathan Nieder (24): pack: make packed_git_mru global a value instead of a pointer object-store: move packed_git and packed_git_mru to object store struct pack: move prepare_packed_git_run_once to object store struct pack: move approximate object count

Re: git signed push server-side

2017-08-25 Thread Jonathan Nieder
+Dave Borowitz, who implemented push cert handling in JGit and Gerrit Hi Ian, Ian Jackson wrote[1]: > I have been investigating git signed pushes. I found a number of > infelicities in the server side implementation which make using this > in practice rather difficult. I'm emailing here

Re: [RFC 0/7] transitioning to protocol v2

2017-08-25 Thread Jonathan Nieder
Hi, Jeff King wrote: > On Thu, Aug 24, 2017 at 03:53:21PM -0700, Brandon Williams wrote: >> Another version of Git's wire protocol is a topic that has been discussed and >> attempted by many in the community over the years. The biggest challenge, as >> far as I understand, has been coming up

Re: How to force a push to succeed?

2017-08-23 Thread Jonathan Nieder
Hi Jeffrey, Jeffrey Walton wrote: > From another testing machine, it looks like the changes have not been > backed out. The previous operation un-did the ADX gear because it was > an evolutionary dead-end. > > via$ git pull > From https://github.com/noloader/cryptopp > + 66654dd...559fc3b

[PATCH v2 4/4] vcs-svn: move remaining repo_tree functions to fast_export.h

2017-08-22 Thread Jonathan Nieder
-06-22) or an svn_ prefix that would clash with libsvn (in case someone wants to link this code with libsvn some day). Signed-off-by: Jonathan Nieder <jrnie...@gmail.com> --- The only change is the commit message. These functions are already namespaced on the bc/vcs-svn-cleanup, so added

[PATCH v2 3/4] vcs-svn: remove repo_delete wrapper function

2017-08-22 Thread Jonathan Nieder
Since v1.7.10-rc0~118^2~4^2~4^2~3 (vcs-svn: pass paths through to fast-import, 2010-12-13) this is an alias for fast_export_delete. Remove the unnecessary layer of indirection. No functional change intended. Signed-off-by: Jonathan Nieder <jrnie...@gmail.com> --- Unchanged. vcs-svn/repo_

[PATCH v2 2/4] vcs-svn: remove custom mode constants

2017-08-22 Thread Jonathan Nieder
In the rest of Git, these modes are spelled as S_IFDIR, S_IFREG | 0644, S_IFREG | 0755, and S_IFLNK. Use the same constants in svn-fe for simplicity and consistency. No functional change intended. Signed-off-by: Jonathan Nieder <jrnie...@gmail.com> --- Unchanged. vcs-svn/fast_export.

[PATCH v2 1/4] vcs-svn: remove more unused prototypes and declarations

2017-08-22 Thread Jonathan Nieder
I forgot to remove these in v1.7.10-rc0~118^2~4^2~5^2~4 (vcs-svn: eliminate repo_tree structure, 2010-12-10). This finishes what was started in commit 36f63b50 (vcs-svn: remove unused prototypes, 2017-08-21). Signed-off-by: Jonathan Nieder <jrnie...@gmail.com> --- vcs-svn/repo_tree.h | 3

[PATCH v2 bc/vcs-svn-cleanup] vcs-svn: remove repo_tree library

2017-08-22 Thread Jonathan Nieder
Hi again, Jonathan Nieder wrote: > This is an alternative to bc/vcs-svn-cleanup from 'next'. Those > patches weren't cc-ed to me and I missed them --- sorry about that. I > can rebase on top of them if that is more convenient. Here is the same series rebased on top of bc/vcs-sv

Re: [PATCH] vcs-svn/repo_tree.h: remove repo_init declaration

2017-08-22 Thread Jonathan Nieder
as that has the >> same function with a different signature. >> >> Helped-by: Jonathan Nieder <jrnie...@gmail.com> >> Signed-off-by: Stefan Beller <sbel...@google.com> >> --- > > It looks to me that this is a reduced duplicate of what brian posted >

[PATCH 4/4] vcs-svn: move remaining repo_tree functions to fast_export.h

2017-08-22 Thread Jonathan Nieder
). Reported-by: brian m. carlson <sand...@crustytoothpaste.net> Signed-off-by: Jonathan Nieder <jrnie...@gmail.com> --- Makefile | 1 - vcs-svn/fast_export.c | 35 ++- vcs-svn/fast_export.h | 3 +++ vcs-svn/repo_t

[PATCH 3/4] vcs-svn: remove repo_delete wrapper function

2017-08-22 Thread Jonathan Nieder
Since v1.7.10-rc0~118^2~4^2~4^2~3 (vcs-svn: pass paths through to fast-import, 2010-12-13) this is an alias for fast_export_delete. Remove the unnecessary layer of indirection. No functional change intended. Signed-off-by: Jonathan Nieder <jrnie...@gmail.com> --- vcs-svn/repo_tree

[PATCH 2/4] vcs-svn: remove custom mode constants

2017-08-22 Thread Jonathan Nieder
In the rest of Git, these modes are spelled as S_IFDIR, S_IFREG | 0644, S_IFREG | 0755, and S_IFLNK. Use the same constants in svn-fe for simplicity and consistency. No functional change intended. Signed-off-by: Jonathan Nieder <jrnie...@gmail.com> --- vcs-svn/fast_export.c | 6 +++--

[PATCH 1/4] vcs-svn: remove prototypes for missing functions

2017-08-22 Thread Jonathan Nieder
y: brian m. carlson <sand...@crustytoothpaste.net> Reported-by: Stefan Beller <sbel...@google.com> Signed-off-by: Jonathan Nieder <jrnie...@gmail.com> --- vcs-svn/repo_tree.h | 10 -- 1 file changed, 10 deletions(-) diff --git a/vcs-svn/repo_tree.h b/vcs-svn/repo_tree.h

[PATCH 0/4] vcs-svn: remove repo_tree library

2017-08-22 Thread Jonathan Nieder
on top of them if that is more convenient. Thoughts of all kinds welcome, as always. Thanks, Jonathan Jonathan Nieder (4): vcs-svn: remove prototypes for missing functions vcs-svn: remove custom mode constants vcs-svn: remove repo_delete wrapper function vcs-svn: move remaining repo_tree

Re: [PATCH] vcs-svn/repo_tree.h: remove repo_init declaration

2017-08-22 Thread Jonathan Nieder
as that has the >> same function with a different signature. >> >> Helped-by: Jonathan Nieder <jrnie...@gmail.com> >> Signed-off-by: Stefan Beller <sbel...@google.com> > > It looks to me that this is a reduced duplicate of what brian posted > yesterday.

Re: Revision resolution for remote-helpers?

2017-08-18 Thread Jonathan Nieder
Mike Hommey wrote[1]: > On Fri, Aug 18, 2017 at 03:06:37PM -0700, Jonathan Nieder wrote: >> Mike Hommey wrote: >>> The reason for the :: prefix is that it matches the :: >>> prefix used for remote helpers. >>> >>> Now, there are a few caveats: [...] &

Re: Revision resolution for remote-helpers?

2017-08-18 Thread Jonathan Nieder
Hi, Mike Hommey wrote: > My thought is that a string like :: could be used > wherever a committish is expected. That would call some helper > and request to resolve revision, and the helper would provide a git > commit as a response. I like this idea. > The reason for the :: prefix is that it

Re: [bug] Git submodule command interprets switch as argument and switch

2017-08-18 Thread Jonathan Nieder
Hi, R0b0t1 wrote: > The issue is as follows: > > R0b0t1@host:~/devel/project$ git submodule add > https://github.com/user/project -f > Cloning into '/home/R0b0t1/devel/project/-f'... Thanks for reporting. Confusingly, I think this is intended behavior. "git help submodule" explains:

Re: [PATCH] submodule.sh: remove unused variable

2017-08-16 Thread Jonathan Nieder
Stefan Beller wrote: > This could have been part of 48308681b0 (git submodule update: have a > dedicated helper for cloning, 2016-02-29). > > Signed-off-by: Stefan Beller <sbel...@google.com> > --- > git-submodule.sh | 1 - > 1 file changed, 1 deletion(-) Reviewed

Re: [PATCH] push: do not add submodule odb as an alternate when recursing on demand

2017-08-15 Thread Jonathan Nieder
Hi, Stefan Beller wrote: > On Tue, Aug 15, 2017 at 5:11 PM, Junio C Hamano wrote: >> Stefan Beller writes: >>> Junio C Hamano wrote: Is "is it populated" a good thing to check here, though? IIRC, add-submodule-odb allows you to add the object

Re: [PATCH] sub-process: print the cmd when a capability is unsupported

2017-08-15 Thread Jonathan Nieder
Jonathan Tan wrote: > Christian Couder wrote: >> In handshake_capabilities() we use warning() when a capability >> is not supported, so the exit code of the function is 0 and no >> further error is shown. This is a problem because the warning >> message doesn't tell

Re: [PATCH] push: do not add submodule odb as an alternate when recursing on demand

2017-08-15 Thread Jonathan Nieder
Stefan Beller wrote: > Use is_submodule_populated_gently instead, which is simpler and > cheaper. [...] > --- a/submodule.c > +++ b/submodule.c > @@ -966,7 +966,9 @@ static int push_submodule(const char *path, > const struct string_list *push_options, >

Re: [PATCH] push: do not add submodule odb as an alternate when recursing on demand

2017-08-15 Thread Jonathan Nieder
off-by: Stefan Beller <sbel...@google.com> > --- > submodule.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) Reviewed-by: Jonathan Nieder <jrnie...@gmail.com> Thanks for picking up this loose end. > diff --git a/submodule.c b/submodule.c > index 111a3007

Re: [RFC] clang-format: outline the git project's coding style

2017-08-14 Thread Jonathan Nieder
Hi, brian m. carlson wrote: >> On Wed, Aug 09, 2017 at 03:53:17PM -0700, Stefan Beller wrote: >>> We may have different opinions on what is readable/beautiful code. >>> If we were to follow a mutual agreed style that is produced by a tool, >>> we could use clean/smudge filters with different

Re: [PATCH] t1002: stop using sum(1)

2017-08-14 Thread Jonathan Nieder
Hi, René Scharfe wrote: > sum(1) is a command for calculating checksums of the contents of files. > It was part of early editions of Unix ("Research Unix", 1972/1973, [1]). > cksum(1) appeared in 4.4BSD (1993) as a replacement [2], and became part > of POSIX.1-2008 [3]. OpenBSD 5.6 (2014)

Re: [PATCH] builtin/add: add detail to a 'cannot chmod' error message

2017-08-09 Thread Jonathan Nieder
msayjones.plus.com> > --- > This is v2 of the earlier "add a newline" patch. Thanks! > > builtin/add.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) Reviewed-by: Jonathan Nieder <jrnie...@gmail.com> Thanks.

Re: [PATCH] t1200: remove t1200-tutorial.sh

2017-08-08 Thread Jonathan Nieder
Jonathan Nieder wrote: > Stefan Beller wrote: >>> Stefan Beller wrote: >>>> Nowadays there are better tutorials out there such as "Git from bottom up" >>>> or others, easily found online. Additionally to that a tutorial in our >>>> test

Re: [PATCH] t1200: remove t1200-tutorial.sh

2017-08-08 Thread Jonathan Nieder
Stefan Beller wrote: > On Tue, Aug 8, 2017 at 5:07 PM, Jonathan Nieder <jrnie...@gmail.com> wrote: >> Stefan Beller wrote: >>> Nowadays there are better tutorials out there such as "Git from bottom up" >>> or others, easily found online. Additional

Re: [PATCH] t1200: remove t1200-tutorial.sh

2017-08-08 Thread Jonathan Nieder
e correct. But this is not that. There indeed appear to be other good tests for these commands, even "git whatchanged", so for what it's worth, Reviewed-by: Jonathan Nieder <jrnie...@gmail.com> Thanks.

Re: [PATCH] sha1_file: avoid comparison if no packed hash matches the first byte

2017-08-08 Thread Jonathan Nieder
al to N." So hi == lo would mean there are no objects with id starting with 0, as hoped. Or in other words, the [lo, hi) interval we're trying to search is indeed a half-open interval. Reviewed-by: Jonathan Nieder <jrnie...@gmail.com>

Re: [PATCH] builtin/add: add a missing newline to an stderr message

2017-08-08 Thread Jonathan Nieder
Ramsay Jones wrote: > Signed-off-by: Ramsay Jones <ram...@ramsayjones.plus.com> Reviewed-by: Jonathan Nieder <jrnie...@gmail.com> Thanks for catching it.

Re: [PATCH] builtin/add: add a missing newline to an stderr message

2017-08-08 Thread Jonathan Nieder
Junio C Hamano wrote: > René Scharfe writes: >>> diff --git a/builtin/add.c b/builtin/add.c >>> index e888fb8c5..385b53ae7 100644 >>> --- a/builtin/add.c >>> +++ b/builtin/add.c >>> @@ -43,7 +43,7 @@ static void chmod_pathspec(struct pathspec *pathspec, int >>> force_mode) >>>

Re: Partial clone design (with connectivity check for locally-created objects)

2017-08-08 Thread Jonathan Nieder
Hi, Ben Peart wrote: > We've discussed a couple of different possible solutions, each of > which have different tradeoffs. Let me try to summarize here and > perhaps suggest some other possibilities: Thanks for this. Some comments below. > Promised list > - > This provides an

Re: Partial clone design (with connectivity check for locally-created objects)

2017-08-07 Thread Jonathan Nieder
Hi, Ben Peart wrote: >> On Fri, 04 Aug 2017 15:51:08 -0700 >> Junio C Hamano wrote: >>> Jonathan Tan writes: "Imported" objects must be in a packfile that has a ".remote" file with arbitrary text (similar to the ".keep" file). They come

Re: [PATCH v2 0/5] Fsck for lazy objects, and (now) actual invocation of loader

2017-08-02 Thread Jonathan Nieder
Junio C Hamano wrote: > Jonathan Nieder <jrnie...@gmail.com> writes: >> Can you spell this out more? To be clear, are you speaking as a >> reviewer or as the project maintainer? In other words, if other >> reviewers are able to settle on a design that involves a re

Re: [PATCH v2 0/5] Fsck for lazy objects, and (now) actual invocation of loader

2017-08-02 Thread Jonathan Nieder
Hi, Junio C Hamano wrote: > Jonathan Tan writes: >> One possibility to conceptually have the same thing without the overhead >> of the list is to put the obtained-from-elsewhere objects into its own >> alternate object store, so that we can distinguish the two. > > Now

Re: [RFC] Moving main git-subtree development. to GitHub

2017-08-01 Thread Jonathan Nieder
Hi, David A. Greene wrote: > Essentially, > I would like to do a "beta" release of the new code while not impacting > existing users of git-subtree in contrib. Sounds like a sensible goal. In-tree, you can do that by saying "please

Re: [PATCH v2 0/5] Fsck for lazy objects, and (now) actual invocation of loader

2017-08-01 Thread Jonathan Nieder
Hi, Junio C Hamano wrote: > Can we do something similar, i.e. maintain minimum set of cut-off > points and adjust that set incrementally, just sufficient to ensure > the integrity of objects locally created and not yet safely stored > away by pushing them the "other side"? This sounds like a

Re: [PATCH] packed_ref_store: handle a packed-refs file that is a symlink

2017-07-26 Thread Jonathan Nieder
@google.com> [...] > refs/packed-backend.c | 24 ++-- > t/t3210-pack-refs.sh | 15 +++ > 2 files changed, 33 insertions(+), 6 deletions(-) The patch looks good, except for one nit marked below (*). I'll apply it locally and ask people to test it,

Re: [PATCH/RFC] setup: update error message to be more meaningful

2017-07-25 Thread Jonathan Nieder
Hi, Kaartic Sivaraam wrote: > The error message shown when a flag is found when expecting a > filename wasn't clear as it didn't communicate what was wrong > using the 'suitable' words in *all* cases. > > Correct case, > > $ git rev-parse commit.c --flags > commit.c >

Re: [PATCH] sub-process: refactor handshake to common function

2017-07-24 Thread Jonathan Nieder
Hi, Jonathan Tan wrote: > Refactor, into a common function, the version and capability negotiation > done when invoking a long-running process as a clean or smudge filter. > This will be useful for other Git code that needs to interact similarly > with a long-running process. > > Signed-off-by:

Re: [PATCH] recursive submodules: detach HEAD from new state

2017-07-24 Thread Jonathan Nieder
Hi, Stefan Beller wrote: > When a submodule is on a branch and in its superproject you run a > recursive checkout, the branch of the submodule is updated to what the > superproject checks out. This is very unexpected in the current model of > Git as e.g. 'submodule update' always detaches the

Re: [PATCH 21/28] commit_packed_refs(): use a staging file separate from the lockfile

2017-07-24 Thread Jonathan Nieder
Hi, Jeff King wrote: > This seems like the correct path to me. If the existing behavior is to > lock the referring symref, that seems like a violation of the lock > procedure in the first place. Because if "A" points to "B", we take > "A.lock" and then modify "B". But "B" may have any number of

Re: [PATCH 21/28] commit_packed_refs(): use a staging file separate from the lockfile

2017-07-20 Thread Jonathan Nieder
Junio C Hamano wrote: > Michael Haggerty writes: >> We will want to be able to hold the lockfile for `packed-refs` even >> after we have activated the new values. So use a separate tempfile, >> `packed-refs.new`, as a place to stage the new contents of the >> `packed-refs`

Re: [PATCH v3 00/30] Create a reference backend for packed refs

2017-07-20 Thread Jonathan Nieder
+cc: dawalker, who reported the bug Stefan Beller wrote: > We have a user that reports: > > The issue is for users who have a mirrored repository, "git pack-refs" > now overwrites the .git/packed-refs symlink instead of following it and > replacing the file it points to. > > I suspect this

Re: [PATCH] fsck: remove redundant parse_tree() invocation

2017-07-19 Thread Jonathan Nieder
edundant. Later it must have been amended and cleaned up to use fsck_walk. Reviewed-by: Jonathan Nieder <jrnie...@gmail.com> Thanks for cleaning up.

Re: [RFC PATCH 0/3] Partial clone: promised blobs (formerly "missing blobs")

2017-07-17 Thread Jonathan Nieder
Hi Philip, Philip Oakley wrote: > From: "Jonathan Tan" >> These patches are part of a set of patches implementing partial clone, >> as you can see here: >> >> https://github.com/jonathantanmy/git/tree/partialclone [...] > If I understand correctly, this method doesn't

Re: [PATCH] check-ref-format: require a repository for --branch

2017-07-17 Thread Jonathan Nieder
Hi, Jeff King wrote: > On Fri, Jul 14, 2017 at 02:03:13PM -0400, Jeff King wrote: >> So I think the patch below is probably the right direction. > > And here it is with a real commit message, if this is what we want to > do. [...] > --- a/t/t1402-check-ref-format.sh > +++

Re: [RFC PATCH 1/3] promised-blob, fsck: introduce promised blobs

2017-07-14 Thread Jonathan Nieder
Jeff Hostetler wrote: > On 7/13/2017 3:39 PM, Jonathan Tan wrote: >> I know that discussion has shifted to the possibility of not having this >> list at all, and not sending size information together with the fetch, >> but going back to this...maybe omitting trees *is* the solution to both >> the

Re: [PATCH] submodule: use cheaper check for submodule pushes

2017-07-13 Thread Jonathan Nieder
Hi, Stefan Beller wrote: > Yes we are safe, because the function itself only spawns a child process > (not using any of the objects). > > It's only caller push_unpushed_submodules also doesn't rely on objects > loaded after calling push_submodule. > > The caller of push_unpushed_submodules

Re: [PATCH] submodule: use cheaper check for submodule pushes

2017-07-12 Thread Jonathan Nieder
Hi, Stefan Beller wrote: > In the function push_submodule[1] we use add_submodule_odb[2] to determine > if a submodule has been populated. However the function does not work with > the submodules objects that are added, instead a new child process is used > to perform the actual push in the

Re: [PATCH 2/3] setup: have the_repository use the_index

2017-07-12 Thread Jonathan Nieder
Hi, Junio C Hamano wrote: > Brandon Williams writes: >> Since it is a pointer then using a '#define' to replace 'the_index' >> (which is not a pointer) would be a little more challenging. > > The above is merely realizing another downside that stems from the > earlier design

<    4   5   6   7   8   9   10   11   12   13   >