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

Re: [PATCH] Add git-edit-index.perl

From
Jeff King <peff@peff.net>
Date
Dec 18, 2008, 14:04 UTC
Message-ID
<20081218140411.GB6706@coredump.intra.peff.net>
In-Reply-To
<alpine.DEB.1.00.0812181446430.6952@intel-tinevez-2-302>
On Thu, Dec 18, 2008 at 02:48:39PM +0100, Johannes Schindelin wrote:
Show 5 quoted lines
> Yes, it is a neat idea.  But I always keep in mind what Junio had to say 
> about my "add -e" thing (that I use pretty frequently myself): you will 
> put something into the index that has _never_ been tested.
> 
> Would we really want to bless such a workflow with "official" support?

That is definitely something to be concerned about. Which is why my workflow is something like:

  $ hack hack hack
  $ while ! git diff; do
      git add -p
      git commit
    done
  $ for i in `git rev-list origin..`; do
      git checkout $i && make test || barf
    done

That is, it is not inherently a problem to put something untested into the index as long as you are doing it so that you can go back and test later.

It _would_ be a nicer workflow to say "I don't want these changes yet" and selectively put them elsewhere, test what's in the working tree, commit, and then grab some more changes from your stash. But we don't have interactive stashing and unstashing yet, which would be required for that.

-Peff
Previous: Johannes SchindelinNext: Johannes Schindelin
Message 4 of 8 in “Add git-edit-index.perl”
  1. Add git-edit-index.perlNeil Roberts, Dec 17, 2008
  2. Jeff KingDec 18, 2008
  3. Johannes SchindelinDec 18, 2008
  4. Jeff KingDec 18, 2008
  5. Johannes SchindelinDec 18, 2008
  6. Miklos VajnaDec 18, 2008
  7. Johannes SchindelinDec 18, 2008
  8. Junio C HamanoDec 18, 2008

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.