[PATCH v3 4/8] commit: move post-rewrite code to libgit

2017-11-17 Thread Phillip Wood
From: Phillip Wood Move run_rewrite_hook() from bulitin/commit.c to sequencer.c so it can be shared with other commands and add a new function commit_post_rewrite() based on the code in builtin/commit.c that encapsulates rewriting notes and running the post-rewrite

[PATCH v3 0/8] sequencer: don't fork git commit

2017-11-17 Thread Phillip Wood
From: Phillip Wood I've updated these based on the feedback for v2. I've dropped the patch that stopped print_commit_summary() from dying as I think it is better to die than return an error (see the commit message of the patch that adds print_commit_summary() for the

[PATCH v3 7/8] sequencer: load commit related config

2017-11-17 Thread Phillip Wood
From: Phillip Wood Load default values for message cleanup and gpg signing of commits in preparation for committing without forking 'git commit'. Signed-off-by: Phillip Wood --- Notes: changes since v1: - renamed

[PATCH v3 3/8] Add a function to update HEAD after creating a commit

2017-11-17 Thread Phillip Wood
From: Phillip Wood Add update_head_with_reflog() based on the code that updates HEAD after committing in builtin/commit.c that can be called by 'git commit' and other commands. Signed-off-by: Phillip Wood --- Notes: changes since v2:

[PATCH v3 2/8] commit: move empty message checks to libgit

2017-11-17 Thread Phillip Wood
From: Phillip Wood Move the functions that check for empty messages from bulitin/commit.c to sequencer.c so they can be shared with other commands. The functions are refactored to take an explicit cleanup mode and template filename passed by the caller.

[PATCH v3 5/8] commit: move print_commit_summary() to libgit

2017-11-17 Thread Phillip Wood
From: Phillip Wood Move print_commit_summary() from builtin/commit.c to sequencer.c so it can be shared with other commands. The function is modified by changing the last argument to a flag so callers can specify whether they want to show the author date in addition

[PATCH v3 8/8] sequencer: try to commit without forking 'git commit'

2017-11-17 Thread Phillip Wood
From: Phillip Wood If the commit message does not need to be edited then create the commit without forking 'git commit'. Taking the best time of ten runs with a warm cache this reduces the time taken to cherry-pick 10 commits by 27% (from 282ms to 204ms), and the time

[PATCH v3 6/8] sequencer: simplify adding Signed-off-by: trailer

2017-11-17 Thread Phillip Wood
From: Phillip Wood Add the Signed-off-by: trailer in one place rather than adding it to the message when doing a recursive merge and specifying '--signoff' when running 'git commit'. This means that if there are conflicts when merging with a strategy other than

[PATCH v3 1/8] t3404: check intermediate squash messages

2017-11-17 Thread Phillip Wood
From: Phillip Wood When there is more than one squash/fixup command in a row check the intermediate messages are correct. Signed-off-by: Phillip Wood --- t/t3404-rebase-interactive.sh | 4 1 file changed, 4 insertions(+) diff --git

is there a rationale for some sample hooks but not others?

2017-11-17 Thread Robert P. J. Day
given that a newly-initialized repo contains samples for some hooks but not others, is there a simple rationale for why those particular sample hooks are provided, and not the rest? just curious. rday -- Robert P. J.

Re: git send-email does not work with Google anymore?!

2017-11-17 Thread Lars Schneider
> On 23 Oct 2017, at 18:27, Dennis Kaarsemaker wrote: > > On Thu, 2017-10-05 at 12:52 +0200, Lars Schneider wrote: >> Hi, >> >> I used to use the Google SMTP server to send my patches to the list with >> the following config: > >> 8 --- > >> Apparently that stopped

[PATCH v2] launch_editor(): indicate that Git waits for user input

2017-11-17 Thread lars . schneider
From: Junio C Hamano When a graphical GIT_EDITOR is spawned by a Git command that opens and waits for user input (e.g. "git rebase -i"), then the editor window might be obscured by other windows. The user may be left staring at the original Git terminal window without even

Re: [PATCH v4 4/6] list-objects: filter objects in traverse_commit_list

2017-11-17 Thread Jeff Hostetler
On 11/16/2017 9:14 PM, Junio C Hamano wrote: Jeff King writes: Those encodings don't necessarily need to be the same, because they're about transport. Inside each process we'd have the raw bytes, and encode them as appropriate to whatever sub-program we're going to pass to

Re: [PATCH] Makefile: check that tcl/tk is installed

2017-11-17 Thread Christian Couder
On Thu, Nov 16, 2017 at 2:35 AM, Junio C Hamano wrote: > Christian Couder writes: > >> To improve the current behavior when Tcl/Tk is not installed, >> let's just check that TCLTK_PATH points to something and error >> out right away if this is not

Re: [PATCH v2] launch_editor(): indicate that Git waits for user input

2017-11-17 Thread Eric Sunshine
On Fri, Nov 17, 2017 at 8:51 AM, wrote: > When a graphical GIT_EDITOR is spawned by a Git command that opens > and waits for user input (e.g. "git rebase -i"), then the editor window > might be obscured by other windows. The user may be left staring at the > original

Re: [PATCH v2] launch_editor(): indicate that Git waits for user input

2017-11-17 Thread Junio C Hamano
lars.schnei...@autodesk.com writes: > Junio posted the original version of this patch [1] as response to my RFC [2]. > I took Junio's patch and slightly changed the commit message as well as the > message printed to the user after GIT_EDITOR is invoked [3]. > > Thanks, > Lars Thanks. > diff

Re: [PATCH 1/2] Documentation about triangular workflow

2017-11-17 Thread Stefan Beller
Thanks for contributing to Git and making the documentation better! On Fri, Nov 17, 2017 at 8:07 AM, Daniel Bensoussan wrote: > From: ALBERTIN TIMOTHEE 11514771 This is a place where you can describe why this change is

Re: [PATCH V3] config: add --expiry-date

2017-11-17 Thread hsed
On 2017-11-16 00:54, Junio C Hamano wrote: - if (parse_expiry_date(value, expire)) - return error(_("'%s' for '%s' is not a valid timestamp"), -value, var); ... + if (parse_expiry_date(value, timestamp)) + die(_("failed to

Re: [PATCH v4 07/10] introduce fetch-object: fetch one promisor object

2017-11-17 Thread Jeff Hostetler
On 11/16/2017 2:57 PM, Ramsay Jones wrote: On 16/11/17 18:12, Jeff Hostetler wrote: From: Jonathan Tan Introduce fetch-object, providing the ability to fetch one object from a promisor remote. [snip] +#include "transport.h" I note that this still does not

[PATCH 2/2] Triangular workflow

2017-11-17 Thread Daniel Bensoussan
The documentation about triangular workflow was not clear enough. So it couldn't be clear enough for someone else. That's why we decided to change it. Some documentation about triangular workflow already exists. However, it seems unfortunate that there is no documentation about it in Git.

Re: [PATCH] Makefile: check that tcl/tk is installed

2017-11-17 Thread Todd Zullinger
Christian Couder wrote: On Thu, Nov 16, 2017 at 2:35 AM, Junio C Hamano wrote: I suspect that this change will hurt those who package Git for other people. Maybe a little bit, but in my opinion it should not be a big problem for them to install Tcl/Tk and its dependencies

[PATCH 1/2] Documentation about triangular workflow

2017-11-17 Thread Daniel Bensoussan
From: ALBERTIN TIMOTHEE 11514771 --- Documentation/gitworkflows.txt | 215 + 1 file changed, 215 insertions(+) diff --git a/Documentation/gitworkflows.txt b/Documentation/gitworkflows.txt index 02569d061..3f1ddba82

Re: is there a rationale for some sample hooks but not others?

2017-11-17 Thread Jonathan Nieder
Hi Robert, Robert P. J. Day wrote: > given that a newly-initialized repo contains samples for some hooks > but not others, is there a simple rationale for why those particular > sample hooks are provided, and not the rest? I assume this is in the context of reviewing the Pro Git book. Thanks

Re: [PATCH v4 5/6] rev-list: add list-objects filtering support

2017-11-17 Thread Jeff Hostetler
On 11/16/2017 9:14 PM, Junio C Hamano wrote: Jonathan Tan writes: If it were up to me, I would remove all existing mentions of "partial clone" and explain the presence of the "--missing" argument as follows: In the future, we will introduce a "partial clone"

Re: [PATCH v3 1/1] Introduce git add --renormalize .

2017-11-17 Thread Eric Sunshine
On Thu, Nov 16, 2017 at 11:38 AM, wrote: > Make it safer to normalize the line endings in a repository: > Files that had been commited with CRLF will be commited with LF. > > The old way to normalize a repo was like this: > # Make sure that there are not untracked files > $ echo

Re: [PATCH 2/2] Triangular workflow

2017-11-17 Thread Martin Ågren
On 17 November 2017 at 17:07, Daniel Bensoussan wrote: > The documentation about triangular workflow was not clear enough. I think you would be able to `git rebase -i` these two patches into a single, perfect patch. ;-) Maybe in collaboration with Albertin? >

Re: [PATCH] Makefile: check that tcl/tk is installed

2017-11-17 Thread Jeff King
On Fri, Nov 17, 2017 at 12:42:58PM -0500, Todd Zullinger wrote: > > I'd rather add a separate check for msgfmt than mixing the 2 issues, > > because I think that unless it has been explicitly told to do so, Git > > should not try to build git-gui and gitk in the first place if there is > > a big

Re: Bug in "revision.c: --all adds HEAD from all worktrees" ?

2017-11-17 Thread Jeff King
On Wed, Nov 15, 2017 at 09:38:26PM +, Luke Diamand wrote: > >> Quite a few of the worktrees have expired - their head revision has > >> been GC'd and no longer points to anything sensible > >> (gc.worktreePruneExpire). The function other_head_refs() in worktree.c > >> bails out if there's an

Re: [PATCH] config: avoid "write_in_full(fd, buf, len) != len" pattern

2017-11-17 Thread Jeff King
On Wed, Nov 15, 2017 at 12:40:43PM +, Phillip Wood wrote: > From: Phillip Wood > > As explained in commit 06f46f237 (avoid "write_in_full(fd, buf, len) > != len" pattern, 2017–09–13) the return value of write_in_full() is > either -1 or the requested number of

Re: [PATCH v4 07/10] introduce fetch-object: fetch one promisor object

2017-11-17 Thread Stefan Beller
On Fri, Nov 17, 2017 at 11:49 AM, Jeff Hostetler wrote: > > > On 11/16/2017 2:57 PM, Ramsay Jones wrote: >> >> >> >> On 16/11/17 18:12, Jeff Hostetler wrote: >>> >>> From: Jonathan Tan >>> >>> Introduce fetch-object, providing the ability to

Re: [PATCH 1/2] Documentation about triangular workflow

2017-11-17 Thread Martin Ågren
On 17 November 2017 at 17:07, Daniel Bensoussan wrote: > +- If the maintainer accepts the changes, he merges them into the > + **UPSTREAM** repository. Personally, I would prefer "they" and "their" over "he" and "his". I'm not sure how universal this preference

Re: [PATCH v4 07/10] introduce fetch-object: fetch one promisor object

2017-11-17 Thread Ramsay Jones
On 17/11/17 19:49, Jeff Hostetler wrote: > > > On 11/16/2017 2:57 PM, Ramsay Jones wrote: >> >> >> On 16/11/17 18:12, Jeff Hostetler wrote: >>> From: Jonathan Tan >>> >>> Introduce fetch-object, providing the ability to fetch one object from a >>> promisor remote. >

Re: Is it not bug git stash -- does not work at non-root directory?

2017-11-17 Thread Junio C Hamano
小川恭史 writes: >> Please make it a habit (not limited to when interacting with >> _this_ project) to state a bit more than "does not work"; >> instead, say "it is expected to do X, but instead it does Y, and >> the difference between X and Y I perceive is Z". > > Thanks.

Re: [PATCH 1/2] Documentation about triangular workflow

2017-11-17 Thread Junio C Hamano
Daniel Bensoussan writes: > +TRIANGULAR WORKFLOW > +--- > + > +Introduction > + > + > +In some projects, contributors cannot push directly to the project but > +have to suggest their commits to the maintainer (e.g. pull requests). >

Re: [PATCH v2] launch_editor(): indicate that Git waits for user input

2017-11-17 Thread Junio C Hamano
Eric Sunshine writes: >> @@ -40,6 +40,32 @@ int launch_editor(const char *path, struct strbuf >> *buffer, const char *const *en >> + static const char *close_notice = NULL; >> + >> + if (isatty(2) && !close_notice) { > > If you reverse this

Re: [PATCH v3 1/1] Introduce git add --renormalize .

2017-11-17 Thread Junio C Hamano
Eric Sunshine writes: > I _could_ understand if this functionality lived in, say, a new > command git-attr: > ... > (I have since read the thread in which Junio's suggested[1] that > git-add could house this functionality, but it still feels too > high-level.) If this

[PATCH V4] config: add --expiry-date

2017-11-17 Thread hsed
From: Haaris Mehmood Add --expiry-date as a data-type for config files when 'git config --get' is used. This will return any relative or fixed dates from config files as timestamps. This is useful for scripts (e.g. gc.reflogexpire) that work with timestamps so that '2.weeks'

[PATCH v2] rebase: use mboxrd format to avoid split errors

2017-11-17 Thread Eric Wong
Sorry, I forgot about this for a while :x Florian Weimer wrote: > On 10/08/2017 11:30 PM, Eric Wong wrote: > >diff --git a/git-rebase--am.sh b/git-rebase--am.sh > My context is slightly different, but I added the mboxrd options manually to >

Re: [PATCH] Reduce performance penalty for turned off traces

2017-11-17 Thread Jeff King
On Wed, Nov 15, 2017 at 11:14:20AM -0800, Stefan Beller wrote: > > I did manually disable HAVE_VARIADIC_MACROS and confirmed that the > > result builds and passes the test suite (though I suspect that GIT_TRACE > > is not well exercised by the suite). > > GIT_TRACE is exercised in the test suite

Re: [PATCH v4 4/6] list-objects: filter objects in traverse_commit_list

2017-11-17 Thread Jeff King
On Fri, Nov 17, 2017 at 10:42:52AM -0500, Jeff Hostetler wrote: > > Yes, I share the same feeling. It does not help that the series > > defines its own notion of arg_needs_armor() and uses it to set a > > field called requires_armor that is not yet used, the definition of > > "armor"ing being

Re: [PATCH] Reduce performance penalty for turned off traces

2017-11-17 Thread Jeff King
On Sun, Nov 12, 2017 at 11:24:11PM +, Gennady Kupava wrote: > In reality, gcc didn't do that and I saw 3 function calls. I am pretty > sure that compiler of the distant bright future will do that, and only > problem would be to eliminate that single function call. Hopefully > with -flto it

Re: Improved error handling (Was: [PATCH 1/2] sequencer: factor out rewrite_file())

2017-11-17 Thread Jeff King
On Mon, Nov 06, 2017 at 05:13:15PM +0100, Simon Ruderich wrote: > On Sat, Nov 04, 2017 at 10:07:00PM -0400, Jeff King wrote: > > Yes, I think what you've written here (and below) is quite close to the > > error_context patches I linked elsewhere in the thread. In other > > words, I think it's a

Is it not bug git stash -- does not work at non-root directory?

2017-11-17 Thread 小川恭史
Is it not bug git stash -- does not work at non-root directory?

Re: [PATCH V4] config: add --expiry-date

2017-11-17 Thread Junio C Hamano
h...@unimetic.com writes: > diff --git a/config.c b/config.c > index 903abf953..64f8aa42b 100644 > --- a/config.c > +++ b/config.c > @@ -990,6 +990,16 @@ int git_config_pathname(const char **dest, const char > *var, const char *value) > return 0; > } > > +int

Re: [PATCH v3 0/8] sequencer: don't fork git commit

2017-11-17 Thread Junio C Hamano
Phillip Wood writes: > From: Phillip Wood > > I've updated these based on the feedback for v2. I've dropped the > patch that stopped print_commit_summary() from dying as I think it is > better to die than return an error (see the commit

Re: Is it not bug git stash -- does not work at non-root directory?

2017-11-17 Thread Junio C Hamano
小川恭史 writes: > Is it not bug git stash -- does not work at non-root directory? Please make it a habit (not limited to when interacting with _this_ project) to state a bit more than "does not work"; instead, say "it is expected to do X, but instead it does Y, and the

Re: [PATCH v3 0/8] sequencer: don't fork git commit

2017-11-17 Thread Junio C Hamano
Junio C Hamano writes: > Phillip Wood writes: > >> From: Phillip Wood >> >> I've updated these based on the feedback for v2. I've dropped the >> patch that stopped print_commit_summary() from dying as I think it is >>

Re: Is it not bug git stash -- does not work at non-root directory?

2017-11-17 Thread 小川恭史
> Please make it a habit (not limited to when interacting with _this_ project) to state a bit more than "does not work"; instead, say "it is expected to do X, but instead it does Y, and the difference between X and Y I perceive is Z". Thanks. I'll rewrite the issue. Assuming that we have