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

2019-09-02 Thread Philip Oakley
On 02/09/2019 19:29, Junio C Hamano wrote: I see there are "lets make sure it is unique by suffixing "-%d" in other codepaths; would that help if this piece of code yields a label that is not unique? maybe use a trailing 4 characters  of the oid to get a reasonably unique label? Oh, just seen

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

2019-09-02 Thread brian m. carlson
On 2019-09-02 at 18:29:56, Junio C Hamano wrote: > Phillip Wood writes: > > > Being picking I'll point out that ':' is not a valid in refs > > either. Looking at > > https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file I > > think only " and | are not allowed on NTFS/FAT but are va

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

2019-09-02 Thread Johannes Schindelin
Hi Phillip, On Mon, 2 Sep 2019, Phillip Wood wrote: > 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 I just noticed that the surname is abbreviated. The full name of the author is "Matt Rogers". (Matt

Re: [PATCH] [PATCH] git-gui: Add hotkeys to set widget focus

2019-09-02 Thread Bert Wesarg
On Sun, Sep 1, 2019 at 9:37 PM Birger Skogeng Pedersen wrote: > > The user cannot change focus between the list of files, the diff view and > the commit message widgets without using the mouse (clicking either of > the four widgets). > > With this patch, the user may set ui focus to the previously

Re: [PATCH] [PATCH] git-gui: Add hotkeys to set widget focus

2019-09-02 Thread Birger Skogeng Pedersen
Ah, sorry I misunderstood you. Thanks, Birger

Re: [PATCH] [PATCH] git-gui: Add hotkeys to set widget focus

2019-09-02 Thread Pratyush Yadav
On 02/09/19 08:35PM, Birger Skogeng Pedersen wrote: > On Mon, Sep 2, 2019 at 8:19 PM Pratyush Yadav wrote: > > You missed removing this extra blank line. Will fix it up locally. > > > > > + set _index $file_lists_last_clicked($widget) > > [snip] > > > To be honest I felt the blank li

Re: [PATCH] [PATCH] git-gui: Add hotkeys to set widget focus

2019-09-02 Thread Birger Skogeng Pedersen
On Mon, Sep 2, 2019 at 8:19 PM Pratyush Yadav wrote: > You missed removing this extra blank line. Will fix it up locally. > > > + set _index $file_lists_last_clicked($widget) > [snip] To be honest I felt the blank line there was appropriate, in an attempt to follow the same code styl

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

2019-09-02 Thread Junio C Hamano
Phillip Wood writes: > Being picking I'll point out that ':' is not a valid in refs > either. Looking at > https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file I > think only " and | are not allowed on NTFS/FAT but are valid in refs > (see the man page for git check-ref-format for

Re: [PATCH] [PATCH] git-gui: Add hotkeys to set widget focus

2019-09-02 Thread Pratyush Yadav
Hi Birger, Other than a minor change that I can do locally, this looks good. I'll test it a bit and then merge it. Thanks. On 01/09/19 09:36PM, Birger Skogeng Pedersen wrote: [snip] > +proc select_path_in {widget} { > + global file_lists last_clicked selected_paths ui_workdir > + global

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: [PATCH 0/9] [RFC] New sparse-checkout builtin and "cone" mode

2019-09-02 Thread Eric Sunshine
On Sat, Aug 24, 2019 at 1:40 AM Elijah Newren wrote: > My $0.02: I think `git worktree add` should not only adopt the setting > of core.sparseCheckout from the current worktree, but it should also > adopt the $GIT_DIR/info/sparse-checkout file too. As another example in favor of imbuing "git work

Re: [PATCH v6 1/2] builtin/rebase.c: make sure the active branch isn't moved when autostashing

2019-09-02 Thread Junio C Hamano
Ben writes: >> As long as you make it clear that you are 100% happy with the >> fixed-up result that appeared in 'pu', there is no need to resend >> (if you want to make any other changes, I do want to avoid me >> screwing up by listening to you and hand applying those changes; I'd >> rather want

Re: [PATCH] git-gui: Add hotkeys to set widget focus

2019-09-02 Thread Philip Oakley
On 02/09/2019 13:25, Pratyush Yadav wrote: On 01/09/19 11:27PM, Philip Oakley wrote: Hi Pratyus, On 01/09/2019 12:32, Pratyush Yadav wrote: Hi Birger, In case you haven't been following the list, Pat has been inactive recently, so I am acting as the interim maintainer of git-gui for now, becau

Re: [PATCH v2 1/3] factor out refresh_and_write_cache function

2019-09-02 Thread Thomas Gummerer
On 08/30, Junio C Hamano wrote: > Martin Ågren writes: > > > There's a difference in behavior that I'm not sure about: We used > > to ignore the return value of `refresh_cache()`, i.e. we didn't care > > whether it had any errors. I have no idea whether that's safe to do -- > > especially as we g

Re: [PATCH v4 1/4] t6006: simplify and optimize empty message test

2019-09-02 Thread Johannes Schindelin
Hi Elijah, On Thu, 29 Aug 2019, Elijah Newren wrote: > Despite only being one piece of the 71st test and there being 73 tests > overall, this small change to just this one test speeds up the overall > execution time of t6006 (as measured by the best of 3 runs of `time > ./t6006-rev-list-format.sh

Re: [PATCH v4 2/4] t3427: accelerate this test by using fast-export and fast-import

2019-09-02 Thread Johannes Schindelin
Hi Elijah, On Thu, 29 Aug 2019, Elijah Newren wrote: > fast-export and fast-import can easily handle the simple rewrite that > was being done by filter-branch, and should be significantly faster on > systems with a slow fork. Timings from before and after on two laptops > that I have access to (

Re: [PATCH 03/11] hashmap_entry_init takes "struct hashmap_entry *"

2019-09-02 Thread Johannes Schindelin
Hi Eric, On Fri, 30 Aug 2019, Eric Wong wrote: > Johannes Schindelin wrote: > > > > On Tue, 27 Aug 2019, Derrick Stolee wrote: > > > > > On 8/25/2019 10:43 PM, Eric Wong wrote: > > > > C compilers do type checking to make life easier for us. So > > > > rely on that and update all hashmap_entry_

Re: [PATCH] git-gui: Add hotkeys to set widget focus

2019-09-02 Thread Pratyush Yadav
On 01/09/19 11:27PM, Philip Oakley wrote: > Hi Pratyus, > On 01/09/2019 12:32, Pratyush Yadav wrote: > > Hi Birger, > > > > In case you haven't been following the list, Pat has been inactive > > recently, so I am acting as the interim maintainer of git-gui for now, > > because no one else stepped

Re: [PATCH] git-gui: Add hotkeys to set widget focus

2019-09-01 Thread Philip Oakley
Hi Pratyus, On 01/09/2019 12:32, Pratyush Yadav wrote: Hi Birger, In case you haven't been following the list, Pat has been inactive recently, so I am acting as the interim maintainer of git-gui for now, because no one else stepped up and Junio would rather not maintain it. You can find my fork

Re: [PATCH] git-gui: Add hotkeys to set widget focus

2019-09-01 Thread Birger Skogeng Pedersen
Hello Bert, > But I don't understand this in full. Does this mean pressing CTRL+1 or > +2 does also changes the file selection? Why isn't it sufficient to > just focus the respective file list widget? And than have bindings to > change the selection? > > Bert I don't think it's feasible to focus

Re: [PATCH] git-gui: Add hotkeys to set widget focus

2019-09-01 Thread Bert Wesarg
On Sun, Sep 1, 2019 at 1:32 PM Pratyush Yadav wrote: > > + > > +proc select_first_unstaged_changes_path {} { > > + global ui_workdir > > + select_first_path $ui_workdir > > +} > > + > > +proc select_first_staged_changes_path {} { > > + global ui_index > > + select_first_path $ui_in

Re: [PATCH] git-gui: Add hotkeys to set widget focus

2019-09-01 Thread Bert Wesarg
Hi Birger, On Sat, Aug 31, 2019 at 2:23 PM Birger Skogeng Pedersen wrote: > > The user cannot change focus between the list of files, the diff view and > the commit message widgets without using the mouse (clicking either of > the four widgets ). that bugged me two, but never come up with a good

Re: [PATCH] git-gui: Add hotkeys to set widget focus

2019-09-01 Thread Birger Skogeng Pedersen
Hello Pratyush, (New patch according to our discussion coming up) On Sun, Sep 1, 2019 at 1:32 PM Pratyush Yadav wrote: > In case you haven't been following the list, Pat has been inactive > recently, so I am acting as the interim maintainer of git-gui for now, > because no one else stepped up

Re: [PATCH v6 1/2] builtin/rebase.c: make sure the active branch isn't moved when autostashing

2019-09-01 Thread Ben
On 01-09-2019 18:01, Junio C Hamano wrote: > Ben writes: > >> >> Would you like me to send in another patch or leave it like this? > > As long as you make it clear that you are 100% happy with the > fixed-up result that appeared in 'pu', there is no need to resend > (if you want to make any o

Re: [PATCH] git-gui: Add hotkeys to set widget focus

2019-09-01 Thread Junio C Hamano
Pratyush Yadav writes: > ... I am acting as the interim maintainer of git-gui for now, > ... > You can find my fork over at https://github.com/prati0100/git-gui. I am aware of three topics (call-do-quit-before-exit, reload-config and revert-hunks-lines) of your own, plus your 'master' over ther

Re: [PATCH v6 1/2] builtin/rebase.c: make sure the active branch isn't moved when autostashing

2019-09-01 Thread Junio C Hamano
Ben writes: > On 30-08-2019 22:15, Junio C Hamano wrote: >> Ben Wijen writes: >> >>> + >>> struct commit *head = >>> - lookup_commit_reference(the_repository, >>> - &options.orig_head); >>> +

Re: [PATCH] git-gui: Add hotkeys to set widget focus

2019-09-01 Thread Pratyush Yadav
Hi Birger, In case you haven't been following the list, Pat has been inactive recently, so I am acting as the interim maintainer of git-gui for now, because no one else stepped up and Junio would rather not maintain it. You can find my fork over at https://github.com/prati0100/git-gui. I munge

Re: [PATCH] git-gui: Add hotkeys to set widget focus

2019-08-31 Thread Birger Skogeng Pedersen
(Finally picking this up again) I've been using this feature for about one year now. If I may say so, I think it is actually really great. It's really helpful for me to be able to use git-gui with just the keyboard, and I'm hoping others will find it useful, too. Let me know what you guys think.

Re: [PATCH v6 2/2] builtin/rebase.c: Remove pointless message

2019-08-31 Thread Ben
Hi Junio, On 30-08-2019 22:16, Junio C Hamano wrote: > Ben Wijen writes: > >> -struct object_id head_oid; >> -if (get_oid("HEAD", &head_oid)) { >> -ret = error(_("could not determine HEAD >> revision")); > > I think we saw die

Re: [PATCH v6 1/2] builtin/rebase.c: make sure the active branch isn't moved when autostashing

2019-08-31 Thread Ben
On 30-08-2019 22:15, Junio C Hamano wrote: > Ben Wijen writes: > >> + >> struct commit *head = >> -lookup_commit_reference(the_repository, >> -&options.orig_head); >> +

Re: [PATCH v2] merge-options.txt: clarify meaning of various ff-related options

2019-08-30 Thread Junio C Hamano
Elijah Newren writes: > On Fri, Aug 30, 2019 at 12:45 PM Junio C Hamano wrote: >> >> Martin Ågren writes: >> >> >> +--ff:: >> >> + Whether to only allow resolving the merge as a fast forward >> >> + (only updating the branch pointer to match the merged branch >> >> + and not c

Re: [PATCH v3] merge-options.txt: clarify meaning of various ff-related options

2019-08-30 Thread Eric Sunshine
On Fri, Aug 30, 2019 at 3:57 PM Junio C Hamano wrote: > If we want to dedicate one paragraph for each of these options, we > can and should make the introductory paragraph lighter by saying > something like > > Specifies how a merge is handled when the merged-in history > is alread

Re: [PATCH v6 2/2] builtin/rebase.c: Remove pointless message

2019-08-30 Thread Junio C Hamano
Ben Wijen writes: > @@ -1968,13 +1968,6 @@ int cmd_rebase(int argc, const char **argv, const char > *prefix) > state_dir_path("autostash", &options); > struct child_process stash = CHILD_PROCESS_INIT; > struct object_id oi

Re: [PATCH v6 1/2] builtin/rebase.c: make sure the active branch isn't moved when autostashing

2019-08-30 Thread Junio C Hamano
Ben Wijen writes: > diff --git a/builtin/rebase.c b/builtin/rebase.c > index 670096c065..abcbfb8f01 100644 > --- a/builtin/rebase.c > +++ b/builtin/rebase.c > @@ -1968,9 +1968,13 @@ int cmd_rebase(int argc, const char **argv, const char > *prefix) > state_dir_path("

Re: [PATCH] [PoC] A simpler find_unique_prefixes() implementation

2019-08-30 Thread Johannes Schindelin
Hi Gábor, On Wed, 28 Aug 2019, SZEDER Gábor wrote: > Implement find_unique_prefixes() by sorting the prefix items > lexicographically and then looking for unique prefixes in adjacent > pairs. It's definitely shorter than the current hashmap-based > implementation (101 vs 149 lines), subjectively

Re: [PATCH v3] merge-options.txt: clarify meaning of various ff-related options

2019-08-30 Thread Junio C Hamano
Elijah Newren writes: > diff --git a/Documentation/merge-options.txt b/Documentation/merge-options.txt > index 79a00d2a4a..ed3804650b 100644 > --- a/Documentation/merge-options.txt > +++ b/Documentation/merge-options.txt > @@ -40,20 +40,26 @@ set to `no` at the beginning of them. > case of

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

2019-08-30 Thread Eric Wong
Phillip Wood wrote: > 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 stru

Re: [PATCH v2] merge-options.txt: clarify meaning of various ff-related options

2019-08-30 Thread Elijah Newren
On Fri, Aug 30, 2019 at 12:45 PM Junio C Hamano wrote: > > Martin Ågren writes: > > >> +--ff:: > >> + Whether to only allow resolving the merge as a fast forward > >> + (only updating the branch pointer to match the merged branch > >> + and not creating a merge commit), to never

Re: [PATCH 03/11] hashmap_entry_init takes "struct hashmap_entry *"

2019-08-30 Thread Eric Wong
Johannes Schindelin wrote: > Hi Stolee, > > On Tue, 27 Aug 2019, Derrick Stolee wrote: > > > On 8/25/2019 10:43 PM, Eric Wong wrote: > > > C compilers do type checking to make life easier for us. So > > > rely on that and update all hashmap_entry_init callers to take > > > "struct hashmap_entry

Re: [PATCH v5 2/2] am: reload .gitattributes after patching it

2019-08-30 Thread Johannes Schindelin
Hi brian, On Thu, 29 Aug 2019, brian m. carlson wrote: > On 2019-08-28 at 11:30:53, Johannes Schindelin wrote: > > > diff --git a/convert.c b/convert.c > > > index 94ff837649..0e6e9d2d75 100644 > > > --- a/convert.c > > > +++ b/convert.c > > > @@ -8,6 +8,7 @@ > > > #include "pkt-line.h" > > > #

Re: [PATCH v2] merge-options.txt: clarify meaning of various ff-related options

2019-08-30 Thread Junio C Hamano
Martin Ågren writes: >> +--ff:: >> + Whether to only allow resolving the merge as a fast forward >> + (only updating the branch pointer to match the merged branch >> + and not creating a merge commit), to never allow it (always >> + creating a merge commit), or to prefer i

Re: [PATCH 10/11] introduce container_of macro

2019-08-30 Thread Eric Wong
Derrick Stolee wrote: > On 8/25/2019 10:43 PM, Eric Wong wrote: > > + * container_of - Get the address of an object containing a field. > > + * > > + * @ptr: pointer to the field. > > + * @type: type of the object. > > + * @member: name of the field within the object. > > + */ > > +#define contain

Re: [PATCH 11/11] hashmap_get_next returns "struct hashmap_entry *"

2019-08-30 Thread Eric Wong
Derrick Stolee wrote: > On 8/25/2019 10:43 PM, Eric Wong wrote: > > --- a/diff.c > > +++ b/diff.c > > @@ -1035,8 +1035,10 @@ static void pmb_advance_or_null_multi_match(struct > > diff_options *o, > > { > > int i; > > char *got_match = xcalloc(1, pmb_nr); > > + struct hashmap_entry *en

Re: [PATCH] clarify documentation for remote helpers

2019-08-30 Thread Junio C Hamano
David Turner writes: > The only other restriction I see is: in order for the connectivity-skipping > optimization to be used, the file with s/.keep/.idx/, and the corresponding > pack, must exist. Do you think that's worth mentioning? It seems to be > implied by the rest of the text. Perhaps

Re: [PATCH v3 1/2] list-objects-filter: only parse sparse OID when 'have_git_dir'

2019-08-30 Thread Junio C Hamano
Jon Simons writes: > diff --git a/list-objects-filter-options.c b/list-objects-filter-options.c > index 1cb20c659c..aaba312edb 100644 > --- a/list-objects-filter-options.c > +++ b/list-objects-filter-options.c > @@ -71,7 +71,8 @@ static int gently_parse_list_objects_filter( >* com

RE: [PATCH] clarify documentation for remote helpers

2019-08-30 Thread David Turner
> -Original Message- > From: Junio C Hamano > Sent: Friday, August 30, 2019 1:35 PM > To: David Turner > Cc: Martin Ågren ; Git Mailing List > > Subject: Re: [PATCH] clarify documentation for remote helpers > > David Turner writes: > > > I was co

Re: [PATCH] clarify documentation for remote helpers

2019-08-30 Thread Junio C Hamano
David Turner writes: > I was confused, because I read "a file under GIT_DIR/objects/pack" > to mean "just the filename". Some of the things that deal with > packs take just the filename (e.g. --keep-pack for git repack). > I'll fix the under under and add $, but I do want to clarify that > it's

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

2019-08-30 Thread Junio C Hamano
Taylor Blau writes: > I wholeheartedly agree with this, and pledge my $.02 towards it as well. > Now with a combined total of $.04, I think that this patch is ready for > queueing as-is. ;-)

Re: [PATCH v2 1/3] factor out refresh_and_write_cache function

2019-08-30 Thread Junio C Hamano
Martin Ågren writes: > There's a difference in behavior that I'm not sure about: We used > to ignore the return value of `refresh_cache()`, i.e. we didn't care > whether it had any errors. I have no idea whether that's safe to do -- > especially as we go on to write the index. So I don't know whe

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

2019-08-30 Thread Derrick Stolee
On 8/29/2019 8:43 PM, Taylor Blau wrote: > Hi Elijah, > > On Thu, Aug 29, 2019 at 05:19:44PM -0700, Elijah Newren wrote: >> Personally, although I understand the desire to support any possible >> cases in general, *this is a performance hack*. As such, it should be >> as simple and localized as p

Re: [PATCH] fix segv with corrupt tag object

2019-08-30 Thread Junio C Hamano
René Scharfe writes: > Subject: [PATCH] tree: simplify parse_tree_indirect() > > Reduce code duplication by turning parse_tree_indirect() into a wrapper > of repo_peel_to_type(). This avoids a segfault when handling a broken > tag where ->tagged is NULL. The new version also checks the return >

Re: [PATCH v2 1/3] factor out refresh_and_write_cache function

2019-08-30 Thread Martin Ågren
On Thu, 29 Aug 2019 at 20:28, Thomas Gummerer wrote: > +int repo_refresh_and_write_index(struct repository *repo, > +unsigned int refresh_flags, > +unsigned int write_flags, > +const struct pathspec *p

RE: [PATCH v2] clarify documentation for remote helpers

2019-08-30 Thread David Turner
> -Original Message- > From: Martin Ågren > Sent: Friday, August 30, 2019 10:09 AM > To: David Turner > Cc: Git Mailing List > Subject: Re: [PATCH v2] clarify documentation for remote helpers > > On Fri, 30 Aug 2019 at 16:00, David Turner wrote: > > &

Re: [PATCH v2] clarify documentation for remote helpers

2019-08-30 Thread Martin Ågren
On Fri, 30 Aug 2019 at 16:00, David Turner wrote: > > Signed-off-by: David Turner > --- > Documentation/gitremote-helpers.txt | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/Documentation/gitremote-helpers.txt > b/Documentation/gitremote-helpers.txt > index 43f80c

RE: [PATCH] clarify documentation for remote helpers

2019-08-30 Thread David Turner
y that it's the full path. > -Original Message- > From: Martin Ågren > Sent: Friday, August 30, 2019 12:03 AM > To: David Turner > Cc: Git Mailing List > Subject: Re: [PATCH] clarify documentation for remote helpers > > On Thu, 29 Aug 2019 at 23:06, David Turner wrote: &

Re: [PATCH 1/1] upload-pack: fix race condition in error messages

2019-08-30 Thread SZEDER Gábor
On Fri, Aug 30, 2019 at 12:06:30AM +0200, SZEDER Gábor wrote: > On Thu, Aug 29, 2019 at 11:58:18PM +0200, SZEDER Gábor wrote: > > On Thu, Aug 29, 2019 at 10:38:05AM -0400, Jeff King wrote: > > > So any fixes there have to happen on the client side. I am still > > > confused about why the client is

Re: [PATCH 1/2] config: allow config_with_options() to handle any repo

2019-08-30 Thread Duy Nguyen
On Thu, Aug 29, 2019 at 11:44 PM Matheus Tavares Bernardino wrote: > > I'm sure there are other gotchas in the config code, though, related to > > things for which we _do_ need a repository. E.g., include_by_branch() > > looks at the_repository, and should use a repository struct matching the > >

Re: [PATCH] clarify documentation for remote helpers

2019-08-29 Thread Martin Ågren
On Thu, 29 Aug 2019 at 23:06, David Turner wrote: > -Optionally may output a 'lock ' line indicating a file under > -GIT_DIR/objects/pack which is keeping a pack until refs can be > -suitably updated. > +Optionally may output a 'lock ' line indicating the full path of > +a file under under GIT_DI

Re: [PATCH] help: make help_unknown_ref() NORETURN

2019-08-29 Thread Martin Ågren
On Thu, 29 Aug 2019 at 22:08, René Scharfe wrote: > > Am 29.08.19 um 21:40 schrieb Martin Ågren: > > On Thu, 29 Aug 2019 at 21:15, René Scharfe wrote: > >> diff --git a/help.h b/help.h > >> index b8780fbd0f..7a455beeb7 100644 > >> --- a/help.h > >> +++ b/help.h > >> @@ -42,8 +42,8 @@ void list_co

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

2019-08-29 Thread Taylor Blau
Hi Elijah, On Thu, Aug 29, 2019 at 05:19:44PM -0700, Elijah Newren wrote: > On Thu, Aug 29, 2019 at 2:42 PM Pratyush Yadav wrote: > > > > On 30/08/19 02:00AM, Pratyush Yadav wrote: > > > On 29/08/19 04:07PM, Derrick Stolee wrote: > > > > On 8/29/2019 2:54 PM, Phillip Wood wrote: > > > > > Hi Stol

Re: [PATCH v2 1/2] list-objects-filter: only parse sparse OID when 'have_git_dir'

2019-08-29 Thread Jon Simons
On 8/29/19 4:48 PM, Eric Sunshine wrote: On Thu, Aug 29, 2019 at 7:12 PM Jon Simons wrote: On 8/29/19 3:45 PM, Eric Sunshine wrote: On Thu, Aug 29, 2019 at 6:38 PM Jon Simons wrote: + test_write_lines /* >sparse-src/all-files && Hmm, does this work correctly? I would expect the /* to

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

2019-08-29 Thread Elijah Newren
On Thu, Aug 29, 2019 at 2:42 PM Pratyush Yadav wrote: > > On 30/08/19 02:00AM, Pratyush Yadav wrote: > > On 29/08/19 04:07PM, Derrick Stolee wrote: > > > On 8/29/2019 2:54 PM, Phillip Wood wrote: > > > > Hi Stolee > > > > > > > > On 29/08/2019 18:01, Derrick Stolee via GitGitGadget wrote: > > > >>

Re: [PATCH v3 3/4] Recommend git-filter-repo instead of git-filter-branch

2019-08-29 Thread Elijah Newren
Hi Eric, Thanks for the careful and thoughtful review. On Thu, Aug 29, 2019 at 11:11 AM Eric Sunshine wrote: > > On Wed, Aug 28, 2019 at 8:07 PM Elijah Newren wrote: > > filter-branch suffers from a deluge of disguised dangers that disfigure > > history rewrites (i.e. deviate from the deliberat

Re: [PATCH v2 1/2] list-objects-filter: only parse sparse OID when 'have_git_dir'

2019-08-29 Thread Eric Sunshine
On Thu, Aug 29, 2019 at 7:12 PM Jon Simons wrote: > On 8/29/19 3:45 PM, Eric Sunshine wrote: > > On Thu, Aug 29, 2019 at 6:38 PM Jon Simons wrote: > >> + test_write_lines /* >sparse-src/all-files && > > > > Hmm, does this work correctly? I would expect the /* to expand to all > > names at t

Re: [PATCH v2 1/2] list-objects-filter: only parse sparse OID when 'have_git_dir'

2019-08-29 Thread Jon Simons
On 8/29/19 3:45 PM, Eric Sunshine wrote: On Thu, Aug 29, 2019 at 6:38 PM Jon Simons wrote: Fix a bug in partial cloning with sparse filters by ensuring to check for 'have_git_dir' before attempting to resolve the sparse filter OID. [...] Signed-off-by: Jon Simons --- diff --git a/t/t5616-parti

Re: [PATCH v5 2/2] am: reload .gitattributes after patching it

2019-08-29 Thread brian m. carlson
On 2019-08-28 at 11:30:53, Johannes Schindelin wrote: > > diff --git a/convert.c b/convert.c > > index 94ff837649..0e6e9d2d75 100644 > > --- a/convert.c > > +++ b/convert.c > > @@ -8,6 +8,7 @@ > > #include "pkt-line.h" > > #include "sub-process.h" > > #include "utf8.h" > > +#include "ll-merge.h"

Re: [PATCH v2 1/2] list-objects-filter: only parse sparse OID when 'have_git_dir'

2019-08-29 Thread Eric Sunshine
On Thu, Aug 29, 2019 at 6:38 PM Jon Simons wrote: > Fix a bug in partial cloning with sparse filters by ensuring to check > for 'have_git_dir' before attempting to resolve the sparse filter OID. > [...] > Signed-off-by: Jon Simons > --- > diff --git a/t/t5616-partial-clone.sh b/t/t5616-partial-cl

Re: [PATCH 1/1] upload-pack: fix race condition in error messages

2019-08-29 Thread SZEDER Gábor
On Thu, Aug 29, 2019 at 11:58:18PM +0200, SZEDER Gábor wrote: > On Thu, Aug 29, 2019 at 10:38:05AM -0400, Jeff King wrote: > > So any fixes there have to happen on the client side. I am still > > confused about why the client is writing in this case, per the argument > > in 014ade7484 (upload-pack:

Re: [PATCH 1/1] upload-pack: fix race condition in error messages

2019-08-29 Thread SZEDER Gábor
On Thu, Aug 29, 2019 at 10:38:05AM -0400, Jeff King wrote: > So any fixes there have to happen on the client side. I am still > confused about why the client is writing in this case, per the argument > in 014ade7484 (upload-pack: send ERR packet for non-tip objects, > 2019-04-13). It would be nice

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

2019-08-29 Thread Pratyush Yadav
On 30/08/19 02:00AM, Pratyush Yadav wrote: > On 29/08/19 04:07PM, Derrick Stolee wrote: > > On 8/29/2019 2:54 PM, Phillip Wood wrote: > > > Hi Stolee > > > > > > On 29/08/2019 18:01, Derrick Stolee via GitGitGadget wrote: > > >> +    > > >> +    if (argc == 3 && !strcmp(argv[1], "-b")) { > > >> + 

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

2019-08-29 Thread Pratyush Yadav
On 29/08/19 04:07PM, Derrick Stolee wrote: > On 8/29/2019 2:54 PM, Phillip Wood wrote: > > Hi Stolee > > > > On 29/08/2019 18:01, Derrick Stolee via GitGitGadget wrote: > >> +    > >> +    if (argc == 3 && !strcmp(argv[1], "-b")) { > >> +    /* > >> + * User ran 'git checkout -b ' and

Re: [PATCH] help: make help_unknown_ref() NORETURN

2019-08-29 Thread René Scharfe
Am 29.08.19 um 21:40 schrieb Martin Ågren: > On Thu, 29 Aug 2019 at 21:15, René Scharfe wrote: >> diff --git a/help.h b/help.h >> index b8780fbd0f..7a455beeb7 100644 >> --- a/help.h >> +++ b/help.h >> @@ -42,8 +42,8 @@ void list_commands(unsigned int colopts, struct cmdnames >> *main_cmds, struct

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

2019-08-29 Thread Derrick Stolee
On 8/29/2019 2:54 PM, Phillip Wood wrote: > Hi Stolee > > On 29/08/2019 18:01, Derrick Stolee via GitGitGadget wrote: >> +    >> +    if (argc == 3 && !strcmp(argv[1], "-b")) { >> +    /* >> + * User ran 'git checkout -b ' and expects > > What if the user ran 'git checkout -b'? Then a

Re: [PATCH] help: make help_unknown_ref() NORETURN

2019-08-29 Thread Martin Ågren
On Thu, 29 Aug 2019 at 21:15, René Scharfe wrote: > > Announce that calling help_unknown_ref() exits the program. > > Signed-off-by: René Scharfe > --- > Patch generated with --function-context for easier review. > > help.c | 3 ++- > help.h | 2 +- > 2 files changed, 3 insertions(+), 2 deletion

Re: [PATCH] fix segv with corrupt tag object

2019-08-29 Thread René Scharfe
Am 26.08.19 um 19:20 schrieb Junio C Hamano: > Stefan Sperling writes: > >> The root cause of this bug seems to be that the valid assumption >> that obj->parsed implies a successfully parsed object is broken by >> parse_tag_buffer() because this function sets the 'parsed' flag even >> if errors oc

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: [PATCH v2] gitk: Make web links clickable

2019-08-29 Thread Pratyush Yadav
On 29/08/19 11:27AM, Paul Mackerras wrote: > This makes gitk look for http or https URLs in the commit description > and make the URLs clickable. Clicking on them will invoke an external > web browser with the URL. > > The web browser command is by default "xdg-open" on Linux, "open" on > MacOS,

Re: [PATCH v3 3/4] Recommend git-filter-repo instead of git-filter-branch

2019-08-29 Thread Eric Sunshine
On Wed, Aug 28, 2019 at 8:07 PM Elijah Newren wrote: > filter-branch suffers from a deluge of disguised dangers that disfigure > history rewrites (i.e. deviate from the deliberate changes). [...] > Signed-off-by: Elijah Newren > --- > diff --git a/Documentation/git-filter-branch.txt > b/Document

Re: [PATCH 2/3] merge: use refresh_and_write_cache

2019-08-29 Thread Thomas Gummerer
On 08/28, Martin Ågren wrote: > On Tue, 27 Aug 2019 at 12:15, Thomas Gummerer wrote: > > > struct lock_file lock = LOCK_INIT; > > const char *head_arg = "HEAD"; > > > > - hold_locked_index(&lock, LOCK_DIE_ON_ERROR); > > - refresh_cache(REFRESH_QUIET); > > - if (w

Re: [PATCH 1/3] factor out refresh_and_write_cache function

2019-08-29 Thread Thomas Gummerer
On 08/28, Martin Ågren wrote: > On Tue, 27 Aug 2019 at 12:14, Thomas Gummerer wrote: > > > > Getting the lock for the index, refreshing it and then writing it is a > > pattern that happens more than once throughout the codebase. Factor > > out the refresh_and_write_cache function from builtin/am.

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

2019-08-29 Thread Elijah Newren
On Thu, Aug 29, 2019 at 10:04 AM 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 spec

Re: [PATCH 1/2] config: allow config_with_options() to handle any repo

2019-08-29 Thread Matheus Tavares Bernardino
On Thu, Aug 29, 2019 at 11:00 AM Jeff King wrote: > > On Thu, Aug 29, 2019 at 04:31:34PM +0700, Duy Nguyen wrote: > > > > If so, how could we get R there? I mean, we could pass it through this > > > chain, but the chain already passes a "struct config_options", which > > > carries the "commondir"

Re: [PATCH 1/1] upload-pack: fix race condition in error messages

2019-08-29 Thread Jeff King
On Thu, Aug 29, 2019 at 10:27:16AM -0400, Derrick Stolee wrote: > > I don't think we should need such a call. For one thing, if it were > > necessary, that would mean we're not writing out the packet at all. But > > your whole problem is that we're writing the message twice, one of which > > comes

Re: [PATCH 2/2] list-objects-filter: handle unresolved sparse filter OID

2019-08-29 Thread Derrick Stolee
On 8/29/2019 9:44 AM, Jeff King wrote: > On Thu, Aug 29, 2019 at 09:12:38AM -0400, Derrick Stolee wrote: > >>> +test_expect_success 'partial clone with unresolvable sparse filter fails >>> cleanly' ' >>> + test_must_fail git clone --no-local --no-checkout >>> --filter=sparse:oid=master:sparse-

Re: [PATCH 1/1] upload-pack: fix race condition in error messages

2019-08-29 Thread Derrick Stolee
On 8/29/2019 10:13 AM, Jeff King wrote: > On Thu, Aug 29, 2019 at 08:58:55AM -0400, Derrick Stolee wrote: > >> However, I do have a theory: the process exits before flushing the >> packet line. Adding this line before exit(1) should fix it: >> >> packet_writer_flush(writer); >> >> I can send

Re: [PATCH 1/1] upload-pack: fix race condition in error messages

2019-08-29 Thread Jeff King
On Thu, Aug 29, 2019 at 08:58:55AM -0400, Derrick Stolee wrote: > However, I do have a theory: the process exits before flushing the > packet line. Adding this line before exit(1) should fix it: > > packet_writer_flush(writer); > > I can send this in a v2, but it would be nice if you could

Re: [PATCH 1/2] config: allow config_with_options() to handle any repo

2019-08-29 Thread Jeff King
On Thu, Aug 29, 2019 at 04:31:34PM +0700, Duy Nguyen wrote: > > If so, how could we get R there? I mean, we could pass it through this > > chain, but the chain already passes a "struct config_options", which > > carries the "commondir" and "git_dir" fields. So it would probably be > > confusing to

Re: [PATCH] replace: stop replace lookup when reaching a self-reference

2019-08-29 Thread Jeff King
On Thu, Aug 29, 2019 at 08:22:49PM +0900, Mike Hommey wrote: > It is possible to end up in situations where a replace ref points to > itself. In that case, it would seem better to stop the lookup rather > than try to follow the link infinitely and fail with "replace depth too > high". I don't thi

Re: [PATCH 2/2] list-objects-filter: handle unresolved sparse filter OID

2019-08-29 Thread Jeff King
On Thu, Aug 29, 2019 at 09:12:38AM -0400, Derrick Stolee wrote: > > +test_expect_success 'partial clone with unresolvable sparse filter fails > > cleanly' ' > > + test_must_fail git clone --no-local --no-checkout > > --filter=sparse:oid=master:sparse-filter "file://$(pwd)/sparse-src" sc1 > >

Re: [PATCH 2/2] list-objects-filter: handle unresolved sparse filter OID

2019-08-29 Thread Derrick Stolee
On 8/28/2019 4:18 PM, Jon Simons wrote: > Handle a potential NULL 'sparse_oid_value' when attempting to load > sparse filter exclusions by blob, to avoid segfaulting later during > 'add_excludes_from_blob_to_list'. > > While here, uniquify the errors emitted to distinguish between the > case that

Re: [PATCH 1/1] upload-pack: fix race condition in error messages

2019-08-29 Thread Derrick Stolee
On 8/28/2019 12:15 PM, SZEDER Gábor wrote: > On Wed, Aug 28, 2019 at 11:39:44AM -0400, Jeff King wrote: >> On Wed, Aug 28, 2019 at 10:54:12AM -0400, Jeff King wrote: >> Unfortunately, however, while running './t5516-fetch-push.sh -r 1,79 --stress' to try to reproduce a failure caused by t

Re: [PATCH 1/1] git-p4: auto-delete named temporary file

2019-08-29 Thread Johannes Schindelin
Hi Junio, On Wed, 28 Aug 2019, Junio C Hamano wrote: > Johannes Schindelin writes: > > > Yes, this was me trying to re-send the patch via GMail's web UI because > > the first time GitGitGadget sent it, it did not get through (only the > > cover letter did). > > As long as that was manual screw-u

Re: [PATCH v2] merge-options.txt: clarify meaning of various ff-related options

2019-08-29 Thread Sergey Organov
Martin Ågren writes: > Hiya, This one was new to me :-) > > On Wed, 28 Aug 2019 at 21:15, Sergey Organov wrote: >> > I was sort of expecting these to be listed in the order "--ff, --no-ff, >> > --ff-only", and I see Sergey suggested the same ordering. The way your >> > proposed text reads does

Re: [PATCH 1/2] config: allow config_with_options() to handle any repo

2019-08-29 Thread Duy Nguyen
On Thu, Aug 29, 2019 at 11:24 AM Matheus Tavares Bernardino wrote: > > On Tue, Aug 27, 2019 at 8:46 PM Matheus Tavares Bernardino > wrote: > > > > Hi, Duy > > > > On Tue, Aug 27, 2019 at 6:26 AM Duy Nguyen wrote: > > > > > > On Tue, Aug 27, 2019 at 6:57 AM Matheus Tavares > > > wrote: > > > > >

Re: [PATCH v2] merge-options.txt: clarify meaning of various ff-related options

2019-08-29 Thread Sergey Organov
Elijah Newren writes: > On Wed, Aug 28, 2019 at 12:15 PM Sergey Organov wrote: >> >> Hi, >> > [...] >> Dunno if it helps, but here is what I came up with somewhere in previous >> discussions: >> >> --ff:: >> --no-ff:: >> --ff-only:: >> When the merge resolves as a fast-forward, only upda

Re: [PATCH 1/2] config: allow config_with_options() to handle any repo

2019-08-28 Thread Matheus Tavares Bernardino
On Tue, Aug 27, 2019 at 8:46 PM Matheus Tavares Bernardino wrote: > > Hi, Duy > > On Tue, Aug 27, 2019 at 6:26 AM Duy Nguyen wrote: > > > > On Tue, Aug 27, 2019 at 6:57 AM Matheus Tavares > > wrote: > > > > > > Currently, config_with_options() relies on the global the_repository > > > when it ha

Re: [PATCH 1/1] git-p4: auto-delete named temporary file

2019-08-28 Thread Junio C Hamano
Johannes Schindelin writes: > Yes, this was me trying to re-send the patch via GMail's web UI because > the first time GitGitGadget sent it, it did not get through (only the > cover letter did). As long as that was manual screw-up, while fixing some glitches in the machinery, that is fine. I ca

Re: [PATCH] gitk: Make web links clickable

2019-08-28 Thread Junio C Hamano
Paul Mackerras writes: > I was expecting some comments and suggestions, so I didn't push it out > yet. One suggestion which seems reasonable is to match any http or > https URL anywhere in the commit description, not just with Link: or > BugLink: at the start of the line. What do you think of t

Re: [PATCH] gitk: Make web links clickable

2019-08-28 Thread Paul Mackerras
Hi Junio, On Tue, Aug 27, 2019 at 01:32:30PM -0700, Junio C Hamano wrote: > Paul Mackerras writes: > > > This makes gitk look for lines in the commit message which start with > > "Link:" or "BugLink:" followed by a http or https URL, and make the > > URL clickable. Clicking on it will invoke an

Re: [PATCH 1/2] list-objects-filter: only parse sparse OID when 'have_git_dir'

2019-08-28 Thread Jeff King
On Wed, Aug 28, 2019 at 04:18:23PM -0400, Jon Simons wrote: > Fix a bug in partial cloning with sparse filters by ensuring to check > for 'have_git_dir' before attempting to resolve the sparse filter OID. > > Otherwise the client will trigger: > > BUG: refs.c:1851: attempting to get main_ref

<    8   9   10   11   12   13   14   15   16   17   >