git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v3 1/2] git-gui: use existing interface to query a path's attribute

From
Bert Wesarg <bert.wesarg@googlemail.com>
Date
Oct 1, 2019, 15:22 UTC
Message-ID
<CAKPyHN2qSudnEMfokp5-BXBDU6_kcVv3aokNUYdqZOnMXYVzYw@mail.gmail.com>
In-Reply-To
<20191001142401.hhg5dtefj6qg66dd@yadavpratyush.com>
On Tue, Oct 1, 2019 at 4:24 PM Pratyush Yadav <me@yadavpratyush.com> wrote:
Show 5 quoted lines
>
> Hi,
>
> I don't see any difference between v3 and v2 of this patch. What changed
> in this version?
nothing, but 2/2 changed.
Bert
Show 49 quoted lines
>
> On 30/09/19 09:54PM, Bert Wesarg wrote:
> > Replace the hand-coded call to git check-attr with the already provided one.
> >
> > Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com>
> > ---
> >  lib/diff.tcl | 15 +--------------
> >  1 file changed, 1 insertion(+), 14 deletions(-)
> >
> > diff --git a/lib/diff.tcl b/lib/diff.tcl
> > index 958a0fa..0fd4600 100644
> > --- a/lib/diff.tcl
> > +++ b/lib/diff.tcl
> > @@ -270,19 +270,6 @@ proc show_other_diff {path w m cont_info} {
> >       }
> >  }
> >
> > -proc get_conflict_marker_size {path} {
> > -     set size 7
> > -     catch {
> > -             set fd_rc [eval [list git_read check-attr "conflict-marker-size" -- $path]]
> > -             set ret [gets $fd_rc line]
> > -             close $fd_rc
> > -             if {$ret > 0} {
> > -                     regexp {.*: conflict-marker-size: (\d+)$} $line line size
> > -             }
> > -     }
> > -     return $size
> > -}
> > -
> >  proc start_show_diff {cont_info {add_opts {}}} {
> >       global file_states file_lists
> >       global is_3way_diff is_submodule_diff diff_active repo_config
> > @@ -298,7 +285,7 @@ proc start_show_diff {cont_info {add_opts {}}} {
> >       set is_submodule_diff 0
> >       set diff_active 1
> >       set current_diff_header {}
> > -     set conflict_size [get_conflict_marker_size $path]
> > +     set conflict_size [gitattr $path conflict-marker-size 7]
> >
> >       set cmd [list]
> >       if {$w eq $ui_index} {
> > --
> > 2.23.0.11.g242cf7f110
> >
>
> --
> Regards,
> Pratyush Yadav
Previous: Pratyush YadavNext: Pratyush Yadav
Message 3 of 7 in “git-gui: use existing interface to query a path's attribute”
  1. 1/2 git-gui: use existing interface to query a path's attributeBert Wesarg, Sep 30, 2019
  2. Pratyush YadavOct 1, 2019
  3. Bert WesargOct 1, 2019
  4. Pratyush YadavOct 1, 2019
  5. Bert WesargOct 2, 2019
  6. 2/2 git-gui: support for diff3 conflict styleBert Wesarg, Oct 2, 2019
  7. Pratyush YadavOct 2, 2019

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.