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

Re: [StGit PATCH 07/10] Teach the new infrastructure about the index and worktree

From
Karl Hasselström <kha@treskal.com>
Date
Nov 26, 2007, 10:44 UTC
Message-ID
<20071126104448.GA3936@diana.vm.bytemark.co.uk>
In-Reply-To
<874pf9bd11.fsf@lysator.liu.se>
On 2007-11-26 09:56:42 +0100, David Kågedal wrote:
Show 16 quoted lines
> Karl Hasselström <kha@treskal.com> writes:
>
> > --- a/stgit/lib/git.py
> > +++ b/stgit/lib/git.py
> > @@ -95,6 +95,8 @@ class Commitdata(Repr):
> >          return type(self)(committer = committer, defaults = self)
> >      def set_message(self, message):
> >          return type(self)(message = message, defaults = self)
> > +    def is_empty(self):
> > +        return self.tree == self.parent.data.tree
> >      def __str__(self):
> >          if self.tree == None:
> >              tree = None
>
> But a Commitdata describes a Git commit, right? And not an StGit
> patch.
Yes.
> So what does it mean to say that a commit is empty? I could just as
> well mean that the tree is the null tree. I think I would have
> called this "is_nochange" or something.
Good point.
-- 
Karl Hasselström, kha@treskal.com
      www.treskal.com/kalle
Previous: David KågedalNext: Karl Hasselström
Message 11 of 14 in “Infrastructure rewrite series”
  1. 00/10 Infrastructure rewrite seriesKarl Hasselström, Nov 25, 2007
  2. 01/10 New StGit core infrastructure: repository operationsKarl Hasselström, Nov 25, 2007
  3. 02/10 Write metadata files used by the old infrastructureKarl Hasselström, Nov 25, 2007
  4. 03/10 Upgrade older stacks to newest versionKarl Hasselström, Nov 25, 2007
  5. 04/10 Let "stg clean" use the new infrastructureKarl Hasselström, Nov 25, 2007
  6. 05/10 Add "stg coalesce"Karl Hasselström, Nov 25, 2007
  7. 06/10 Let "stg applied" and "stg unapplied" use the new infrastructureKarl Hasselström, Nov 25, 2007
  8. 07/10 Teach the new infrastructure about the index and worktreeKarl Hasselström, Nov 25, 2007
  9. Karl HasselströmNov 26, 2007
  10. David KågedalNov 26, 2007
  11. Karl HasselströmNov 26, 2007
  12. 08/10 Let "stg clean" use the new transaction primitivesKarl Hasselström, Nov 25, 2007
  13. 09/10 Let "stg goto" use the new infrastructureKarl Hasselström, Nov 25, 2007
  14. 10/10 Convert "stg uncommit" to the new infrastructureKarl Hasselström, Nov 25, 2007

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.