Re: [PATCHv2] rev-parse: add --show-superproject-working-tree

2017-03-07 Thread Junio C Hamano
Looks more or less right but invoke "ls-files -z" and reading the \0 delimited output would be easier; otherwise you would have to worry about c-unquoting the pathname when the submodule is bound at a path with funny character (like a double-quote) in it. Also, returning the exact string of the

Re: [PATCH] t*: avoid using pipes

2017-03-07 Thread Jeff King
On Tue, Mar 07, 2017 at 12:52:49PM -0800, Stefan Beller wrote: > On Tue, Mar 7, 2017 at 12:39 PM, Johannes Sixt wrote: > > > Welcome to the Git community! > > > > > Actually, being a *micro* project, it should stay so. Not doing all of the > > changes would leave some tasks for

Re: [PATCHv2] rev-parse: add --show-superproject-working-tree

2017-03-07 Thread Junio C Hamano
Stefan Beller writes: > + if (!strcmp(arg, "--show-superproject-working-tree")) { > + const char *superproject = > get_superproject_working_tree(); > + if (superproject) > +

Re: [Request for Documentation] Differentiate signed (commits/tags/pushes)

2017-03-07 Thread Jeff King
On Tue, Mar 07, 2017 at 02:19:19PM -0800, Stefan Beller wrote: > On Tue, Mar 7, 2017 at 1:23 AM, Jeff King wrote: > > On Mon, Mar 06, 2017 at 11:59:24AM -0800, Stefan Beller wrote: > > > >> What is the difference between signed commits and tags? > >> (Not from a technical

Representative Needed.

2017-03-07 Thread Geo-Jade
Hello, We want you to become our agent/representative. If you are interested in becoming our representative contact us. Regards, Jiang Liang Chairman Geo-Jade Petroleum

[PATCH] t*: avoid using pipes

2017-03-07 Thread Prathamesh Chavan
Hi, I'm Prathamesh Chavan. As a part of my micropraoject I have been working on "Avoid pipes for git related commands in test suites". I tried sending the patch, but it got blocked since the mail contained more than 100 000 characters. Hence, I have made the required changes in branch "micro-proj"

Re: Crash on MSYS2 with GIT_WORK_TREE

2017-03-07 Thread Junio C Hamano
Johannes Schindelin writes: > The problem is actually even worse: On *Linux*, this happens: > > $ GIT_WORK_TREE=c:/invalid git rev-parse HEAD > Segmentation fault (core dumped) > > The reason is this: when set_git_work_tree() was converted from using >

[PATCH 0/6] deadlock regression in v2.11.0 with failed mkdtemp

2017-03-07 Thread Jeff King
On Tue, Mar 07, 2017 at 12:14:06PM +0100, Horst Schirmeier wrote: > On Tue, 07 Mar 2017, Horst Schirmeier wrote: > > I observe a regression that seems to have been introduced between > > v2.10.0 and v2.11.0. When I try to push into a repository on the local > > filesystem that belongs to another

Re: [PATCH v4 04/10] setup_git_directory_1(): avoid changing global state

2017-03-07 Thread Brandon Williams
On 03/08, Johannes Schindelin wrote: > Hi Brandon, > > On Tue, 7 Mar 2017, Brandon Williams wrote: > > > On 03/07, Johannes Schindelin wrote: > > > const char *setup_git_directory_gently(int *nongit_ok) > > > { > > > + struct strbuf cwd = STRBUF_INIT, dir = STRBUF_INIT, gitdir = > > >

Re: Crash on MSYS2 with GIT_WORK_TREE

2017-03-07 Thread Brandon Williams
On 03/08, Johannes Schindelin wrote: > Hi valtron, > > On Wed, 8 Mar 2017, Johannes Schindelin wrote: > > > On Tue, 7 Mar 2017, valtron wrote: > > > > > When GIT_WORK_TREE contains a drive-letter and forward-slashes, some git > > > commands crash: > > > > > > C:\repo>set GIT_WORK_TREE=C:/repo

Re: Crash on MSYS2 with GIT_WORK_TREE

2017-03-07 Thread Johannes Schindelin
Hi valtron, On Wed, 8 Mar 2017, Johannes Schindelin wrote: > On Tue, 7 Mar 2017, valtron wrote: > > > When GIT_WORK_TREE contains a drive-letter and forward-slashes, some git > > commands crash: > > > > C:\repo>set GIT_WORK_TREE=C:/repo > > C:\repo>git rev-parse HEAD > > 1 [main] git 2332

Re: [PATCH 15/18] read-cache, remove_marked_cache_entries: wipe selected submodules.

2017-03-07 Thread Junio C Hamano
Stefan Beller writes: > submodule_from_ce returns always NULL, when such flag is not given. > From 10/18: > > +const struct submodule *submodule_from_ce(const struct cache_entry *ce) > +{ > + if (!S_ISGITLINK(ce->ce_mode)) > + return NULL; > + > + if

Re: Crash on MSYS2 with GIT_WORK_TREE

2017-03-07 Thread Johannes Schindelin
Hi valtron, just to set the record straight on a few of my suggestions that turned out to be incorrect: On Wed, 8 Mar 2017, Johannes Schindelin wrote: > On Tue, 7 Mar 2017, valtron wrote: > > > Stacktrace from GDB (on git-rev-parse) is: > > > > #0 0x00018019634d in strcmp (s1=0x600062080

Re: [PATCH 16/18] entry.c: update submodules when interesting

2017-03-07 Thread Junio C Hamano
Stefan Beller writes: >> In addition to mkdir(), would we also need the .git file that point >> into superproject's .git/modules/ too? > > The move_head function takes care of it > Both creation as well as deletion are handled in the move_head function, > when either new or

Re: Crash on MSYS2 with GIT_WORK_TREE

2017-03-07 Thread valtron
Hi Johannes, Thanks for looking at this! Yes, it's 2.12.0, sorry for the typo. I only ran into this because of git-gui, where I eventually tracked it down to line 1330: set env(GIT_WORK_TREE) $_gitworktree With that line commented out, it works. I'll look into why git-gui sets it to a

[PATCHv2] rev-parse: add --show-superproject-working-tree

2017-03-07 Thread Stefan Beller
In some situations it is useful to know if the given repository is a submodule of another repository. Add the flag --show-superproject-working-tree to git-rev-parse to make it easy to find out if there is a superproject. Signed-off-by: Stefan Beller --- * not RFC anymore,

Re: [PATCH v4 04/10] setup_git_directory_1(): avoid changing global state

2017-03-07 Thread Johannes Schindelin
Hi Brandon, On Tue, 7 Mar 2017, Brandon Williams wrote: > On 03/07, Johannes Schindelin wrote: > > const char *setup_git_directory_gently(int *nongit_ok) > > { > > + struct strbuf cwd = STRBUF_INIT, dir = STRBUF_INIT, gitdir = > > STRBUF_INIT; > > I couldn't see any strbuf_release() calls

Re: [RFC PATCH] rev-parse: add --show-superproject-working-tree

2017-03-07 Thread Junio C Hamano
Stefan Beller writes: > On Tue, Mar 7, 2017 at 10:44 AM, Junio C Hamano wrote: > >> So perhaps your superproject_exists() helper can be eliminated > > That is what I had originally, but I assumed a strict helper function > for "existence of the

Re: [Request for Documentation] Differentiate signed (commits/tags/pushes)

2017-03-07 Thread Stefan Beller
On Tue, Mar 7, 2017 at 1:23 AM, Jeff King wrote: > On Mon, Mar 06, 2017 at 11:59:24AM -0800, Stefan Beller wrote: > >> What is the difference between signed commits and tags? >> (Not from a technical perspective, but for the end user) > > I think git has never really tried to

Re: Crash on MSYS2 with GIT_WORK_TREE

2017-03-07 Thread Johannes Schindelin
Hi valtron, On Tue, 7 Mar 2017, valtron wrote: > Git 1.12.0. I take it you meant 2.12.0. And you probably also meant to imply that you are referring to MSYS2's git.exe in /usr/bin/. > When GIT_WORK_TREE contains a drive-letter and forward-slashes, some git > commands crash: > > C:\repo>set

Re: GSoC 2017

2017-03-07 Thread Valery Tolstov
Decided to rewrite module_clone to use connect_work_tree_and_git_dir as my microproject by suggestion of Stefan Bellar. https://public-inbox.org/git/cagz79ky+1e-wg0-uzgjme+haoe+1wcmg0eux7rwgtku_abd...@mail.gmail.com/ It seems that connect_work_tree_and_git_dir needs to be slightly changed to

Re: [PATCH 15/18] read-cache, remove_marked_cache_entries: wipe selected submodules.

2017-03-07 Thread Stefan Beller
On Tue, Mar 7, 2017 at 2:42 PM, Junio C Hamano wrote: > Stefan Beller writes: > >> Signed-off-by: Stefan Beller >> + submodule_move_head(sub->path, "HEAD", NULL, \ > > What is this backslash doing here? I am still bad at

Re: [PATCH v4 04/10] setup_git_directory_1(): avoid changing global state

2017-03-07 Thread Brandon Williams
On 03/07, Johannes Schindelin wrote: > const char *setup_git_directory_gently(int *nongit_ok) > { > + struct strbuf cwd = STRBUF_INIT, dir = STRBUF_INIT, gitdir = > STRBUF_INIT; I couldn't see any strbuf_release() calls for these strbufs so there may be some memory leaking here. >

Re: [PATCH 16/18] entry.c: update submodules when interesting

2017-03-07 Thread Stefan Beller
On Tue, Mar 7, 2017 at 3:04 PM, Junio C Hamano wrote: > Junio C Hamano writes: > >>> +if (!is_submodule_populated_gently(ce->name, )) { >>> +struct stat sb; >>> +if (lstat(ce->name,

Re: [PATCH v4 04/10] setup_git_directory_1(): avoid changing global state

2017-03-07 Thread Junio C Hamano
Johannes Schindelin writes: > + switch (setup_git_directory_gently_1(, )) { > + case GIT_DIR_NONE: > + prefix = NULL; > + break; > + case GIT_DIR_EXPLICIT: > + prefix = setup_explicit_git_dir(gitdir.buf, , nongit_ok); >

Re: [PATCH 16/18] entry.c: update submodules when interesting

2017-03-07 Thread Junio C Hamano
Junio C Hamano writes: >> +if (!is_submodule_populated_gently(ce->name, )) { >> +struct stat sb; >> +if (lstat(ce->name, )) >> +die(_("could not stat file '%s'"),

Re: fatal error when diffing changed symlinks

2017-03-07 Thread Johannes Schindelin
Hi Junio, On Tue, 7 Mar 2017, Junio C Hamano wrote: > Johannes Schindelin writes: > > >> > When viewing a working tree file, oid.hash could be 0{40} and > >> > read_sha1_file() is not the right function to use to obtain the > >> > contents. > >> > > >> > Both of

Re: [PATCH 4/6] send-pack: improve unpack-status error messages

2017-03-07 Thread Junio C Hamano
Jeff King writes: > When the remote tells us that the "unpack" step failed, we > show an error message. However, unless you are familiar with > the internals of send-pack and receive-pack, it was not > clear that this represented an error on the remote side. > Let's re-word to

Re: [PULL] git svn branch authentication fix

2017-03-07 Thread Junio C Hamano
Eric Wong writes: > Thank you. I fixed spelling in the title (s/authenticaton/authentication/), > added my S-o-b, and pushed for Junio to pick up > > The following changes since commit 3bc53220cb2dcf709f7a027a3f526befd021d858: > > First batch after 2.12 (2017-02-27 14:04:24

Re: [PATCH 05/18] lib-submodule-update.sh: define tests for recursing into submodules

2017-03-07 Thread Junio C Hamano
Stefan Beller writes: > + # ... and ignored files are ignroed ignored.

Re: [PATCH 15/18] read-cache, remove_marked_cache_entries: wipe selected submodules.

2017-03-07 Thread Junio C Hamano
Stefan Beller writes: > Signed-off-by: Stefan Beller > --- > read-cache.c | 27 +-- > 1 file changed, 25 insertions(+), 2 deletions(-) > > diff --git a/read-cache.c b/read-cache.c > index 9054369dd0..9a2abacf7a 100644 > ---

Re: [PATCH 18/18] builtin/read-tree: add --recurse-submodules switch

2017-03-07 Thread Junio C Hamano
Stefan Beller writes: > A new known failure mode is introduced[1], which is actually not > a failure but a feature in read-tree. Unlike checkout for which > the recursive submodule tests were originally written, read-tree does > warn about ignored untracked files that would

Re: [PATCH 16/18] entry.c: update submodules when interesting

2017-03-07 Thread Junio C Hamano
Stefan Beller writes: > Signed-off-by: Stefan Beller > --- > entry.c | 30 ++ > 1 file changed, 30 insertions(+) > > diff --git a/entry.c b/entry.c > index c6eea240b6..d2b512da90 100644 > --- a/entry.c > +++ b/entry.c > @@

[PULL] git svn branch authentication fix

2017-03-07 Thread Eric Wong
Thank you. I fixed spelling in the title (s/authenticaton/authentication/), added my S-o-b, and pushed for Junio to pick up The following changes since commit 3bc53220cb2dcf709f7a027a3f526befd021d858: First batch after 2.12 (2017-02-27 14:04:24 -0800) are available in the git repository at:

Crash on MSYS2 with GIT_WORK_TREE

2017-03-07 Thread valtron
Git 1.12.0. When GIT_WORK_TREE contains a drive-letter and forward-slashes, some git commands crash: C:\repo>set GIT_WORK_TREE=C:/repo C:\repo>git rev-parse HEAD 1 [main] git 2332 cygwin_exception::open_stackdumpfile: Dumping stack trace to git.exe.stackdump C:\repo>set GIT_WORK_TREE=

Re: [PATCH] t*: avoid using pipes

2017-03-07 Thread Stefan Beller
On Tue, Mar 7, 2017 at 12:39 PM, Johannes Sixt wrote: > Welcome to the Git community! > > Actually, being a *micro* project, it should stay so. Not doing all of the > changes would leave some tasks for other apprentices to get warm with our > review process. right, so just pick

Re: [PATCH] t*: avoid using pipes

2017-03-07 Thread Johannes Sixt
Am 07.03.2017 um 18:21 schrieb Stefan Beller: On Tue, Mar 7, 2017 at 8:10 AM, Prathamesh Chavan wrote: I'm Prathamesh Chavan. As a part of my micropraoject I have been working on "Avoid pipes for git related commands in test suites". Welcome to the Git community! * keep

Re: [RFC PATCH] rev-parse: add --show-superproject-working-tree

2017-03-07 Thread Stefan Beller
On Tue, Mar 7, 2017 at 10:44 AM, Junio C Hamano wrote: > So perhaps your superproject_exists() helper can be eliminated That is what I had originally, but I assumed a strict helper function for "existence of the superproject" would be interesting in the future, e.g. for

Re: Reg : GSoC 2017 Microproject

2017-03-07 Thread Christian Couder
Hi, On Tue, Mar 7, 2017 at 11:22 AM, Vedant Bassi wrote: > Hi, > > I would like to participate in GSoC 2017 and I have chosen the Use > unsigned integral type for collection of bits , idea from the Micro > projects list. > > I request the help of the community for

Re: [PATCH] repack: Add options to preserve and prune old pack files

2017-03-07 Thread Junio C Hamano
James Melvin writes: > These options are designed to prevent stale file handle exceptions > during git operations which can happen on users of NFS repos when > repacking is done on them. The strategy is to preserve old pack files > around until the next repack with the

Re: [RESEND PATCH] git-gui--askpass: generalize the window title

2017-03-07 Thread Sebastian Schuberth
On Tue, Mar 7, 2017 at 7:30 PM, Stefan Beller wrote: > Although the following are included in git.git repository, they have their > own authoritative repository and maintainers: Thanks. I continuously get confused by this fact. -- Sebastian Schuberth

Re: git init --separate-git-dir does not update symbolic .git links for submodules

2017-03-07 Thread Stefan Beller
On Tue, Mar 7, 2017 at 11:52 AM, Valery Tolstov wrote: > Just noticed that there already is function that gives module list > module_list_compute. But purpose of it's arguments is not quite clear > for me at this moment. > static int module_list_compute(int argc, const char

Re: RFC: Another proposed hash function transition plan

2017-03-07 Thread Ian Jackson
Jonathan Nieder writes ("RFC: Another proposed hash function transition plan"): > This past week we came up with this idea for what a transition to a new > hash function for Git would look like. I'd be interested in your > thoughts (especially if you can make them as comments on the document, >

STRICTLY CONFIDENTIAL

2017-03-07 Thread Acct. Dept.
I have important transaction for you as next of kin to claim US$18.37m Mail me on my private email: chimwia...@gmail.com so I can send you more details Thanks Mr.Chim Wai Kim MOVE TO INBOX=== DISCLAIMER: This email and any files it contains are confidential

Re: git init --separate-git-dir does not update symbolic .git links for submodules

2017-03-07 Thread Valery Tolstov
Just noticed that there already is function that gives module list module_list_compute. But purpose of it's arguments is not quite clear for me at this moment.

Re: git init --separate-git-dir does not update symbolic .git links for submodules

2017-03-07 Thread Stefan Beller
On Tue, Mar 7, 2017 at 10:59 AM, Valery Tolstov wrote: > I think we can reuse code from module_clone that writes .git link. > Possibly this code fragment needs to be factored out from module_clone That fragment already exists, see dir.h:

Re: RFC: Another proposed hash function transition plan

2017-03-07 Thread Linus Torvalds
On Tue, Mar 7, 2017 at 10:57 AM, Ian Jackson wrote: > > Also I think you need to specify how abbreviated object names are > interpreted. One option might be to not use hex for the new hash, but base64 encoding. That would make the full size ASCII hash encoding

Guarantee Deal.

2017-03-07 Thread HAGGARD
I am Capt. Haggard I have special proposal that will do you good, contact me for more understanding. Regard, Capt Haggard nathaniel Email: haggardnathanie...@gmail.com

Re: git init --separate-git-dir does not update symbolic .git links for submodules

2017-03-07 Thread Valery Tolstov
I think we can reuse code from module_clone that writes .git link. Possibly this code fragment needs to be factored out from module_clone Also, to fix all the links, we need to obtain the list of submodules and then iterate over them. module_list command iterates and prints the result to stdout.

Re: [PATCH v5 1/1] config: add conditional include

2017-03-07 Thread Stefan Beller
On Tue, Mar 7, 2017 at 12:47 AM, Jeff King wrote: > On Mon, Mar 06, 2017 at 02:44:27PM -0800, Stefan Beller wrote: > >> > +static int include_condition_is_true(const char *cond, size_t cond_len) >> > +{ >> ... >> > + >> > + error(_("unrecognized include condition: %.*s"),

Re: [RFC PATCH] rev-parse: add --show-superproject-working-tree

2017-03-07 Thread Junio C Hamano
Stefan Beller writes: > +const char *get_superproject_working_tree() const char *get_superproject_working_tree(void) The same for the *.h file declaration. > +{ > + struct child_process cp = CHILD_PROCESS_INIT; > + struct strbuf sb = STRBUF_INIT; > + > + if

[PATCH 3/6] send-pack: use skip_prefix for parsing unpack status

2017-03-07 Thread Jeff King
This avoids repeating ourselves, and the use of magic numbers. Signed-off-by: Jeff King --- Obviously not necessary, but just a cleanup while I was here. send-pack.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/send-pack.c b/send-pack.c index

Re: fatal error when diffing changed symlinks

2017-03-07 Thread Junio C Hamano
Johannes Schindelin writes: >> > When viewing a working tree file, oid.hash could be 0{40} and >> > read_sha1_file() is not the right function to use to obtain the >> > contents. >> > >> > Both of these two need to pay attention to 0{40}, I think, as the >> > user

Re: [RESEND PATCH] git-gui--askpass: generalize the window title

2017-03-07 Thread Stefan Beller
https://public-inbox.org/git/xmqq60jz2xry@gitster.mtv.corp.google.com/ Although the following are included in git.git repository, they have their own authoritative repository and maintainers: - git-gui/ comes from git-gui project, maintained by Pat Thoyts:

[RESEND PATCH] git-gui--askpass: generalize the window title

2017-03-07 Thread Sebastian Schuberth
git-gui--askpass is not only used for SSH authentication, but also for HTTPS. In that context it is confusing to have a window title of "OpenSSH". So generalize the title so that it also says which parent process, i.e. Git, requires authentication. Signed-off-by: Sebastian Schuberth

Re: [PATCH] t*: avoid using pipes

2017-03-07 Thread Stefan Beller
On Tue, Mar 7, 2017 at 8:10 AM, Prathamesh Chavan wrote: > Hi, > I'm Prathamesh Chavan. As a part of my micropraoject I have been working on > "Avoid pipes for git related commands in test suites". Thanks for working on that microproject! > I tried sending the > patch, but it

[PATCH] repack: Add options to preserve and prune old pack files

2017-03-07 Thread James Melvin
The new --preserve-oldpacks option moves old pack files into the preserved subdirectory instead of deleting them after repacking. The new --prune-preserved option prunes old pack files from the preserved subdirectory after repacking, but before potentially moving the latest old packfiles to this

[PATCH] t*: avoid using pipes

2017-03-07 Thread Prathamesh Chavan
Hi, I'm Prathamesh Chavan. As a part of my micropraoject I have been working on "Avoid pipes for git related commands in test suites". I tried sending the patch, but it got blocked since the mail contained more than 100 000 characters. Hence I'll like to attach the link to my branch 'micro-proj',

Re: Reg : GSoC 2017 Microproject

2017-03-07 Thread Prathamesh Chavan
On Tue, Mar 7, 2017 at 3:52 PM, Vedant Bassi wrote: > Hi, > > I would like to participate in GSoC 2017 and I have chosen the Use > unsigned integral type for collection of bits , idea from the Micro > projects list. > > I request the help of the community for clarifying a

Re: [PATCH v3 0/9] Fix the early config

2017-03-07 Thread Johannes Schindelin
Hi Junio, On Fri, 3 Mar 2017, Junio C Hamano wrote: > Johannes Schindelin writes: > > > Notable notes: > > > > - In contrast to earlier versions, I no longer special-case init and > > clone. Peff pointed out that this adds technical debt, and that we can > >

[PATCH v4 07/10] read_early_config(): avoid .git/config hack when unneeded

2017-03-07 Thread Johannes Schindelin
So far, we only look whether the startup_info claims to have seen a git_dir. However, do_git_config_sequence() (and consequently the git_config_with_options() call used by read_early_config() asks the have_git_dir() function whether we have a .git/ directory, which in turn also looks at git_dir

[PATCH v4 09/10] Test read_early_config()

2017-03-07 Thread Johannes Schindelin
So far, we had no explicit tests of that function. Signed-off-by: Johannes Schindelin --- t/helper/test-config.c | 15 +++ t/t1309-early-config.sh | 50 + 2 files changed, 65 insertions(+) create mode

Re: [PATCH 0/6] deadlock regression in v2.11.0 with failed mkdtemp

2017-03-07 Thread Jeff King
On Tue, Mar 07, 2017 at 08:34:37AM -0500, Jeff King wrote: > Yuck. In the original, the error was generated by the child index-pack, > and we relayed it over the sideband. But we don't even get as far as > running index-pack in the newer version; we fail trying to make the > tmpdir. The error

[PATCH v4 10/10] setup_git_directory_gently_1(): avoid die()ing

2017-03-07 Thread Johannes Schindelin
This function now has a new caller in addition to setup_git_directory(): the newly introduced discover_git_directory(). That function wants to discover the current .git/ directory, and in case of a corrupted one simply pretend that there is none to be found. Example: if a stale .git file exists

[PATCH v4 08/10] read_early_config(): really discover .git/

2017-03-07 Thread Johannes Schindelin
Earlier, we punted and simply assumed that we are in the top-level directory of the project, and that there is no .git file but a .git/ directory so that we can read directly from .git/config. However, that is not necessarily true. We may be in a subdirectory. Or .git may be a gitfile. Or the

[PATCH v4 05/10] Introduce the discover_git_directory() function

2017-03-07 Thread Johannes Schindelin
We modified the setup_git_directory_gently_1() function earlier to make it possible to discover the GIT_DIR without changing global state. However, it is still a bit cumbersome to use if you only need to figure out the (possibly absolute) path of the .git/ directory. Let's just provide a

[PATCH v4 00/10] Fix the early config

2017-03-07 Thread Johannes Schindelin
These patches are an attempt to make Git's startup sequence a bit less surprising. The idea here is to discover the .git/ directory gently (i.e. without changing the current working directory, nor any global variables), and to use it to read the .git/config file early, before we actually called

[PATCH v4 06/10] Make read_early_config() reusable

2017-03-07 Thread Johannes Schindelin
The pager configuration needs to be read early, possibly before discovering any .git/ directory. Let's not hide this function in pager.c, but make it available to other callers. Signed-off-by: Johannes Schindelin --- cache.h | 1 + config.c | 31

[PATCH v4 04/10] setup_git_directory_1(): avoid changing global state

2017-03-07 Thread Johannes Schindelin
For historical reasons, Git searches for the .git/ directory (or the .git file) by changing the working directory successively to the parent directory of the current directory, until either anything was found or until a ceiling or a mount point is hit. Further global state may be changed in case

[PATCH v4 03/10] Prepare setup_discovered_git_directory() the root directory

2017-03-07 Thread Johannes Schindelin
Currently, the offset parameter (indicating what part of the cwd parameter corresponds to the current directory after discovering the .git/ directory) is set to 0 when we are running in the root directory. However, in the next patches we will avoid changing the current working directory while

[PATCH v4 01/10] t7006: replace dubious test

2017-03-07 Thread Johannes Schindelin
The idea of the test case "git -p - core.pager is not used from subdirectory" was to verify that the setup_git_directory() function had not been called just to obtain the core.pager setting. However, we are about to fix the early config machinery so that it *does* work, without messing up the

[PATCH v4 02/10] setup_git_directory(): use is_dir_sep() helper

2017-03-07 Thread Johannes Schindelin
It is okay in practice to test for forward slashes in the output of getcwd(), because we go out of our way to convert backslashes to forward slashes in getcwd()'s output on Windows. Still, the correct way to test for a dir separator is by using the helper function we introduced for that very

Re: [PATCH v3 0/9] Fix the early config

2017-03-07 Thread Johannes Schindelin
Hi Peff, On Sat, 4 Mar 2017, Jeff King wrote: > On Fri, Mar 03, 2017 at 06:31:55PM +0100, Johannes Schindelin wrote: > > > Interdiff vs v2: > > [...] > > + * When we are not about to create a repository ourselves (init or > > + * clone) and when no .git/ directory was set up yet (in which

[PATCH 4/6] send-pack: improve unpack-status error messages

2017-03-07 Thread Jeff King
When the remote tells us that the "unpack" step failed, we show an error message. However, unless you are familiar with the internals of send-pack and receive-pack, it was not clear that this represented an error on the remote side. Let's re-word to make that more obvious. Likewise, when we got

[PATCH 5/6] send-pack: read "unpack" status even on pack-objects failure

2017-03-07 Thread Jeff King
If the local pack-objects of a push fails, we'll tell the user about it. But one likely cause is that the remote index-pack stopped reading for some reason (because it didn't like our input, or encountered another error). In that case we'd expect the remote to report more details to us via the

Re: [Request for Documentation] Differentiate signed (commits/tags/pushes)

2017-03-07 Thread Tom Jones
We use git to manage a config management repository for some servers. We have tens of signed commits a day; all get deployed. The logic on each host is roughly "is signed by sysadmin key and is more recent than currently-deployed version". Also, what is all this about "GPG"? The protocol is

[PATCH 6/6] send-pack: report signal death of pack-objects

2017-03-07 Thread Jeff King
If our pack-objects sub-process dies of a signal, then it likely didn't have a chance to write anything useful to stderr. The user may be left scratching their head why the push failed. Let's detect this situation and write something to stderr. Signed-off-by: Jeff King --- We

regression: git push in non-shared repo stalls (v2.11.0+)

2017-03-07 Thread Horst Schirmeier
Hi, I observe a regression that seems to have been introduced between v2.10.0 and v2.11.0. When I try to push into a repository on the local filesystem that belongs to another user and has not explicitly been prepared for shared use, v2.11.0 shows some of the usual diagnostic output and then

[PATCH 1/6] receive-pack: fix deadlock when we cannot create tmpdir

2017-03-07 Thread Jeff King
The err_fd descriptor passed to the unpack() function is intended to be handed off to the child index-pack, and our async muxer will read until it gets EOF. However, if we encounter an error before handing off the descriptor, we must manually close(err_fd). Otherwise we will be waiting for our

[PATCH 2/6] send-pack: extract parsing of "unpack" response

2017-03-07 Thread Jeff King
After sending the pack, we call receive_status() which gets both the "unpack" line and the ref status. Let's break these into two functions so we can call the first part independently. Signed-off-by: Jeff King --- send-pack.c | 23 ++- 1 file changed, 14

Re: [RFC 0/4] Shallow clones with on-demand fetch

2017-03-07 Thread Jeff King
On Mon, Mar 06, 2017 at 11:18:30AM -0800, Junio C Hamano wrote: > Mark Thomas writes: > > > This is a proof-of-concept, so it is in no way complete. It contains a > > few hacks to make it work, but these can be ironed out with a bit more > > work. What I have so far is

Re: [PATCH v3 0/9] Fix the early config

2017-03-07 Thread Johannes Schindelin
Hi Junio, On Fri, 3 Mar 2017, Junio C Hamano wrote: > 2/9 and corresponding 4/9 triggers "ERROR: trailing statements > should be on next line" from ../linux/scripts/checkpatch.pl because > of a line inherited from the original; I'll queue them with an > obvious style fix to work it around. Wow,

Re: [PATCH v5 1/1] config: add conditional include

2017-03-07 Thread Jeff King
On Mon, Mar 06, 2017 at 02:44:27PM -0800, Stefan Beller wrote: > > +static int include_condition_is_true(const char *cond, size_t cond_len) > > +{ > ... > > + > > + error(_("unrecognized include condition: %.*s"), (int)cond_len, > > cond); > > + /* unknown conditionals are always

Re: regression: git push in non-shared repo stalls (v2.11.0+)

2017-03-07 Thread Horst Schirmeier
On Tue, 07 Mar 2017, Horst Schirmeier wrote: > I observe a regression that seems to have been introduced between > v2.10.0 and v2.11.0. When I try to push into a repository on the local > filesystem that belongs to another user and has not explicitly been > prepared for shared use, v2.11.0 shows

Re: [Request for Documentation] Differentiate signed (commits/tags/pushes)

2017-03-07 Thread Matthieu Moy
Stefan Beller writes: > What is the difference between signed commits and tags? > (Not from a technical perspective, but for the end user) In addition to what the others already said: If you use GitHub, then in the web interface you get a "Verified" stamp for each signed

Reg : GSoC 2017 Microproject

2017-03-07 Thread Vedant Bassi
Hi, I would like to participate in GSoC 2017 and I have chosen the Use unsigned integral type for collection of bits , idea from the Micro projects list. I request the help of the community for clarifying a few questions that I have. 1. Is this Microproject already taken ? 2. If it is free , I

Re: [Request for Documentation] Differentiate signed (commits/tags/pushes)

2017-03-07 Thread Jeff King
On Mon, Mar 06, 2017 at 11:59:24AM -0800, Stefan Beller wrote: > What is the difference between signed commits and tags? > (Not from a technical perspective, but for the end user) I think git has never really tried to assign any _meaning_ to the signatures. It implements the technical bits and

Re: Delta compression not so effective

2017-03-07 Thread Thomas Braun
> Marius Storm-Olsen hat am 4. März 2017 um 09:27 > geschrieben: [...] > I really don't want the files on the mailinglist, so I'll send you a > link directly. However, small snippets for public discussions about > potential issues would be fine, obviously. git

Re: RFC: Another proposed hash function transition plan

2017-03-07 Thread Jeff King
On Mon, Mar 06, 2017 at 10:39:49AM -0800, Jonathan Tan wrote: > The "nohash" thing was in the hope of requiring only one signature to sign > all the hashes (in all the functions) that the user wants, while preserving > round-tripping ability. Thanks, this explained it very well. I understand