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

Re: [PATCH v2] git-difftool-helper.sh: learn a new way go back to last save point

From
胡哲宁 <adlternative@gmail.com>
Date
Feb 9, 2021, 06:19 UTC
Message-ID
<CAOLTT8StBRZcgLopTQ5i9pRbCbbGochv5fTfMPVF3xt7BaG8iQ@mail.gmail.com>
In-Reply-To
<xmqq4kim3zhq.fsf@gitster.c.googlers.com>
Junio C Hamano <gitster@pobox.com> 于2021年2月9日周二 上午7:34写道:
Show 16 quoted lines
>
> 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! :)

Show 13 quoted lines
> > 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!
Previous: Junio C HamanoNext: 胡哲宁
Message 9 of 37 in “git-difftool-helper.sh: learn a new way skip to save point”
  1. git-difftool-helper.sh: learn a new way skip to save point阿德烈 via GitGitGadget, Feb 7, 2021
  2. Junio C HamanoFeb 7, 2021
  3. Junio C HamanoFeb 7, 2021
  4. 胡哲宁Feb 8, 2021
  5. git-difftool-helper.sh: learn a new way go back to last save pointZheNing Hu via GitGitGadget, Feb 8, 2021
  6. Junio C HamanoFeb 8, 2021
  7. David AguilarFeb 8, 2021
  8. Junio C HamanoFeb 8, 2021
  9. 胡哲宁Feb 9, 2021
  10. 胡哲宁Feb 9, 2021
  11. difftool.c: learn a new way start from specified fileZheNing Hu via GitGitGadget, Feb 9, 2021
  12. Junio C HamanoFeb 9, 2021
  13. 胡哲宁Feb 10, 2021
  14. Junio C HamanoFeb 10, 2021
  15. Junio C HamanoFeb 10, 2021
  16. ZheNing HuFeb 14, 2021
  17. difftool.c: learn a new way start at specified fileZheNing Hu via GitGitGadget, Feb 14, 2021
  18. Junio C HamanoFeb 16, 2021
  19. 0/2 difftool.c: learn a new way start at specified fileZheNing Hu via GitGitGadget, Feb 16, 2021
  20. 1/2 diff: --{rotate,skip}-to=<path>Junio C Hamano via GitGitGadget, Feb 16, 2021
  21. 2/2 difftool.c: learn a new way start at specified fileZheNing Hu via GitGitGadget, Feb 16, 2021
  22. Junio C HamanoFeb 17, 2021
  23. ZheNing HuFeb 17, 2021
  24. Junio C HamanoFeb 16, 2021
  25. ZheNing HuFeb 17, 2021
  26. Denton LiuFeb 17, 2021
  27. ZheNing HuFeb 17, 2021
  28. Junio C HamanoFeb 17, 2021
  29. ZheNing HuFeb 18, 2021
  30. ZheNing HuFeb 18, 2021
  31. Junio C HamanoFeb 18, 2021
  32. ZheNing HuFeb 19, 2021
  33. Johannes SchindelinFeb 25, 2021
  34. Junio C HamanoFeb 25, 2021
  35. difftool.c: learn a new way start at specified fileZheNing Hu via GitGitGadget, Feb 19, 2021
  36. ZheNing HuFeb 22, 2021
  37. Junio C HamanoFeb 22, 2021

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.