git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: 胡哲宁 <adlternative@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: David Aguilar <davvid@gmail.com>,
	ZheNing Hu via GitGitGadget <gitgitgadget@gmail.com>,
	Git Mailing List <git@vger.kernel.org>,
	Denton Liu <liu.denton@gmail.com>,
	John Keeping <john@keeping.me.uk>,
	Ryan Zoeller <rtzoeller@rtzoeller.com>
Subject: Re: [PATCH v2] git-difftool-helper.sh: learn a new way go back to last save point
Date: Tue, 9 Feb 2021 14:19:13 +0800	[thread overview]
Message-ID: <CAOLTT8StBRZcgLopTQ5i9pRbCbbGochv5fTfMPVF3xt7BaG8iQ@mail.gmail.com> (raw)
In-Reply-To: <xmqq4kim3zhq.fsf@gitster.c.googlers.com>

Junio C Hamano <gitster@pobox.com> 于2021年2月9日周二 上午7:34写道:
>
> David Aguilar <davvid@gmail.com> writes:
>
> > What if instead of global state, maybe the user could specify a path
> > that difftool could skip forward to?   For example, we could teach
> > difftool to resume by telling it where we last left off:
> >
> >    git difftool --resume-from=foo/bar099.txt
> >
> > Then we don't need the global counter state file?
>
> Does it have to be the second and subsequent invocation to pass the
> new "resume-from" option?  As we do not have "global" state, I would
> presume that we do not even know if it is the first invocation, so
> perhaps a better name would be "--start-from=$pathname"?
>
Thank you for your thinking, I agree with your point of view.
As you said before: an accurate file name may be more suitable
for users than `possible last file`.
However, without the support of the global `difftool-save-point`,
it may not be possible to know the last exit point of the user.
Even if the global state is allowed, it may need to do more work
to avoid the competition for the global state under multiple
processes.
So "--start-from=$pathname" is more suitable to provide users
with a way to quickly index to specified files.
Then I shift the front and start thinking about how to realize it! :)
> > Finally, I'm going to plug what I believe to be the right tool for the
> > job here.  Have you tried git cola?[1]  Difftool is tightly
> > integrated, and the UI is such that you can trivially choose any of
> > the modified/staged files and difftool them by using the Ctrl-d
> > hotkey.
> >
> > https://github.com/git-cola/git-cola/
> >
> > Cola is purpose-built for driving difftool, and for interactive
> > staging, so not mentioning it in the context of wanting a better UI
> > for difftool would be a disservice to difftool users.
>
> ;-)
Thanks again!

  reply	other threads:[~2021-02-09  6:18 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-07 15:19 [PATCH] git-difftool-helper.sh: learn a new way skip to save point 阿德烈 via GitGitGadget
2021-02-07 18:29 ` Junio C Hamano
2021-02-07 19:04 ` Junio C Hamano
2021-02-08  8:06   ` 胡哲宁
2021-02-08 17:02 ` [PATCH v2] git-difftool-helper.sh: learn a new way go back to last " ZheNing Hu via GitGitGadget
2021-02-08 20:13   ` Junio C Hamano
2021-02-08 22:15   ` David Aguilar
2021-02-08 23:34     ` Junio C Hamano
2021-02-09  6:19       ` 胡哲宁 [this message]
2021-02-09  6:04     ` 胡哲宁
2021-02-09 15:30   ` [PATCH v3] difftool.c: learn a new way start from specified file ZheNing Hu via GitGitGadget
2021-02-09 18:17     ` Junio C Hamano
2021-02-10 17:00       ` 胡哲宁
2021-02-10 18:16         ` Junio C Hamano
2021-02-10 20:05           ` Junio C Hamano
2021-02-14  7:53           ` ZheNing Hu
2021-02-14 13:09     ` [PATCH v4] difftool.c: learn a new way start at " ZheNing Hu via GitGitGadget
2021-02-16  1:46       ` Junio C Hamano
2021-02-16 12:56       ` [PATCH v5 0/2] " ZheNing Hu via GitGitGadget
2021-02-16 12:56         ` [PATCH v5 1/2] diff: --{rotate,skip}-to=<path> Junio C Hamano via GitGitGadget
2021-02-16 12:56         ` [PATCH v5 2/2] difftool.c: learn a new way start at specified file ZheNing Hu via GitGitGadget
2021-02-17 10:31           ` Junio C Hamano
2021-02-17 16:18             ` ZheNing Hu
2021-02-16 18:45         ` [PATCH v5 0/2] " Junio C Hamano
2021-02-17  4:12           ` ZheNing Hu
2021-02-17 11:14             ` Denton Liu
2021-02-17 11:40               ` ZheNing Hu
2021-02-17 18:56                 ` Junio C Hamano
2021-02-18  5:20                   ` ZheNing Hu
2021-02-18 15:04                   ` ZheNing Hu
2021-02-18 19:11                     ` Junio C Hamano
2021-02-19 10:59                       ` ZheNing Hu
2021-02-25 11:08                   ` Johannes Schindelin
2021-02-25 19:01                     ` Junio C Hamano
2021-02-19 12:53         ` [PATCH v6] " ZheNing Hu via GitGitGadget
2021-02-22 15:11           ` ZheNing Hu
2021-02-22 21:40           ` Junio C Hamano

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=CAOLTT8StBRZcgLopTQ5i9pRbCbbGochv5fTfMPVF3xt7BaG8iQ@mail.gmail.com \
    --to=adlternative@gmail.com \
    --cc=davvid@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitgitgadget@gmail.com \
    --cc=gitster@pobox.com \
    --cc=john@keeping.me.uk \
    --cc=liu.denton@gmail.com \
    --cc=rtzoeller@rtzoeller.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).