git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Pratyush Yadav <me@yadavpratyush.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] git-gui: Update in-memory config when changing config options
Date: Mon, 26 Aug 2019 03:29:02 +0530	[thread overview]
Message-ID: <20190825215902.ccvhgf5wesjmatqj@localhost.localdomain> (raw)
In-Reply-To: <20190822223316.11153-1-me@yadavpratyush.com>

Junio,

This patch hasn't got any comments, but it looks correct to me, and fit 
for merging IMO.

I updated the commit subject from 'git-gui: Update...' to 'git-gui: 
update...' to match with the style of other commit messages, as you 
suggested in the other series.

You can pull the updated commit from 
https://github.com/prati0100/git-gui/tree/py/reload-config commit 
3d8a8d8ff795f93554dd0ab3bbcdaec6a53c5642.

I don't think it is worth the email noise to send a re-roll with just 
the commit subject changed, but if you want, I will.

On 23/08/19 04:03AM, Pratyush Yadav wrote:
> When the user updates any config variable from the options menu, the new
> config gets saved, but the in-memory state of the config variables is
> not updated. This results in the old settings being used until the user
> either opens the options menu again (which triggers a call to
> load_config), or re-starts git-gui.
> 
> This change fixes that problem by re-loading the config variables when
> the Save button is pressed in the options menu.
> 
> Signed-off-by: Pratyush Yadav <me@yadavpratyush.com>
> ---
> 
> The commit can be found in the topic branch 'py/reload-config' at
> https://github.com/prati0100/git-gui/tree/py/reload-config
> 
> Once reviewed, pull the commit 92582527b91750e47c2c3e4d1e2188998e9330ce
> or just munge the patch and apply it locally, whichever you prefer.
> 
>  lib/option.tcl | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/lib/option.tcl b/lib/option.tcl
> index e43971b..139cf44 100644
> --- a/lib/option.tcl
> +++ b/lib/option.tcl
> @@ -344,6 +344,7 @@ proc do_save_config {w} {
>  	if {[catch {save_config} err]} {
>  		error_popup [strcat [mc "Failed to completely save options:"] "\n\n$err"]
>  	}
> +	load_config 1
>  	reshow_diff
>  	destroy $w
>  }
> --
> 2.21.0
> 

-- 
Regards,
Pratyush Yadav

  reply	other threads:[~2019-08-25 21:59 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-22 22:33 [PATCH] git-gui: Update in-memory config when changing config options Pratyush Yadav
2019-08-25 21:59 ` Pratyush Yadav [this message]
2019-08-26 14:22 ` Junio C Hamano
2019-08-26 19:10   ` Pratyush Yadav

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190825215902.ccvhgf5wesjmatqj@localhost.localdomain \
    --to=me@yadavpratyush.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).