git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Jakub Narębski" <jnareb@gmail.com>
To: Kevin Daudt <me@ikke.info>
Cc: "Konstantin Khomoutov" <kostix+git@007spb.ru>,
	git@vger.kernel.org,
	"Santiago Perez De Rosso" <sperezde@csail.mit.edu>,
	"Daniel Jackson" <dnj@csail.mit.edu>,
	"Greg Wilson" <gvwilson@third-bit.com>,
	"Jakub Narębski" <jnareb@mat.umk.pl>
Subject: Re: "Purposes, Concepts,Misfits, and a Redesign of Git" (a research paper)
Date: Sat, 1 Oct 2016 23:39:13 +0200	[thread overview]
Message-ID: <ce42f934-4a94-fa29-cff0-5ebb0f004eb5@gmail.com> (raw)
In-Reply-To: <20161001201325.GA29588@ikke.info>

W dniu 01.10.2016 o 22:13, Kevin Daudt pisze:
> On Sat, Oct 01, 2016 at 12:24:57AM +0200, Jakub Narębski wrote:
>>
>> | 7.2.1 Discussion
>> [...]
>> | There could be other use cases for the
>> | staging area that Gitless doesn’t handle well but we expect
>> | these to be fairly infrequent.

I'd like to point to the word "other" in the above sentence...

>>
>> Like handling merge conflict...??? Infrequent doesn't mean
>> unimportant.
> 
> For me the most important thing is that the lack of staging area leads
> on commits that have no clear goal, people just commit everything they
> have changed at some point, as a sort of checkpoint.
> 
> Although lots of people still do this with git currently, they don't
> even have the possibility[1] to improve on this.
> 
> This makes history and features like git bisect less useful.
> 
> 
> [1] At most they can specify the files they want to commit, but this is
> still a very crude way to group together changes.

... If you had read the original discussed research paper 
http://people.csail.mit.edu/sperezde/pre-print-oopsla16.pdf
you would notice that this use case is covered by Gitless,
though imperfectly.

  Common use cases for the staging area in Git are to select
  files to commit, split up a large change into multiple commits,
  and review the changes selected to be committed. We address
  the first by providing a more flexible `commit` command that
  lets the user easily customize the set of files to commit (with
  `only`, `include` and `exclude` flags). For the second use case
  we have a `partial` flag in `commit` that allows the user to
  interactively select segments of files to commit (like Git’s
  `commit --patch`).

First imperfection is that only equivalent of `git commit --patch`,
that is additive selection of changes during commit.  There are,
from what I understand, no equivalents of `git add --interactive`
(crafting additively and subtractively part by part, not all at
once), `git reset --patch` (crafting additively from any commit,
defaults to HEAD), `git checkout --patch` (crafting subtractively).
It is a good thing to have those possibilities when disentangling
working area, or splitting commit during interactive rebase.

Though all of those could be added (if they are not present
already) to the interactive interface of `partial` flag in
`gl commit`.


Second imperfection is that you cannot test the crafted state
without creating a commit.  In Git you have `git stash --keep-index`
for this; go to the state crafted in the staging area (the index),
and you can test it.

Though you can always create a [temporary] commit, run tests, and
then if necessary amend this commit.


On the other hand the index / the staging area is important and
useful thing in helping to resolve merge conflicts, for example
the one where one side changed file and other deleted it, or
where one side renamed file and other changed it, etc.

-- 
Jakub Narębski

mailto:jnareb@gmail.com
mailto:jnareb@mat.umk.pl


  reply	other threads:[~2016-10-01 21:39 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-30 16:14 "Purposes, Concepts,Misfits, and a Redesign of Git" (a research paper) Konstantin Khomoutov
2016-09-30 22:24 ` Jakub Narębski
2016-10-01 20:13   ` Kevin Daudt
2016-10-01 21:39     ` Jakub Narębski [this message]
     [not found]   ` <CAKbZu+BUOAjixTmEC4octseyJbMnFuaCTtLT9hx3H10=AECeKw@mail.gmail.com>
2016-10-05 10:14     ` Jakub Narębski
2016-10-05 10:42       ` Duy Nguyen
     [not found]       ` <CAKbZu+CTobJ9omSDtK5WQxUZuq=b0g0r59k+9MFFy247YijgUw@mail.gmail.com>
2016-10-07 18:05         ` Jakub Narębski
2016-10-07 17:52 ` Konstantin Khomoutov
2016-10-07 18:56   ` Jakub Narębski

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

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

  git send-email \
    --in-reply-to=ce42f934-4a94-fa29-cff0-5ebb0f004eb5@gmail.com \
    --to=jnareb@gmail.com \
    --cc=dnj@csail.mit.edu \
    --cc=git@vger.kernel.org \
    --cc=gvwilson@third-bit.com \
    --cc=jnareb@mat.umk.pl \
    --cc=kostix+git@007spb.ru \
    --cc=me@ikke.info \
    --cc=sperezde@csail.mit.edu \
    /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.
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 NNTP newsgroup(s).