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

Re: GSoC 2019: Git's application submitted

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Feb 7, 2019, 19:39 UTC
Message-ID
<nycvar.QRO.7.76.6.1902072023250.41@tvgsbejvaqbjf.bet>
In-Reply-To
<20190206220942.GE6085@hank.intra.tgummerer.com>
Hi Thomas,
On Wed, 6 Feb 2019, Thomas Gummerer wrote:
> I think the idea here could definitely be split into a couple different
> phases, that could be individually useful, and can be merged
> individually, though I don't know if they would necessarily be.
Good idea.
Show 7 quoted lines
> Of the top of my head:
> 
>  - write test_expect_failure tests for the expected new behaviour
> 
>    This may not be worth including in git.git yet, but it can be a
>    very useful starting point for somebody else continuing the feature
>    if the student finds they don't have time for it.
I like this approach.
Show 8 quoted lines
>  - implement pushing the index state, without dealing with conflicts
>  - implement poping the index state, without dealing with conflicts
> 
>    This can already be individually useful, and I think this is
>    something people asked for on the mailing list, though I didn't try
>    digging up old threads for now.  After these two steps stashing and
>    restoring a merge conflict would still not work, but we have a good
>    first step that could be merged.
We already have `git stash --keep-index`. Is this what you mean here?
>  - implement pushing/poping conflicted state
> 
>    This would obviously be the end goal.

On second thought, this might actually be super trivial. Right now, we support two modes (not counting the `--untracked` stuff): --keep-index and --no-keep-index. In both cases, we seem to create a merge commit whose tree reflects the working directory and whose first parent is HEAD and whose second parent is a single commit on top of HEAD (which contains either no changes in the case of --no-keep-index, or whose tree reflects the index in case of --keep-index).

To extend that to the conflict case, we could introduce a new flag --with-conflicts, and have the commit structure

	Worktree
	 |    \
	 |    index stage 0
	 |      /     |     \
	 | stage 1  stage 2  stage 3
	 |    /     /       /
	HEAD ---------------

The only tricky thing I can see is to maintain backwards compatibility if possible, so that old `git stash` will do something at least semi-sensible with those commit structures.

It might be too small a project, after all.

Ciao, Dscho

Show 25 quoted lines
> > Another potential issue is that a new feature might be prone to naming
> > or user interface discussions which could last for a long time or
> > could not result in clear decisions.
> 
> Yes, this is definitely a potential pitfall.  I haven't thought in
> depth about the interface yet, but I think the discussion around that
> would be something we as mentors could and should guide the student
> through.  We also wouldn't make the feature the default from the
> beginning, but introduce it behind a new flag/maybe a config option,
> to make sure we don't introduce any backwards compatible changes.
> 
> It's probably also something the student should include in their
> proposal, so we can get eyes on it early in the process.
> 
> > So I think we should be very careful if we propose a project that
> > implements a new feature to a student. We should at least consider the
> > above potential issues and see if they can be mitigated before the
> > project starts.
> 
> Thanks for bringing these issues up, they are definitely useful to
> work through.  
> 
> > Thank you anyway for proposing this idea,
> > Christian.
> 
Previous: Thomas GummererNext: Thomas Gummerer
Message 6 of 29 in “GSoC 2019: Git's application submitted”
  1. Christian CouderFeb 4, 2019
  2. Thomas GummererFeb 4, 2019
  3. Thomas GummererFeb 5, 2019
  4. Christian CouderFeb 5, 2019
  5. Thomas GummererFeb 6, 2019
  6. Johannes SchindelinFeb 7, 2019
  7. Thomas GummererFeb 7, 2019
  8. Оля ТележнаяFeb 11, 2019
  9. Christian CouderFeb 11, 2019
  10. Оля ТележнаяFeb 11, 2019
  11. Christian CouderFeb 11, 2019
  12. Elijah NewrenFeb 13, 2019
  13. Christian CouderFeb 14, 2019
  14. Christian CouderFeb 11, 2019
  15. Thomas GummererFeb 11, 2019
  16. Christian CouderFeb 11, 2019
  17. Thomas GummererFeb 12, 2019
  18. Christian CouderFeb 12, 2019
  19. Thomas GummererFeb 12, 2019
  20. Johannes SchindelinFeb 6, 2019
  21. Duy NguyenMar 5, 2019
  22. Duy NguyenMar 5, 2019
  23. Jeff KingMar 6, 2019
  24. Duy NguyenMar 6, 2019
  25. Jeff KingMar 6, 2019
  26. Johannes SchindelinMar 6, 2019
  27. Duy NguyenMar 18, 2019
  28. Christian CouderMar 18, 2019
  29. Christian CouderFeb 4, 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.