Re: [PATCH v4 03/12] ref-filter: bump 'used_atom' and related code to the top

2016-02-02 Thread Karthik Nayak
On Tue, Feb 2, 2016 at 3:52 AM, Junio C Hamano wrote: > Karthik Nayak writes: > >> Bump code to the top for usage in further patches. >> --- > > Sign-off? Shall reply with patch, missed that somehow. > >> ref-filter.c | 30

[PATCH v2] test-lib: limit the output of the yes utility

2016-02-02 Thread Johannes Sixt
From: Johannes Schindelin On Windows, there is no SIGPIPE. A consequence of this is that the upstream process of a pipe does not notice the death of the downstream process until the pipe buffer is full and writing more data returns an error. This behavior is the

Re: [PATCH v4 06/15] submodule--helper: die on config error when cloning module

2016-02-02 Thread Eric Sunshine
On Tue, Feb 2, 2016 at 6:51 AM, Patrick Steinhardt wrote: > When setting the 'core.worktree' option for a newly cloned > submodule we ignore the return value of `git_config_set_in_file`. > As this leaves the submodule in an inconsistent state, we instaed > we want to inform the user

Re: [PATCH v4 00/15] config: make git_config_set die on failure

2016-02-02 Thread Stefan Beller
On Tue, Feb 2, 2016 at 3:51 AM, Patrick Steinhardt wrote: > submodule: die on config error when linking modules > submodule--helper: die on config error when cloning module The code in the submodule related patches looks fine to me. -- To unsubscribe from this list: send the

[PATCH v4 03/12] ref-filter: bump 'used_atom' and related code to the top

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

Re: parse_object does check_sha1_signature but not parse_object_buffer?

2016-02-02 Thread Junio C Hamano
Mike Hommey writes: > On Mon, Feb 01, 2016 at 07:10:04PM -0800, Junio C Hamano wrote: >> Mike Hommey writes: >> >> > Shouldn't parse_object_buffer also do check_sha1_signature? >> >> In general, it shouldn't; its callers are supposed to do it as >>

Re: [PATCH v4 10/15] clone: die on config error in cmd_clone

2016-02-02 Thread Junio C Hamano
Patrick Steinhardt writes: > The clone command does not check for error codes returned by > `git_config_set` functions. This may cause the user to end up > with an inconsistent repository without any indication with what > went wrong. > > Fix this problem by dying with an error

Re: [PATCH v1 3/6] convert.c: Remove input_crlf_action()

2016-02-02 Thread Junio C Hamano
tbo...@web.de writes: > From: Torsten Bögershausen > > Integrate the code of input_crlf_action() into convert_attrs(), > so that ca.crlf_action is aleays valid after calling convert_attrs(). s/aleays/always/ > Keep a copy of crlf_action in attr_action, this is needed for >

Re: [PATCH v3 00/20] refs backend rebase on pu

2016-02-02 Thread Junio C Hamano
David Turner writes: > Are there any more reviews on this? I do have some changes from this > set, but they're pretty minor so I don't want to post a new one (unless > folks would rather see those changes before reviewing). Let me know. Thanks for pinging. As this

Re: [PATCH v4 02/15] branch: die on error in setting up tracking branch

2016-02-02 Thread Junio C Hamano
Patrick Steinhardt writes: > The setup_tracking function calls install_branch_config, which > may fail writing the configuration due to a locked configuration > file or other error conditions. setup_tracking can also fail when > trying to track ambiguous information for a reference.

Re: git log -g bizarre behaviour

2016-02-02 Thread Junio C Hamano
Dennis Kaarsemaker writes: >> > $ git (log -g|reflog) v2.7.0 >> > From the bizarre behaviour above to a silent noop. > > As I demonstrated in the text that you cut: that is not true. > git log -g v2.7.0 and git reflog v2.7.0 are *not* silent, but buggy. I > would like to

Re: [PATCH v4 00/15] config: make git_config_set die on failure

2016-02-02 Thread Junio C Hamano
Patrick Steinhardt writes: > Patrick Steinhardt (15): > config: introduce set_or_die wrappers > branch: die on error in setting up tracking branch > branch: die on config error when unsetting upstream > branch: die on config error when editing branch description >

Re: [PATCH v1 2/6] convert.c: Remove path when not needed

2016-02-02 Thread Junio C Hamano
tbo...@web.de writes: > Subject: Re: [PATCH v1 2/6] convert.c: Remove path when not needed At least s/: Remove/: remove/, but I think s/: Remove.*/: remove unused parameter 'path'/ would be easier to read. All of these functions seem to have "path" in their name, sounding as if they meant to

Re: [PATCH] remote-curl: don't fall back to Basic auth if we haven't tried Negotiate

2016-02-02 Thread Junio C Hamano
Dmitry Vilkov writes: > This is fix of bug introduced by 4dbe66464 commit. That would be 4dbe6646 (remote-curl: fall back to Basic auth if Negotiate fails, 2015-01-08) that appears in v2.3.1 and onward. > The problem is that when username/password combination was not

Re: [PATCH v1 1/6] t0027: Add tests for get_stream_filter()

2016-02-02 Thread Junio C Hamano
tbo...@web.de writes: > From: Torsten Bögershausen > > When a filter is configured, a different code-path is used in convert.c > and entry.c via get_stream_filter(), but there are no test cases yet. > > Add tests for the filter API by configuring the ident filter. > The result of

[PATCH v3 3/4] git: simplify environment save/restore logic

2016-02-02 Thread Junio C Hamano
The only code that cares about the value of the global variable saved_env_before_alias after the previous fix is handle_builtin() that turns into a glorified no-op when the variable is true, so the logic could safely be lifted to its caller, i.e. the caller can refrain from calling it when the

[PATCH v3 1/4] git: remove an early return from save_env_before_alias()

2016-02-02 Thread Junio C Hamano
When help.autocorrect is in effect, an attempt to auto-execute an uniquely corrected result of a misspelt alias will result in an irrelevant error message. The codepath that causes this calls save_env_before_alias() and restore_env() in handle_alias(), and that happens twice. A global variable

[PATCH v3 2/4] git: protect against unbalanced calls to {save,restore}_env()

2016-02-02 Thread Junio C Hamano
We made sure that save_env_before_alias() does not skip saving the environment when asked to (which led to use-after-free of orig_cwd in restore_env() in the buggy version) with the previous step. Protect against future breakage where somebody adds new callers of these functions in an unbalanced

Re: [PATCH] remote-curl: don't fall back to Basic auth if we haven't tried Negotiate

2016-02-02 Thread brian m. carlson
On Tue, Feb 02, 2016 at 12:37:19PM -0800, Junio C Hamano wrote: > Dmitry Vilkov writes: > > > This is fix of bug introduced by 4dbe66464 commit. > > That would be 4dbe6646 (remote-curl: fall back to Basic auth if > Negotiate fails, 2015-01-08) that appears in v2.3.1

Re: [PATCH] travis-ci: run previously failed tests first, then slowest to fastest

2016-02-02 Thread Junio C Hamano
Clemens Buchacher writes: > On Mon, Feb 01, 2016 at 10:17:24AM -0800, Junio C Hamano wrote: >> >> Your proposal is to redefine "is the working tree dirty?"; it would >> check if "git checkout -f" would change what is in the working tree. > > I like this definition. Sounds

[PATCH] log -g: ignore revision parameters that have no reflog

2016-02-02 Thread Dennis Kaarsemaker
git log -g (and by extension, git reflog) gets mightly confused when trying to display the reflog of something that is not a ref that has a reflog. We can help by teaching handle_revision_arg to check all revision arguments for reflog existence if it's in reflog mode. git log -g

[PATCH v3 4/4] restore_env(): free the saved environment variable once we are done

2016-02-02 Thread Junio C Hamano
Just like we free orig_cwd, which is the value of the original working directory saved in save_env_before_alias(), once we are done with it, the contents of orig_env[] array, saved in the save_env_before_alias() function should be freed; otherwise, the second and subsequent calls to save/restore

Re: [PATCH v3 4/4] restore_env(): free the saved environment variable once we are done

2016-02-02 Thread Eric Sunshine
On Tue, Feb 2, 2016 at 6:50 PM, Junio C Hamano wrote: > Just like we free orig_cwd, which is the value of the original > working directory saved in save_env_before_alias(), once we are > done with it, the contents of orig_env[] array, saved in the > save_env_before_alias()

Re: [PATCH] log -g: ignore revision parameters that have no reflog

2016-02-02 Thread Junio C Hamano
Dennis Kaarsemaker writes: > + if (revs->reflog_info) { > + /* > + * The reflog iterator gets confused when fed things that don't > + * have reflogs. Help it along a bit > + */ > + if (strchr(arg, '@') !=

GIT windows version Switch Caps Lock button issue on the input windows

2016-02-02 Thread Evel
When I try to press the 'Caps Lock' of the keyboard, and then try to input the uppercase string, but after I switched to capital and finished input, I try to press the 'Caps Lock' button again, seems the input still keep capital letter for input, Only when I move my cursor to the other input

Re: [PATCH] Trick to force setup of a specific configured E-Mail per repo

2016-02-02 Thread Jeff King
On Wed, Feb 03, 2016 at 12:26:36PM +0700, Duy Nguyen wrote: > >> Should we generalize this use case, i.e. define a list of > >> configuration variables that must be (re-)defined per-repo? Maybe not > >> worth it, I don't know. I can't think of any other variable that > >> should behave this way

Git for Windows crashes on Windows 10

2016-02-02 Thread 孙乾程
I'm not a native English speaker. I'm sorry if I didn't explain the problem clearly. I'm using Windows 10 Enterprise Insider Preview (I'll use Win10 instead below). Until yesterday, I'm using Win10 build 11102, and Git for Windows works well. But today I upgraded my system to Win10 build 14251,

Re: Git for Windows crashes on Windows 10

2016-02-02 Thread Bryan Turner
On Tue, Feb 2, 2016 at 10:28 PM, 孙乾程 wrote: > I'm not a native English speaker. I'm sorry if I didn't explain the problem > clearly. > I'm using Windows 10 Enterprise Insider Preview (I'll use Win10 instead > below). Until yesterday, I'm using Win10 build 11102, and

Re: git log -g bizarre behaviour

2016-02-02 Thread Junio C Hamano
Dennis Kaarsemaker writes: > On ma, 2016-02-01 at 15:37 -0800, Junio C Hamano wrote: > >> Do you mean >> >> $ git checkout -b testing >> $ rm -f .git/logs/refs/heads/testing >> $ git log -g testing >> >> will be changed from a silent no-op to an

[PATCH] Trick to force setup of a specific configured E-Mail per repo

2016-02-02 Thread Dan Aloni
Previously, before 5498c57cdd63, many people did the following: git config --global user.email "(none)" This was helpful for people with more than one E-Mail address, targeting different E-Mail addresses for different clones. as it barred git from creating commit unless the user.email config

Re: [PATCH v3 00/20] refs backend rebase on pu

2016-02-02 Thread David Turner
Are there any more reviews on this? I do have some changes from this set, but they're pretty minor so I don't want to post a new one (unless folks would rather see those changes before reviewing). Let me know. Thanks. On Thu, 2016-01-14 at 11:25 -0500, David Turner wrote: > I rebased this on

Re: git log -g bizarre behaviour

2016-02-02 Thread Dennis Kaarsemaker
On di, 2016-02-02 at 11:32 -0800, Junio C Hamano wrote: > Dennis Kaarsemaker writes: > > > On ma, 2016-02-01 at 15:37 -0800, Junio C Hamano wrote: > > > > > Do you mean > > > > > > $ git checkout -b testing > > > $ rm -f .git/logs/refs/heads/testing > > >  

[PATCH v2 2/1] support -4 and -6 switches for remote operations

2016-02-02 Thread Eric Wong
Jeff King wrote: > OPT_SET_INT('4', "ipv4", _net, > N_("resolve IPv4 addresses only"), USE_NET_IPV4), > OPT_SET_INT('6', "ipv6", _net, > N_("resolve IPv6 addresses only"), USE_NET_IPV6), Thanks, I missed OPT_SET_INT before. > Using --no-ipv4 will

Re: git submodule should honor "-c credential.helper" command line argument

2016-02-02 Thread Jeff King
On Tue, Feb 02, 2016 at 06:13:14PM +0100, Marc Strapetz wrote: > git -c credential.helper=helper submodule update --init submodule > > does not invoke "helper", but falls back to the default strategies. > When configuring in ~/.gitconfig: > > [credential] > helper=helper > > git submodule

Re: git object-count differs between clones

2016-02-02 Thread Jeff King
On Tue, Feb 02, 2016 at 11:22:08AM -0600, Andrew Martin wrote: > Thanks for the clarification. I now ran "git repack -A" followed by > "git gc --prune=now", however I am still seeing the same number of objects. > What > else can I try to successfully mark these and unreachable and garbage

Re: [PATCH] Trick to force setup of a specific configured E-Mail per repo

2016-02-02 Thread Duy Nguyen
On Wed, Feb 3, 2016 at 10:56 AM, Jeff King wrote: > I find it disappointing that we go back to looking for magic sequences > in the string. Could we perhaps do this more cleanly with a new config > option? Like a "user.guessIdent" which defaults to true, but people can > set to

Re: [PATCH] Trick to force setup of a specific configured E-Mail per repo

2016-02-02 Thread Jeff King
On Wed, Feb 03, 2016 at 12:19:20PM +0700, Duy Nguyen wrote: > On Wed, Feb 3, 2016 at 10:56 AM, Jeff King wrote: > > I find it disappointing that we go back to looking for magic sequences > > in the string. Could we perhaps do this more cleanly with a new config > > option? Like a

Re: [PATCH] Trick to force setup of a specific configured E-Mail per repo

2016-02-02 Thread Duy Nguyen
On Wed, Feb 3, 2016 at 12:22 PM, Jeff King wrote: > On Wed, Feb 03, 2016 at 12:19:20PM +0700, Duy Nguyen wrote: > >> On Wed, Feb 3, 2016 at 10:56 AM, Jeff King wrote: >> > I find it disappointing that we go back to looking for magic sequences >> > in the string.

Re: [PATCH] test-lib: limit the output of the yes utility

2016-02-02 Thread Johannes Schindelin
Hi Hannes, On Tue, 2 Feb 2016, Johannes Sixt wrote: > On Windows, there is no SIGPIPE. True. But we do get some sort of write failure, no? Otherwise https://github.com/git/git/commit/2b86292ed would not work... > diff --git a/t/test-lib.sh b/t/test-lib.sh > index bd4b02e..97e6491 100644 > ---

Re: git log -g bizarre behaviour

2016-02-02 Thread Dennis Kaarsemaker
On ma, 2016-02-01 at 15:37 -0800, Junio C Hamano wrote: > Dennis Kaarsemaker writes: > > > I'm attempting to understand the log [-g] / reflog code enough to > > untangle them and make reflog walking work for more than just > > commit > > objects [see gmane 283169]. I

Re: [RFC] Identify where a Git config is defined

2016-02-02 Thread Jeff King
On Tue, Feb 02, 2016 at 05:15:51AM -0500, Jeff King wrote: > It looks like I tweaked it at some point, and I've been carrying this in > my tree (rebasing forward and using it in my normal build): > > git fetch git://github.com/peff/git jk/config-sources > > Feel free to use it as a starting

[PATCH] remote-curl: don't fall back to Basic auth if we haven't tried Negotiate

2016-02-02 Thread Dmitry Vilkov
This is fix of bug introduced by 4dbe66464 commit. The problem is that when username/password combination was not set, the first HTTP(S) request will fail and user will be asked for credentials. As a side effect of first HTTP(S) request, libcurl auth method GSS-Negotiate will be disabled

Re: [RFC] Identify where a Git config is defined

2016-02-02 Thread Jeff King
On Tue, Feb 02, 2016 at 10:27:06AM +0100, Lars Schneider wrote: > Using "git config --list" shows me all configs but sometimes I have a > hard time to figure out where a certain config is defined. This is > especially true on Windows as I found the system config in various > places. I wonder if

[RFC] Identify where a Git config is defined

2016-02-02 Thread Lars Schneider
Hi, Using "git config --list" shows me all configs but sometimes I have a hard time to figure out where a certain config is defined. This is especially true on Windows as I found the system config in various places. I wonder if other people would find it useful to enable something like "git

Usage of staging area instead of index still the way to go?

2016-02-02 Thread Lars Vogel
Hi, I was about to send patches to the Eclipse Git project to replace the usage of "Index" with "Staging area" based on this thread: http://article.gmane.org/gmane.comp.version-control.git/233469/ which Matthias Sohn (Project lead of EGit) send me a while ago. But the Git help seem to use still

Re: git object-count differs between clones

2016-02-02 Thread Matthieu Moy
Andrew Martin writes: > I ran "git fsck" on both, which reported no problems. Moreover, I ran "git gc" > and made sure there were no objects pending garbage collection, It's not sufficient: you may have objects reachable from your reflog, hence not candidate for garbage

Re: git object-count differs between clones

2016-02-02 Thread Andrew Martin
- Original Message - > From: "Matthieu Moy" > To: "Andrew Martin" > Cc: git@vger.kernel.org > Sent: Tuesday, February 2, 2016 10:09:31 AM > Subject: Re: git object-count differs between clones > > Andrew Martin

[PATCH v1 1/6] t0027: Add tests for get_stream_filter()

2016-02-02 Thread tboegi
From: Torsten Bögershausen When a filter is configured, a different code-path is used in convert.c and entry.c via get_stream_filter(), but there are no test cases yet. Add tests for the filter API by configuring the ident filter. The result of the SHA1 conversion is not checked,

[PATCH v1 6/6] convert.c: Refactor crlf_action

2016-02-02 Thread tboegi
From: Torsten Bögershausen Refactor the determination and usage of crlf_action. Today, when no attributes are set on a file, crlf_action is set to CRLF_GUESS, and later, CRLF_GUESS is used as an indication that core.autocrlf is not false and that some automatic eol conversion is

[PATCH v1 4/6] convert.c: Use text_eol_is_crlf()

2016-02-02 Thread tboegi
From: Torsten Bögershausen Add a helper function to find out, which line endings text files should get at checkout, depending on core.autocrlf and core.eol Signed-off-by: Torsten Bögershausen --- convert.c | 25 + 1 file changed, 17

[PATCH v1 2/6] convert.c: Remove path when not needed

2016-02-02 Thread tboegi
From: Torsten Bögershausen Some functions get a parameter path, but don't use it. Remove the unused parameter. Signed-off-by: Torsten Bögershausen --- convert.c | 19 +-- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/convert.c

[PATCH v1 5/6] convert: auto_crlf=false and no attributes set: same as binary

2016-02-02 Thread tboegi
From: Torsten Bögershausen When core.autocrlf is set to false, and no attributes are set, the file is treated as binary. Simplify the logic and remove duplicated code when dealing with (crlf_action == CRLF_GUESS && auto_crlf == AUTO_CRLF_FALSE) by setting crlf_action=CRLF_BINARY

[PATCH v1 3/6] convert.c: Remove input_crlf_action()

2016-02-02 Thread tboegi
From: Torsten Bögershausen Integrate the code of input_crlf_action() into convert_attrs(), so that ca.crlf_action is aleays valid after calling convert_attrs(). Keep a copy of crlf_action in attr_action, this is needed for get_convert_attr_ascii(). Remove eol_attr from struct

Re: git object-count differs between clones

2016-02-02 Thread Jeff King
On Tue, Feb 02, 2016 at 10:21:17AM -0600, Andrew Martin wrote: > > You may try expiring your reflog and "git gc" again. > > Thanks, I found some commits that are not referenced in any branch. How can I > remove these from the reflog? I tried running > "git reflog expire --expire=now

git object-count differs between clones

2016-02-02 Thread Andrew Martin
Hello, I am using git 2.7.0 on Ubuntu 14.04. I recently tried pushing a large (90,000+ commits) repository to a gogs server (https://gogs.io/) and then cloning the repository back to my machine. After running "git count-objects -v", I see a discrepancy in the number of objects: Original

[ANNOUNCE] Git Developer Summit, April 4th, 2016, NYC

2016-02-02 Thread Jeff King
I mentioned earlier[1] that plans were in the works for a developer summit as part of Git Merge this year. I'm pleased to announce that it's definitely happening, and it's time to RSVP so we can get an official headcount[2]: https://www.ticketbase.com/events/git-merge-core-contributors-summit

[PATCH v4 08/15] remote: die on config error when setting/adding branches

2016-02-02 Thread Patrick Steinhardt
When we add or set new branches (e.g. by `git remote add -f` or `git remote set-branches`) we do not check for error codes when writing the branches to the configuration file. When persisting the configuration failed we are left with a remote that has none or not all of the branches that should

[PATCH v4 10/15] clone: die on config error in cmd_clone

2016-02-02 Thread Patrick Steinhardt
The clone command does not check for error codes returned by `git_config_set` functions. This may cause the user to end up with an inconsistent repository without any indication with what went wrong. Fix this problem by dying with an error message when we are unable to write the configuration

[PATCH v4 11/15] init-db: die on config errors when initializing empty repo

2016-02-02 Thread Patrick Steinhardt
When creating an empty repository with `git init-db` we do not check for error codes returned by `git_config_set` functions. This may cause the user to end up with an inconsistent repository without any indication for the user. Fix this problem by dying early with an error message when we are

[PATCH v4 09/15] remote: die on config error when manipulating remotes

2016-02-02 Thread Patrick Steinhardt
When manipulating remotes we try to set various configuration values without checking if the values were persisted correctly, possibly leaving the remote in an inconsistent state. Fix this issue by dying early and notifying the user about the error. Signed-off-by: Patrick Steinhardt

不接触光纤

2016-02-02 Thread 不接触光纤
你的老朋友邀你来Q群:343257759

[PATCH v4 14/15] config: rename git_config_set to git_config_set_gently

2016-02-02 Thread Patrick Steinhardt
The desired default behavior for `git_config_set` is to die whenever an error occurs. Dying is the default for a lot of internal functions when failures occur and is in this case the right thing to do for most callers as otherwise we might run into inconsistent repositories without noticing. As

[PATCH v4 15/15] config: rename git_config_set_or_die to git_config_set

2016-02-02 Thread Patrick Steinhardt
Rename git_config_set_or_die functions to git_config_set, leading to the new default behavior of dying whenever a configuration error occurs. By now all callers that shall die on error have been transitioned to the _or_die variants, thus making this patch a simple rename of the functions.

[PATCH v4 13/15] compat: die when unable to set core.precomposeunicode

2016-02-02 Thread Patrick Steinhardt
When calling `git_config_set` to set 'core.precomposeunicode' we ignore the return value of the function, which may indicate that we were unable to write the value back to disk. As the function is only called by init-db we can and should die when an error occurs. Signed-off-by: Patrick Steinhardt

[PATCH v4 12/15] sequencer: die on config error when saving replay opts

2016-02-02 Thread Patrick Steinhardt
When we start picking a range of revisions we save the replay options that are required to restore state when interrupting and later continuing picking the revisions. However, we do not check the return values of the `git_config_set` functions, which may lead us to store incomplete information. As

[PATCH v4 06/15] submodule--helper: die on config error when cloning module

2016-02-02 Thread Patrick Steinhardt
When setting the 'core.worktree' option for a newly cloned submodule we ignore the return value of `git_config_set_in_file`. As this leaves the submodule in an inconsistent state, we instaed we want to inform the user that something has gone wrong by printing an error and aborting the program.

[PATCH v4 02/15] branch: die on error in setting up tracking branch

2016-02-02 Thread Patrick Steinhardt
The setup_tracking function calls install_branch_config, which may fail writing the configuration due to a locked configuration file or other error conditions. setup_tracking can also fail when trying to track ambiguous information for a reference. While this condition is checked for and an error

[PATCH v4 03/15] branch: die on config error when unsetting upstream

2016-02-02 Thread Patrick Steinhardt
When we try to unset upstream configurations we do not check return codes for the `git_config_set` functions. As those may indicate that we were unable to unset the respective configuration we may exit successfully without any error message while in fact the upstream configuration was not unset.

[PATCH v4 04/15] branch: die on config error when editing branch description

2016-02-02 Thread Patrick Steinhardt
--- builtin/branch.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/builtin/branch.c b/builtin/branch.c index 0978287..c043cfc 100644 --- a/builtin/branch.c +++ b/builtin/branch.c @@ -570,7 +570,6 @@ static const char edit_description[] = "BRANCH_DESCRIPTION"; static

[PATCH v4 01/15] config: introduce set_or_die wrappers

2016-02-02 Thread Patrick Steinhardt
A lot of call-sites for the existing family of `git_config_set` functions do not check for errors that may occur, e.g. when the configuration file is locked. In many cases we simply want to die when such a situation arises. Introduce wrappers that will cause the program to die in those cases.

[PATCH v4 05/15] submodule: die on config error when linking modules

2016-02-02 Thread Patrick Steinhardt
When trying to connect a submodule with its corresponding repository in '.git/modules' we try to set the core.worktree setting in the submodule, which may fail due to an error encountered in `git_config_set_in_file`. The function is used in the git-mv command when trying to move a submodule to

[PATCH v4 07/15] remote: die on config error when setting URL

2016-02-02 Thread Patrick Steinhardt
When invoking `git-remote --set-url` we do not check the return value when writing the actual new URL to the configuration file, pretending to the user that the configuration has been set while it was in fact not persisted. Fix this problem by dying early when setting the config fails.

[PATCH v4 00/15] config: make git_config_set die on failure

2016-02-02 Thread Patrick Steinhardt
This is the fourth version of my patch series. Version three of these patches can be found at [1]. These patches convert the `git_config_set` family of functions such that they die by default whenever an error is encountered in persisting configs. This catches a lot of cases where we wrote configs

Re: [PATCH v4 07/15] remote: die on config error when setting URL

2016-02-02 Thread Patrick Steinhardt
On Tue, Feb 02, 2016 at 12:51:48PM +0100, Patrick Steinhardt wrote: > When invoking `git-remote --set-url` we do not check the return > value when writing the actual new URL to the configuration file, > pretending to the user that the configuration has been set while > it was in fact not

Re: [ANNOUNCE] Git Developer Summit, April 4th, 2016, NYC

2016-02-02 Thread Stefan Beller
On Tue, Feb 2, 2016 at 8:12 AM, Jeff King wrote: > [2] You need a password to register. That's right! So asking via unencrypted email is fine, I guess? ;) -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More

Re: git object-count differs between clones

2016-02-02 Thread Andrew Martin
- Original Message - > From: "Jeff King" > To: "Andrew Martin" > Cc: "Matthieu Moy" , git@vger.kernel.org > Sent: Tuesday, February 2, 2016 10:52:46 AM > Subject: Re: git object-count differs between clones > > On Tue,

[ANNOUNCE] Git for Windows 2.7.0(2)

2016-02-02 Thread Johannes Schindelin
Dear Git users, It is my pleasure to announce that Git for Windows 2.7.0(2) is available from: https://git-for-windows.github.io/ I would like to dedicate this release to everyone who helps develop Git (for Windows), whether it be by contributing code, by reviewing code contributions,

git submodule should honor "-c credential.helper" command line argument

2016-02-02 Thread Marc Strapetz
git -c credential.helper=helper submodule update --init submodule does not invoke "helper", but falls back to the default strategies. When configuring in ~/.gitconfig: [credential] helper=helper git submodule update --init submodule works fine. This behavior is somewhat unexpected -- is

Re: BuGit: File-less distributed issue tracking system with Git

2016-02-02 Thread Stefan Monnier
> So, see attached BuGit, an issue tracking system which stores its > database in Git to try and get "distributed operation for free". It's now hosted at https://gitlab.com/monnier/bugit In the mean time it grew to 80KB, offers a read-only web UI, email notifications, and a fairly complete

Re: [ANNOUNCE] Git Developer Summit, April 4th, 2016, NYC

2016-02-02 Thread Jeff King
On Tue, Feb 02, 2016 at 11:12:40AM -0500, Jeff King wrote: > https://www.ticketbase.com/events/git-merge-core-contributors-summit > > It will be April 4th in New York City, from 11am-5pm, and is open to > people who develop git or any of its alternate implementations, or tools > that are

[PATCH 6/8] git submodule update: have a dedicated helper for cloning

2016-02-02 Thread Stefan Beller
This introduces a new helper function in git submodule--helper which takes care of cloning all submodules, which we want to parallelize eventually. Some tests (such as empty URL, update_mode=none) are required in the helper to make the decision for cloning. These checks have been moved into the C

[PATCH 5/8] fetching submodules: respect `submodule.fetchJobs` config option

2016-02-02 Thread Stefan Beller
This allows to configure fetching and updating in parallel without having the command line option. This moved the responsibility to determine how many parallel processes to start from builtin/fetch to submodule.c as we need a way to communicate "The user did not specify the number of parallel

[PATCH 7/8] submodule update: expose parallelism to the user

2016-02-02 Thread Stefan Beller
Expose possible parallelism either via the "--jobs" CLI parameter or the "submodule.fetchJobs" setting. By having the variable initialized to -1, we make sure 0 can be passed into the parallel processing machine, which will then pick as many parallel workers as there are CPUs. Signed-off-by:

[PATCH 8/8] clone: allow an explicit argument for parallel submodule clones

2016-02-02 Thread Stefan Beller
Just pass it along to "git submodule update", which may pick reasonable defaults if you don't specify an explicit number. Signed-off-by: Stefan Beller Signed-off-by: Junio C Hamano --- Documentation/git-clone.txt | 6 +- builtin/clone.c |

[PATCHv7 0/8] Expose submodule parallelism to the user

2016-02-02 Thread Stefan Beller
This is a resend of sb/submodule-parallel-update as is (directly taken from Junios tree), and I put it on the list to ease the life of reviewers. It applies on top of origin/sb/submodule-parallel-fetch (which is part of master already) I have looked over the patches and they still look fine to

[PATCH 4/8] submodule-config: introduce parse_generic_submodule_config

2016-02-02 Thread Stefan Beller
This rewrites parse_config to distinguish between configs specific to one submodule and configs which apply generically to all submodules. We do not have generic submodule configs yet, but the next patch will introduce "submodule.fetchJobs". Signed-off-by: Stefan Beller

[PATCH 3/8] submodule-config: remove name_and_item_from_var

2016-02-02 Thread Stefan Beller
`name_and_item_from_var` does not provide the proper abstraction we need here in a later patch. Signed-off-by: Stefan Beller Signed-off-by: Junio C Hamano --- submodule-config.c | 48 1 file changed, 16

[PATCH 2/8] submodule-config: drop check against NULL

2016-02-02 Thread Stefan Beller
Adhere to the common coding style of Git and not check explicitly for NULL throughout the file. There are still other occurrences in the code base but that is usually inside of conditions with side effects. Signed-off-by: Stefan Beller Signed-off-by: Junio C Hamano

[PATCH 1/8] submodule-config: keep update strategy around

2016-02-02 Thread Stefan Beller
We need the submodule update strategies in a later patch. Signed-off-by: Stefan Beller Signed-off-by: Junio C Hamano --- submodule-config.c | 11 +++ submodule-config.h | 1 + 2 files changed, 12 insertions(+) diff --git a/submodule-config.c

Bug: Wrong GitHub API result when retrieving repository information

2016-02-02 Thread Wert Alexander
Dear GitHub Developers, I'm using the GitHub API for retrieving statistics like stargazers_count or watchers_count. Unfortunately, an API call to https://api.github.com/users//repos returns (as JSON) the same number for stargazers_count and watchers_count, although on the Website the numbers

Re: git submodule should honor "-c credential.helper" command line argument

2016-02-02 Thread Jacob Keller
On Tue, Feb 2, 2016 at 8:25 PM, Jeff King wrote: > I think the problem is that when git "switches" to working in the > submodule repository, it clears the environment, which includes any "-c" > command switches. This makes sense for some situations, but not for > others. This

What's cooking in git.git (Feb 2016, #01; Tue, 2)

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

Re: [PATCH] Trick to force setup of a specific configured E-Mail per repo

2016-02-02 Thread Jeff King
On Tue, Feb 02, 2016 at 09:54:21PM +0200, Dan Aloni wrote: > Previously, before 5498c57cdd63, many people did the following: > >git config --global user.email "(none)" > > This was helpful for people with more than one E-Mail address, > targeting different E-Mail addresses for different

Re: [PATCH v3 4/4] restore_env(): free the saved environment variable once we are done

2016-02-02 Thread Junio C Hamano
Eric Sunshine writes: >> diff --git a/git.c b/git.c >> @@ -54,10 +54,12 @@ static void restore_env(int external_alias) >> if (external_alias && >> !strcmp(env_names[i], GIT_PREFIX_ENVIRONMENT)) >> continue; >> -

Re: [PATCH] contrib/subtree: Split history with empty trees correctly

2016-02-02 Thread David A. Greene
Marcus Brinkmann writes: >> Are you still able to do a re-roll on this? > > I have to admit that my interest has declined steeply since > discovering that subtree-split and filter-branch --subtree-filter give > different results from "git svn" on the subdirectory. The