[tahoe-lafs-trac-stream] [tahoe-lafs] #1992: warn if testing uncommitted code
tahoe-lafs
trac at tahoe-lafs.org
Tue May 28 23:38:20 UTC 2013
#1992: warn if testing uncommitted code
------------------------------------+---------------------------
Reporter: daira | Owner: zooko
Type: defect | Status: new
Priority: normal | Milestone: undecided
Component: code | Version: 1.10.0
Keywords: test git review-needed | Launchpad Bug:
------------------------------------+---------------------------
{{{
<zooko>: I think you were advocating editing the current working
directory
to have a certain version in it, running tests, then
committing all
of the current working directory.
<zooko>: I now see why (because of the tests).
<zooko>: An alternative would be to commit a part of the current
working set,
such as by "git commit $THISFILE" or even the interactive
hunk-picking
features, then run tests on that committed version.
<nejucomo>: What I'm advocating against is using "git add" to select some
set of
the working directory, and then committing a state which
you've never
actually interacted with.
<nejucomo>: zooko: What if the $THISFILE imports a python module which is
also
altered, but which is not in the index?
<nejucomo>: Unit tests would pass, but if anyone checked out that commit,
unit
tests would fail.
[later...]
<zancas>: Huh... why?
<zancas>: 'git add' only makes new files be part of the index.
<zancas>: When you commit, all previously tracked state is still
tracked.
<zancas>: The commit-tree that you get when you run 'git commit' will
contain
everything that was in the previous commit, plus the new blobs
that
track the files you added.
<daira>: if the tree was dirty when you ran tests, I think nejucomo
meant
<daira>: maybe we could make the tests output a warning if the tree is
dirty?
<daira>: (that would be pretty easy to do)
}}}
[https://github.com/tahoe-lafs/tahoe-lafs/pull/45]
--
Ticket URL: <https://tahoe-lafs.org/trac/tahoe-lafs/ticket/1992>
tahoe-lafs <https://tahoe-lafs.org>
secure decentralized storage
More information about the tahoe-lafs-trac-stream
mailing list