Re: [PATCH v5 13/17] read-tree: show progress by default

2019-10-21 Thread Phillip Wood
Hi Stolee On 21/10/2019 14:56, Derrick Stolee via GitGitGadget wrote: From: Derrick Stolee The read-tree builtin has a --verbose option that signals to show progress and other data while updating the index. Update this to be on by default when stderr is a terminal window. This will help tools

Re: [RFC PATCH 7/7] merge: teach --autostash option

2019-10-18 Thread Phillip Wood
Hi Denton On 16/10/2019 18:26, Denton Liu wrote: In rebase, one can pass the `--autostash` option to cause the worktree to be automatically stashed before continuing with the rebase. This option is missing in merge, however. It might be helpful to say why this option is useful. I can see one

Re: [RFC PATCH 6/7] autostash.c: undefine USE_THE_INDEX_COMPATIBILITY_MACROS

2019-10-18 Thread Phillip Wood
Hi Denton On 16/10/2019 18:26, Denton Liu wrote: Since autostash.c was recently introduced, we should avoid USE_THE_INDEX_COMPATIBILITY_MACROS since we are trying to move away from this in the rest of the codebase. Rewrite the autostash code to not need it and remove its definition. Signed-off-

Re: [RFC PATCH 4/7] autostash: extract reset_head() from rebase

2019-10-18 Thread Phillip Wood
Hi Denton It's great to see this being libified, I've had it in mind to do this so we can avoid forking 'git checkout' in sequencer.c On 16/10/2019 18:26, Denton Liu wrote: Begin the process of lib-ifying the autostash code. In a future commit, This patch is best viewed with `--color-moved`

Re: [RFC PATCH 2/7] autostash: extract read_one() from rebase

2019-10-18 Thread Phillip Wood
Hi Denton On 16/10/2019 18:26, Denton Liu wrote: Begin the process of lib-ifying the autostash code. In a future commit, this will be used to implement `--autostash` in other builtins. This patch is best viewed with `--color-moved` and `--color-moved-ws=allow-indentation-change`. Signed-off-by

[PATCH v2 5/6] move run_commit_hook() to libgit and use it there

2019-10-15 Thread Phillip Wood via GitGitGadget
From: Phillip Wood This function was declared in commit.h but was implemented in builtin/commit.c so was not part of libgit. Move it to libgit so we can use it in the sequencer. This simplifies the implementation of run_prepare_commit_msg_hook() and will be used in the next commit. Signed-off

[PATCH v2 4/6] sequencer.h fix placement of #endif

2019-10-15 Thread Phillip Wood via GitGitGadget
From: Phillip Wood Commit 65850686cf ("rebase -i: rewrite write_basic_state() in C", 2018-08-28) accidentially added new function declarations after the #endif at the end of the include guard. Signed-off-by: Phillip Wood --- sequencer.h | 3 +-- 1 file changed, 1 insertion(+), 2

[PATCH v2 2/6] t3404: set $EDITOR in subshell

2019-10-15 Thread Phillip Wood via GitGitGadget
From: Phillip Wood As $EDITOR is exported setting it in one test affects all subsequent tests. Avoid this by always setting it in a subshell. This commit leaves 20 calls to set_fake_editor that are not in subshells as they can safely be removed in the next commit once all the other editor

[PATCH v2 0/6] sequencer: start running post-commit hook again

2019-10-15 Thread Phillip Wood via GitGitGadget
Patch 6 (was 3) I've tided up the test and removed the wrapper function for running the post-commit hook as suggested. Phillip Wood (6): t3404: remove unnecessary subshell t3404: set $EDITOR in subshell t3404: remove uneeded calls to set_fake_editor sequencer.h fix placement of #

[PATCH v2 1/6] t3404: remove unnecessary subshell

2019-10-15 Thread Phillip Wood via GitGitGadget
From: Phillip Wood Neither of the commands executed in the subshell change any shell variables or the current directory so there is no need for them to be executed in a subshell. Signed-off-by: Phillip Wood --- t/t3404-rebase-interactive.sh | 6 ++ 1 file changed, 2 insertions(+), 4

[PATCH v2 6/6] sequencer: run post-commit hook

2019-10-15 Thread Phillip Wood via GitGitGadget
From: Phillip Wood Prior to commit 356ee4659b ("sequencer: try to commit without forking 'git commit'", 2017-11-24) the sequencer would always run the post-commit hook after each pick or revert as it forked `git commit` to create the commit. The conversion to committing

[PATCH v2 3/6] t3404: remove uneeded calls to set_fake_editor

2019-10-15 Thread Phillip Wood via GitGitGadget
From: Phillip Wood Some tests were calling set_fake_editor to ensure they had a sane no-op editor set. Now that all the editor setting is done in subshells these tests can rely on EDITOR=: and so do not need to call set_fake_editor. Also add a test at the end to detect any future additions

Re: [PATCH 2/3] sequencer: use run_commit_hook()

2019-10-14 Thread Phillip Wood
Hi Dscho & Junio On 11/10/2019 05:24, Junio C Hamano wrote: > Johannes Schindelin writes: > >>> builtin/commit.c | 22 -- >>> commit.h | 3 --- >>> sequencer.c | 45 ++--- >>> sequencer.h | 2 ++ >>> 4 files changed

Re: [PATCH 3/3] sequencer: run post-commit hook

2019-10-11 Thread Phillip Wood
Hi Dscho On 10/10/2019 22:31, Johannes Schindelin wrote: Hi Phillip, On Thu, 10 Oct 2019, Phillip Wood via GitGitGadget wrote: From: Phillip Wood Prior to commit 356ee4659b ("sequencer: try to commit without forking 'git commit'", 2017-11-24) the sequencer would always

[PATCH 3/3] sequencer: run post-commit hook

2019-10-10 Thread Phillip Wood via GitGitGadget
From: Phillip Wood Prior to commit 356ee4659b ("sequencer: try to commit without forking 'git commit'", 2017-11-24) the sequencer would always run the post-commit hook after each pick or revert as it forked `git commit` to create the commit. The conversion to committing

[PATCH 1/3] sequencer.h fix placement of #endif

2019-10-10 Thread Phillip Wood via GitGitGadget
From: Phillip Wood Commit 65850686cf ("rebase -i: rewrite write_basic_state() in C", 2018-08-28) accidentially added new function declarations after the #endif at the end of the include guard. Signed-off-by: Phillip Wood --- sequencer.h | 3 +-- 1 file changed, 1 insertion(+), 2

[PATCH 2/3] sequencer: use run_commit_hook()

2019-10-10 Thread Phillip Wood via GitGitGadget
From: Phillip Wood This simplifies the implementation of run_prepare_commit_msg_hook() and will be used in the next commit. Signed-off-by: Phillip Wood --- builtin/commit.c | 22 -- commit.h | 3 --- sequencer.c | 45

[PATCH 0/3] sequencer: start running post-commit hook again

2019-10-10 Thread Phillip Wood via GitGitGadget
When I converted the sequencer to avoid forking git commit i forgot about the post-commit hook. These patches are based on pw/rebase-i-show-HEAD-to-reword, otherwise the new test fails as that branch changes the number of commits we make. Phillip Wood (3): sequencer.h fix placement of #endif

Re: Raise your hand to Ack jk/code-of-conduct if your Ack fell thru cracks

2019-10-09 Thread Phillip Wood
who wanted to give their Acks but forgot to do so, to raise their hands on this thread. I forgot to add Acked-by: Phillip Wood to my original reply in this thread, could you add it please Thanks Phillip Thanks for starting the concluding move on this topic. For reference, here is the CoC

Re: [PATCH 1/1] commit: add support to provide --coauthor

2019-10-08 Thread Phillip Wood
On 08/10/2019 11:11, Phillip Wood wrote: > Hi Toon & Zeger-Jan > > On 08/10/2019 08:49, Toon Claes wrote: >> Add support to provide the Co-author when committing. For each >> co-author provided with --coauthor=, a line is added at the >> bottom of the commit me

Re: [PATCH 1/1] commit: add support to provide --coauthor

2019-10-08 Thread Phillip Wood
Hi Toon & Zeger-Jan On 08/10/2019 08:49, Toon Claes wrote: Add support to provide the Co-author when committing. For each co-author provided with --coauthor=, a line is added at the bottom of the commit message, like this: Co-authored-by: It's a common practice use when pairing up with o

Re: What's cooking in git.git (Oct 2019, #01; Thu, 3)

2019-10-05 Thread Phillip Wood
Hi Elijah On 05/10/2019 01:40, Elijah Newren wrote: On Fri, Oct 4, 2019 at 4:49 AM Phillip Wood wrote: Hi Junio On 03/10/2019 06:04, Junio C Hamano wrote: Here are the topics that have been cooking. Commits prefixed with '-' are only in 'pu' (proposed updates) while c

Re: What's cooking in git.git (Oct 2019, #01; Thu, 3)

2019-10-04 Thread Phillip Wood
Hi Junio On 03/10/2019 06:04, Junio C Hamano wrote: 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

Re: [PATCH v4 3/6] rebase -i: support --committer-date-is-author-date

2019-10-04 Thread Phillip Wood
Hi Rohit The handling of ident_split is looking better now but I've got a question below about returning vs going to a cleanup section when there's an error. On 07/09/2019 12:50, Rohit Ashiwal wrote: rebase am already has this flag to "lie" about the committer date by changing it to the auth

Re: [PATCH v4 1/6] rebase -i: add --ignore-whitespace flag

2019-10-04 Thread Phillip Wood
Hi Rohit On 07/09/2019 12:50, Rohit Ashiwal wrote: There are two backends available for rebasing, viz, the am and the interactive. Naturally, there shall be some features that are implemented in one but not in the other. One such flag is --ignore-whitespace which indicates merge mechanism to tre

Re: [PATCH v1 4/5] rebase: fill `squash_onto' in get_replay_opts()

2019-10-02 Thread Phillip Wood
Hi Dscho On 02/10/2019 09:16, Johannes Schindelin wrote: Hi, On Fri, 27 Sep 2019, Phillip Wood wrote: Hi Alban On 25/09/2019 21:13, Alban Gruin wrote: >>> [...] builtin/rebase.c | 5 + 1 file changed, 5 insertions(+) diff --git a/builtin/rebase.c b/builtin/rebas

Re: [PATCH v1 0/5] Use complete_action’s todo list to do the rebase

2019-09-27 Thread Phillip Wood
Hi Alban On 25/09/2019 21:13, Alban Gruin wrote: This can be seen as a continuation of ag/reduce-rewriting-todo. Currently, complete_action() releases its todo list before calling sequencer_continue(), which reloads the todo list from the disk. This series removes this useless round trip. Pat

Re: [PATCH v1 4/5] rebase: fill `squash_onto' in get_replay_opts()

2019-09-27 Thread Phillip Wood
Hi Alban On 25/09/2019 21:13, Alban Gruin wrote: get_replay_opts() did not fill `squash_onto' if possible, meaning that I'm not sure what you mean by 'if possible' here, I think the sentance makes sense without that. this field should be read from the disk by the sequencer through read_pop

Re: [PATCH v1 5/5] sequencer: directly call pick_commits() from complete_action()

2019-09-27 Thread Phillip Wood
Hi Alban Thanks for removing some more unnecessary work reloading the the todo list. On 25/09/2019 21:13, Alban Gruin wrote: Currently, complete_action() calls sequencer_continue() to do the rebase. Even though the former already has the todo list, the latter loads it from the disk and parses

Re: [PATCH v4 5/6] rebase -i: support --ignore-date

2019-09-27 Thread Phillip Wood
Hi Rohit This is an improvement but there are a couple of outstanding issues from the previous round with regard to handing --ignore-date when GIT_COMMITTER_DATE is set. I'll try and look at the rest of the series soon. On 07/09/2019 12:50, Rohit Ashiwal wrote: rebase am already has this fla

Re: [PATCH v2 00/19] hashmap bug/safety/ease-of-use fixes

2019-09-26 Thread Phillip Wood
Hi Eric On 24/09/2019 02:03, Eric Wong wrote: Patches 1-11 are largely unchanged from the original series with the exception of 2, which is new and posted at: https://public-inbox.org/git/20190908074953.kux7zz4y7iolqko4@whir/ 12-17 take further steps to get us away from hashmap_entry b

Re: [PATCH] add a Code of Conduct document

2019-09-24 Thread Phillip Wood
Hi Gábor On 24/09/2019 10:01, SZEDER Gábor wrote: On Tue, Sep 24, 2019 at 02:44:54AM -0400, Jeff King wrote: [...] After some poking around at various CoC options, this one seemed like the best fit to me. But I'm open to suggestions or more discussion. It seems to me that the important piece i

Re: [PATCH] add a Code of Conduct document

2019-09-24 Thread Phillip Wood
Hi Peff On 24/09/2019 07:44, Jeff King wrote: We've never had a formally written Code of Conduct document. Though it has been discussed off and on over the years, for the most part the behavior on the mailing list has been good enough that nobody felt the need to push one forward. However, even

Re: [PATCH 0/1] git-config --add allows values from stdin

2019-09-23 Thread Phillip Wood
Hi Taylor and ZJ On 22/09/2019 04:11, Taylor Blau wrote: Hi ZJ, On Tue, Sep 17, 2019 at 03:31:34PM +0200, Zeger-Jan van de Weg wrote: When adding or updating configuration values using git-config, the values could all be observed by different processes as these are passed as arguments. In some

Re: [PATCH v2] rebase: introduce --update-branches option

2019-09-23 Thread Phillip Wood
Hi On 09/09/2019 15:13, Johannes Schindelin wrote: Hi, On Mon, 9 Sep 2019, Phillip Wood wrote: On 08/09/2019 00:44, Warren He wrote: Everyone in this thread, thanks for your support and encouragement. [...] It should not really imply `--interactive`, but `--rebase-merges

Re: [PATCH] name-rev: avoid cutoff timestamp underflow

2019-09-23 Thread Phillip Wood
On 23/09/2019 09:37, SZEDER Gábor wrote: On Sun, Sep 22, 2019 at 11:01:26PM +0200, Johannes Sixt wrote: Am 22.09.19 um 21:53 schrieb SZEDER Gábor: On Sun, Sep 22, 2019 at 07:57:36PM +0100, Phillip Wood wrote: On 22/09/2019 19:01, SZEDER Gábor wrote: +/* + * One day. See the 'name

Re: [PATCH] name-rev: avoid cutoff timestamp underflow

2019-09-22 Thread Phillip Wood
Hi Gábor On 22/09/2019 19:01, SZEDER Gábor wrote: When 'git name-rev' is invoked with commit-ish parameters, it tries to save some work, and doesn't visit commits older than the committer date of the oldest given commit minus a one day worth of slop. Since our 'timestamp_t' is an unsigned type,

Re: [PATCH v4 0/6] rebase -i: support more options

2019-09-09 Thread Phillip Wood
On 09/09/2019 19:02, Junio C Hamano wrote: Rohit Ashiwal writes: Following the suggestion of Phillip I've rebased my patch on master (745f681289) and cherry-picking b0a3186140. Sorry, but that's horrible. The latter does not even cleanly apply on the former. Yes I had assumed that the che

Re: [PATCH v2] rebase: introduce --update-branches option

2019-09-09 Thread Phillip Wood
Hi Warren On 08/09/2019 00:44, Warren He wrote: Everyone in this thread, thanks for your support and encouragement. [...] It should not really imply `--interactive`, but `--rebase-merges`. `imply_interactive` doesn't fully switch on `--interactive`, i.e., causing the editor to open. It only s

Re: [PATCH] rebase: introduce --update-branches option

2019-09-03 Thread Phillip Wood
Hi Warren On 03/09/2019 00:41, Warren He wrote: Sometimes people have to rebase multiple related branches. One way to do that quickly, when there are branches pointing to ancestors of a later branch (which happens a lot if you try hard to pad your PR count on GitHub--I mean if you try to make sm

Re: [PATCH 1/1] rebase -r: let `label` generate safer labels

2019-09-02 Thread Phillip Wood
Hi Matt This is definitely worth fixing, I've got a couple of comments below On 02/09/2019 15:01, Matt R via GitGitGadget wrote: From: Matt R The `label` todo command in interactive rebases creates temporary refs in the `refs/rewritten/` namespace. These refs are stored as loose refs, i.e. as

Re: git-diff passes : args to GIT_EXTERNAL_DIFF incorrectly?

2019-08-30 Thread Phillip Wood
On 30/08/2019 14:23, Dmitry Nikulin wrote: On Fri, 30 Aug 2019 at 13:16, Phillip Wood wrote: I'm not sure why the last argument is being split in your example. It is not split in the example below I have replicated the splitting issue on my small demo repo [1]: $ env GIT_EXTERNAL

Re: git-diff passes : args to GIT_EXTERNAL_DIFF incorrectly?

2019-08-30 Thread Phillip Wood
Hi Dmitry On 29/08/2019 15:36, Dmitry Nikulin wrote: Thank you for the reply. [...] However, for the original repository where I first faced this problem (https://github.com/yandexdataschool/Practical_RL), Git passes a very weird set of args to the external diff: $ env GIT_EXTERNAL_DIFF=./print

Re: [PATCH 1/1] checkout: add simple check for 'git checkout -b'

2019-08-29 Thread Phillip Wood
Hi Stolee On 29/08/2019 18:01, Derrick Stolee via GitGitGadget wrote: From: Derrick Stolee The 'git switch' command was created to separate half of the behavior of 'git checkout'. It specifically has the mode to do nothing with the index and working directory if the user only specifies to crea

Re: error: cannot cherry-pick during a revert

2019-08-29 Thread Phillip Wood
Hi Mike On 29/08/2019 00:25, Mike Hommey wrote: Hi, This just happened to me while cherry-pick'ing: $ git cherry-pick HEAD@{1} error: could not apply 614fe5e629b84... try hint: after resolving the conflicts, mark the corrected paths hint: with 'git add ' or 'git rm ' hint: and commit the resul

Re: [PATCH 10/11] introduce container_of macro

2019-08-28 Thread Phillip Wood
On 27/08/2019 15:49, Derrick Stolee wrote: On 8/25/2019 10:43 PM, Eric Wong wrote: This macro is popular within the Linux kernel for supporting intrusive data structures such as linked lists, red-black trees, and chained hash tables while allowing the compiler to do type checking. I intend to u

Re: [PATCH 04/11] hashmap_entry: detect improper initialization

2019-08-28 Thread Phillip Wood
Hi Eric On 27/08/2019 10:49, Eric Wong wrote: Johannes Schindelin wrote: Hi Eric, On Mon, 26 Aug 2019, Eric Wong wrote: By renaming the "hash" field to "_hash", it's easy to spot improper initialization of hashmap_entry structs which can leave "hashmap_entry.next" uninitialized. Would you

Re: [PATCH v5 0/2] Honor .gitattributes with rebase --am

2019-08-26 Thread Phillip Wood
Hi Brian On 26/08/2019 00:33, brian m. carlson wrote: This series makes rebase --am honor the .gitattributes file for subsequent patches when a patch changes it. Note that there are two places we load attributes in ll-merge.c, but this code only handles the one that git am uses. The two cannot

Re: [PATCH v4 2/2] apply: reload .gitattributes after patching it

2019-08-26 Thread Phillip Wood
On 20/08/2019 19:32, Phillip Wood wrote: On 20/08/2019 19:24, Junio C Hamano wrote: Phillip Wood writes: Do you know why -m and -i aren't affected? I had to look, but I believe the answer is because they use the sequencer, and the sequencer calls git merge-recursive as a separate pr

Re: [PATCH 3/3] sequencer: simplify root commit creation

2019-08-22 Thread Phillip Wood
On 19/08/2019 17:09, Eric Sunshine wrote: On Mon, Aug 19, 2019 at 5:18 AM Phillip Wood via GitGitGadget wrote: Adapt try_to_commit() to create a new root commit rather than special casing this in run_git_commit(). The significantly reduces the amount of s/The/This/ Thanks Eric - well

Re: [PATCH v3 1/6] rebase -i: add --ignore-whitespace flag

2019-08-20 Thread Phillip Wood
Hi Rohit On 20/08/2019 04:45, Rohit Ashiwal wrote: There are two backends available for rebasing, viz, the am and the interactive. Naturally, there shall be some features that are implemented in one but not in the other. One such flag is --ignore-whitespace which indicates merge mechanism to tre

Re: [PATCH v3 0/6] rebase -i: support more options

2019-08-20 Thread Phillip Wood
On 20/08/2019 18:53, Junio C Hamano wrote: Phillip Wood writes: Hi Rohit On 20/08/2019 04:45, Rohit Ashiwal wrote: I've tries to incorporated all the suggestions. It is helpful if you can list the changes to remind us all what we said. (as a patch author I find composing that is he

Re: [PATCH v4 2/2] apply: reload .gitattributes after patching it

2019-08-20 Thread Phillip Wood
On 20/08/2019 19:24, Junio C Hamano wrote: Phillip Wood writes: Do you know why -m and -i aren't affected? I had to look, but I believe the answer is because they use the sequencer, and the sequencer calls git merge-recursive as a separate process, and so the writing of the tree is

Re: [PATCH v3 5/6] rebase -i: support --ignore-date

2019-08-20 Thread Phillip Wood
On 20/08/2019 18:42, Junio C Hamano wrote: Rohit Ashiwal writes: +/* Construct a free()able author string with current time as the author date */ +static char *ignore_author_date(const char *author) +{ + int len = strlen(author); Mental note: ignore_author_date() would not allow author

Re: [PATCH v3 0/6] rebase -i: support more options

2019-08-20 Thread Phillip Wood
Hi Rohit On 20/08/2019 04:45, Rohit Ashiwal wrote: I've tries to incorporated all the suggestions. It is helpful if you can list the changes to remind us all what we said. (as a patch author I find composing that is helpful to remind me if there's anything I've forgotten to address) Also t

Re: [PATCH v3 5/6] rebase -i: support --ignore-date

2019-08-20 Thread Phillip Wood
Hi Rohit On 20/08/2019 04:45, Rohit Ashiwal wrote: rebase am already has this flag to "lie" about the author date by changing it to the committer (current) date. Let's add the same for interactive machinery. Signed-off-by: Rohit Ashiwal --- Documentation/git-rebase.txt| 6 +--

Re: [PATCH v3 3/6] rebase -i: support --committer-date-is-author-date

2019-08-20 Thread Phillip Wood
Hi Rohit One thing that struck we was that we should support this with rebase -r which means setting GIT_COMMITTER_DATE when we fork 'git merge'. I've got a couple of other comments below On 20/08/2019 04:45, Rohit Ashiwal wrote: rebase am already has this flag to "lie" about the committer d

Re: [PATCH 2/2] rebase.c: make sure current branch isn't moved when autostashing

2019-08-20 Thread Phillip Wood
Hi Ben I need to have a longer look at this (I don't understand why we're calling reset --hard after we've stashed the changes) but I notice that the test lines you're changing predate the switch to the builtin rebase so those changes are not related to the branch switching problem. Best Wis

Re: [PATCH 1/2] t3420: never change upstream branch

2019-08-20 Thread Phillip Wood
Hi Ben On 18/08/2019 10:53, Ben Wijen wrote: When using `git rebase --autostash ` and the workarea is dirty, the active branch is incorrectly reset to the rebase branch. This test will check for such behavior. Signed-off-by: Ben Wijen --- t/t3420-rebase-autostash.sh | 9 + 1 file

Re: [PATCH v4 2/2] apply: reload .gitattributes after patching it

2019-08-20 Thread Phillip Wood
On 20/08/2019 04:05, brian m. carlson wrote: On 2019-08-19 at 09:55:27, Phillip Wood wrote: On 19/08/2019 10:41, Phillip Wood wrote: [...] diff --git a/convert.c b/convert.c index 94ff837649..030e9b81b9 100644 --- a/convert.c +++ b/convert.c @@ -1293,10 +1293,11 @@ struct conv_attrs

Re: [PATCH v4 2/2] apply: reload .gitattributes after patching it

2019-08-20 Thread Phillip Wood
Hi Brian On 20/08/2019 03:45, brian m. carlson wrote: On 2019-08-19 at 09:41:42, Phillip Wood wrote: Hi Brian On 18/08/2019 19:44, brian m. carlson wrote: When applying multiple patches with git am, or when rebasing using the am backend, it's possible that one of our patches has upda

Re: [PATCH v4 2/2] apply: reload .gitattributes after patching it

2019-08-19 Thread Phillip Wood
On 19/08/2019 10:41, Phillip Wood wrote: [...] diff --git a/convert.c b/convert.c index 94ff837649..030e9b81b9 100644 --- a/convert.c +++ b/convert.c @@ -1293,10 +1293,11 @@ struct conv_attrs {   const char *working_tree_encoding; /* Supported encoding or default encoding if NULL

Re: [PATCH v4 2/2] apply: reload .gitattributes after patching it

2019-08-19 Thread Phillip Wood
Hi Brian On 18/08/2019 19:44, brian m. carlson wrote: When applying multiple patches with git am, or when rebasing using the am backend, it's possible that one of our patches has updated a gitattributes file. Currently, we cache this information, so if a file in a subsequent patch has attributes

Re: [PATCH 0/2] git rebase: Make sure upstream branch is left alone.

2019-08-19 Thread Phillip Wood
Hi Ben On 18/08/2019 10:53, Ben Wijen wrote: I found an issue with git rebase --autostash with an dirty worktree/index. It seems the currently active branch is moved, which is not correct. I'm not sure I understand what you mean by "the currently active branch is moved". 'git rebase --auto

[PATCH 0/3] rebase -i: always update HEAD before rewording

2019-08-19 Thread Phillip Wood via GitGitGadget
This series contains a couple of patches to make the C version of rebase --interactive behave more like the scripted version. The third patch is not strictly related to the first two but is included here to avoid merge conflicts. Phillip Wood (3): rebase -i: always update HEAD before rewording

[PATCH 1/3] rebase -i: always update HEAD before rewording

2019-08-19 Thread Phillip Wood via GitGitGadget
From: Phillip Wood If the user runs git log while rewording a commit it is confusing if sometimes we're amending the commit that's being reworded and at other times we're creating a new commit depending on whether we could fast-forward or not[1]. Fix this inconsistency by always

[PATCH 3/3] sequencer: simplify root commit creation

2019-08-19 Thread Phillip Wood via GitGitGadget
From: Phillip Wood Adapt try_to_commit() to create a new root commit rather than special casing this in run_git_commit(). The significantly reduces the amount of special case code for creating the root commit and reduces the number of commit code paths we have to worry about. Signed-off-by

[PATCH 2/3] rebase -i: check for updated todo after squash and reword

2019-08-19 Thread Phillip Wood via GitGitGadget
From: Phillip Wood While a rebase is stopped for the user to edit a commit message it can be convenient for them to also edit the todo list. The scripted version of rebase supported this but the C version does not. We already check to see if the todo list has been updated by an exec command so

Re: [GSoC][PATCH v2 5/6] rebase -i: support --ignore-date

2019-08-17 Thread Phillip Wood
On 14/08/2019 20:33, Junio C Hamano wrote: Phillip Wood writes: That's an important distinction, particularly if GIT_COMMITTER_DATE is set in the environment - are we aiming to have the author and committer dates match or are we just resetting the author date to now? Rohit - do you know

Re: minor interactive rebase regression: HEAD points to wrong commit while rewording

2019-08-15 Thread Phillip Wood
On 14/08/2019 22:20, SZEDER Gábor wrote: On Mon, Aug 12, 2019 at 09:28:52PM +0100, Phillip Wood wrote: Save the updated commit message, and after the editor opens up the third commit's log message, check again where HEAD is pointing to now: ~/tmp/reword (master +|REBASE-i 2/3)$ hea

Re: [GSoC][PATCH v2 5/6] rebase -i: support --ignore-date

2019-08-14 Thread Phillip Wood
On 13/08/2019 22:45, Junio C Hamano wrote: Rohit Ashiwal writes: --ignore-date:: - This flag is passed to 'git am' to change the author date - of the rebased commits (see linkgit:git-am[1]). + Instead of using the given author date, re-set it to the value + same as co

Re: [GSoC][PATCH v2 5/6] rebase -i: support --ignore-date

2019-08-14 Thread Phillip Wood
Hi Junio & Rohit On 13/08/2019 18:21, Junio C Hamano wrote: Phillip Wood writes: +static void push_dates(struct child_process *child) +{ + time_t now = time(NULL); + struct strbuf date = STRBUF_INIT; + + strbuf_addf(&date, "@%"PRIuM

Re: [GSoC][PATCH v2 3/6] rebase -i: support --committer-date-is-author-date

2019-08-14 Thread Phillip Wood
On 13/08/2019 18:06, Junio C Hamano wrote: Phillip Wood writes: [...] + + strbuf_addf(&date, "@%s",ident.date_begin); I think we should use %s.* and ident.date_end to be sure we getting what we want. Your version is OK if the author is formatted correctly but I&

Re: [GSoC][PATCH v2 3/6] rebase -i: support --committer-date-is-author-date

2019-08-13 Thread Phillip Wood
On 12/08/2019 20:42, Rohit Ashiwal wrote: rebase am already has this flag to "lie" about the committer date by changing it to the author date. Let's add the same for interactive machinery. Signed-off-by: Rohit Ashiwal --- Documentation/git-rebase.txt| 8 +++- builtin/rebase.c

Re: [GSoC][PATCH v2 4/6] sequencer: rename amend_author to author_to_rename

2019-08-13 Thread Phillip Wood
Hi Rohit On 12/08/2019 20:42, Rohit Ashiwal wrote: The purpose of amend_author was to free() the malloc()'d string obtained from get_author() while amending a commit. But we can also use the variable to free() the author at our convenience. Rename it to convey this meaning. Thanks for rewordin

Re: [GSoC][PATCH v2 5/6] rebase -i: support --ignore-date

2019-08-13 Thread Phillip Wood
Hi Rohit This is looking better - there are a couple of memory management issues and minor nit-picks but apart from that it looks good. On 12/08/2019 20:42, Rohit Ashiwal wrote: rebase am already has this flag to "lie" about the author date by changing it to the committer (current) date. Let'

Re: [GSoC][PATCH v2 3/6] rebase -i: support --committer-date-is-author-date

2019-08-13 Thread Phillip Wood
On 13/08/2019 11:38, Phillip Wood wrote: Hi Rohit [...] @@ -964,6 +976,25 @@ static int run_git_commit(struct repository *r,   {   struct child_process cmd = CHILD_PROCESS_INIT; +    if (opts->committer_date_is_author_date) { +    size_t len; +    int res = -1; +    str

Re: [GSoC][PATCH v2 1/6] rebase -i: add --ignore-whitespace flag

2019-08-13 Thread Phillip Wood
Hi Rohit Thanks for the re-roll On 12/08/2019 20:42, Rohit Ashiwal wrote: There are two backends available for rebasing, viz, the am and the interactive. Naturally, there shall be some features that are implemented in one but not in the other. One such flag is --ignore-whitespace which indicate

Re: [GSoC][PATCH v2 3/6] rebase -i: support --committer-date-is-author-date

2019-08-13 Thread Phillip Wood
Hi Rohit This is looking good, I think it is almost there now On 12/08/2019 20:42, Rohit Ashiwal wrote: rebase am already has this flag to "lie" about the committer date by changing it to the author date. Let's add the same for interactive machinery. Signed-off-by: Rohit Ashiwal --- Documen

Re: minor interactive rebase regression: HEAD points to wrong commit while rewording

2019-08-12 Thread Phillip Wood
On 12/08/2019 18:50, SZEDER Gábor wrote: When running interactive rebase to reword a commit message, I would expect that the commit whose message I'm rewording is checked out. This is not quite the case when rewording multiple subsequent commit messages. Let's start with four commits, and start

Re: Incorrect behavior from git checkout --patch

2019-08-11 Thread Phillip Wood
Hi Dave On 11/08/2019 10:54, Phillip Wood wrote: Hi Dave Thanks for the bug report. I've tried to reproduce it on the latest master, version 2.22.0 and 2.20.1 and am unable to do so. Doh, I was doing 'git checkout -p HEAD', when I checkout from the index I can reproduce th

Re: Incorrect behavior from git checkout --patch

2019-08-11 Thread Phillip Wood
Hi Dave Thanks for the bug report. I've tried to reproduce it on the latest master, version 2.22.0 and 2.20.1 and am unable to do so. I thought it might be related to a bug I recently fixed[1] but it does not appear to be. I've appended the files I used below just in case I made a mistake tra

Re: [GSoC][PATCHl 5/6] rebase -i: support --ignore-date

2019-08-08 Thread Phillip Wood
On 08/08/2019 12:42, Phillip Wood wrote: On 06/08/2019 18:36, Rohit Ashiwal wrote: rebase am already has this flag to "lie" about the author date by changing it to the committer (current) date. Let's add the same for interactive machinery. Signed-off-by: Rohit Ashiwal --- >

Re: [GSoC][PATCHl 1/6] rebase -i: add --ignore-whitespace flag

2019-08-08 Thread Phillip Wood
Hi Rohit On 06/08/2019 18:36, Rohit Ashiwal wrote: There are two backends available for rebasing, viz, the am and the interactive. Naturally, there shall be some features that are implemented in one but not in the other. One such flag is --ignore-whitespace which indicates merge mechanism to tre

Re: [GSoC][PATCHl 6/6] rebase: add --author-date-is-committer-date

2019-08-08 Thread Phillip Wood
Hi Rohit On 06/08/2019 18:36, Rohit Ashiwal wrote: The previous commit introduced --ignore-date flag to interactive rebase, but the name is actually very vague in context of rebase -i since there are two dates we can work with. Add an alias to convey the precise purpose. That's an excellent id

Re: [GSoC][PATCHl 5/6] rebase -i: support --ignore-date

2019-08-08 Thread Phillip Wood
On 06/08/2019 18:36, Rohit Ashiwal wrote: rebase am already has this flag to "lie" about the author date by changing it to the committer (current) date. Let's add the same for interactive machinery. Signed-off-by: Rohit Ashiwal --- Documentation/git-rebase.txt| 6 ++-- builti

Re: [GSoC][PATCHl 4/6] sequencer: rename amend_author to author_to_rename

2019-08-08 Thread Phillip Wood
Hi Rohit On 06/08/2019 18:36, Rohit Ashiwal wrote: The purpose of amend_author was to free() the malloc()'d string obtained from get_author(). But the name does not actually convey this purpose. Rename it to something meaningful. The name was intended to covey that it was only used when amendi

Re: [GSoC][PATCHl 3/6] rebase -i: support --committer-date-is-author-date

2019-08-08 Thread Phillip Wood
Hi Rohit On 06/08/2019 18:36, Rohit Ashiwal wrote: rebase am already has this flag to "lie" about the committer date by changing it to the author date. Let's add the same for interactive machinery. Signed-off-by: Rohit Ashiwal --- Documentation/git-rebase.txt| 8 +++- builtin/r

Re: amend warnings with no changes staged

2019-08-06 Thread Phillip Wood
On 06/08/2019 04:53, Junio C Hamano wrote: Junio C Hamano writes: Jonathan Nieder writes: Some non-judgemental descriptive output like $ git commit --amend --no-edit No changes. $ would address this case, without bothering people who are doing it intentionally. So

Re: Support for --stdin-paths in commit, add, etc

2019-08-01 Thread Phillip Wood
On 01/08/2019 14:25, Alexandr Miloslavskiy wrote: On 31.07.2019 19:19, Jeff King wrote: I don't have any real objection to adding stdin support for more commands. Bu tin the specific case you're discussing, it seems like using "git update-index" might already solve your problem. It's the intende

Re: [BUG]: Destructive behaviour of git revert

2019-07-30 Thread Phillip Wood
Hi Andreas On 30/07/2019 18:24, Andreas Wiesinger wrote: Hello, git revert for merges will mark merged files as deleted and commit them as if they would have been deleted, but that is for sure never what anybody would expect and has deleted many files unintentionally and unrecognized in our rep

Re: [RFC PATCH 0/9] rebase -i: extend rebase.missingCommitsCheck to `--edit-todo' and co.

2019-07-29 Thread Phillip Wood
Hi Alban On 25/07/2019 21:26, Alban Gruin wrote: Hi Phillip, Le 24/07/2019 à 15:29, Phillip Wood a écrit : Hi Alban Thanks for working on this, it's great to see you back on the list and I think it would be a useful addition to rebase. Unfortunately I'm not sure about this impl

Re: [GSoC][PATCH v2 2/2] rebase -i: support --committer-date-is-author-date

2019-07-24 Thread Phillip Wood
Hi Rohit On 23/07/2019 20:57, Rohit Ashiwal wrote: Hi Phillip On Sat, 20 Jul 2019 15:56:50 +0100 Phillip Wood wrote: [...] @@ -467,6 +470,9 @@ int cmd_rebase__interactive(int argc, const char **argv, const char *prefix) OPT_BOOL(0, "autosquash", &o

Re: [RFC PATCH 0/9] rebase -i: extend rebase.missingCommitsCheck to `--edit-todo' and co.

2019-07-24 Thread Phillip Wood
g point of the rebase. I think dscho's garden-shears script does something similar. Under the proposed scheme if I subsequently edit the todo list it will not catch any deleted commits as the original list is empty. Best Wishes Phillip The idea to extend this feature was suggested to me mo

Re: [GSoC][PATCH v2 1/1] rebase -i: add --ignore-whitespace flag

2019-07-22 Thread Phillip Wood
Hi Rohit, It's good to see another patch reducing the differences between the rebase back ends. On 18/07/2019 19:55, Rohit Ashiwal wrote: > There are two backends available for rebasing, viz, the am and the > interactive. Naturally, there shall be some features that are > implemented in one but n

Re: [GSoC][PATCH v2 2/2] rebase -i: support --committer-date-is-author-date

2019-07-20 Thread Phillip Wood
Hi Rohit It's good to see this patch reducing the differences between the rebase backends. On 18/07/2019 20:03, Rohit Ashiwal wrote: rebase am already has this flag to "lie" about the committer date by changing it to the author date. Let's add the same for interactive machinery. Signed-off-b

Re: What's cooking in git.git (Jul 2019, #01; Wed, 3)

2019-07-11 Thread Phillip Wood
On 08/07/2019 23:02, Junio C Hamano wrote: > Phillip Wood writes: > >>> * pw/rebase-progress-test-cleanup (2019-07-01) 1 commit >>> - t3420: remove progress lines before comparing output >>> (this branch uses sg/rebase-progress.) >>> >>> Test

Re: What's cooking in git.git (Jul 2019, #01; Wed, 3)

2019-07-04 Thread Phillip Wood
On 03/07/2019 23:28, Junio C Hamano wrote: > 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 hol

Re: [PATCH 1/1] t3420: remove progress lines before comparing output

2019-07-04 Thread Phillip Wood
On 02/07/2019 18:23, Junio C Hamano wrote: > Phillip Wood writes: > >>> As long as sed implementation used here does not do anything funny >>> to CR, I think the approach to strip everything before the last CR >>> on the line is sensible. As I am not familiar

[PATCH v2 1/1] t3420: remove progress lines before comparing output

2019-07-04 Thread Phillip Wood via GitGitGadget
From: Phillip Wood Some of the tests check the output of rebase is what we expect. These were added after a regression that added unwanted stash output when using --autostash. They are useful as they prevent unintended changes to the output of the various rebase commands. However they also

  1   2   3   4   5   6   7   8   9   10   >