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

Re: [StGit PATCH 03/14] Write to a stack log when stack is modified

From
Karl Hasselström <kha@treskal.com>
Date
Jul 1, 2008, 20:13 UTC
Message-ID
<20080701201355.GA19096@diana.vm.bytemark.co.uk>
In-Reply-To
<20080617153247.GA12520@diana.vm.bytemark.co.uk>
On 2008-06-17 17:32:47 +0200, Karl Hasselström wrote:
Show 24 quoted lines
> On 2008-06-17 15:11:42 +0100, Catalin Marinas wrote:
>
> > 2008/6/17 Karl Hasselström <kha@treskal.com>:
> >
> > > On 2008-06-17 11:24:53 +0100, Catalin Marinas wrote:
> > >
> > > > 2008/6/12 Karl Hasselström <kha@treskal.com>:
> > > >
> > > > >  class _Directory(object):
> > > > > -    def __init__(self, needs_current_series = True):
> > > > > +    def __init__(self, needs_current_series = True, log = True):
> > > >
> > > > i.e. we make log = False here by default.
> > >
> > > I might not have understood precisely what you meant; but I
> > > don't think API backwards compatibilty should be an issue here?
> > > I simply fix all callers. If log should default to true or false
> > > is immaterial -- it just means some extra text in one or the
> > > other of two equally common cases.
> >
> > Not an issue, I just favour the existing one when the two cases
> > are almost equal.
>
> Fair enough. I'll change it.

I had an even better idea: no default value. Every caller gets to say either log = True or log = False, which makes it immediately obvious to the reader. (That is, every caller still using the old infrastructure; with the new infrastructure, we log if and only if a transaction is run.)

-- 
Karl Hasselström, kha@treskal.com
      www.treskal.com/kalle
Previous: Karl HasselströmNext: Catalin Marinas
Message 20 of 32 in “Undo series”
  1. 00/14 Undo seriesKarl Hasselström, Jun 12, 2008
  2. 01/14 Fix typoKarl Hasselström, Jun 12, 2008
  3. 02/14 Library functions for tree and blob manipulationKarl Hasselström, Jun 12, 2008
  4. 03/14 Write to a stack log when stack is modifiedKarl Hasselström, Jun 12, 2008
  5. Catalin MarinasJun 17, 2008
  6. Karl HasselströmJun 17, 2008
  7. Karl HasselströmJun 17, 2008
  8. Catalin MarinasJun 17, 2008
  9. Karl HasselströmJun 17, 2008
  10. Catalin MarinasJun 18, 2008
  11. Karl HasselströmJun 18, 2008
  12. Catalin MarinasJun 18, 2008
  13. Karl HasselströmJun 18, 2008
  14. Catalin MarinasJun 19, 2008
  15. Karl HasselströmJun 19, 2008
  16. Catalin MarinasJun 20, 2008
  17. Karl HasselströmJun 23, 2008
  18. Catalin MarinasJul 12, 2008
  19. Karl HasselströmJul 14, 2008
  20. Karl HasselströmJul 1, 2008
  21. Catalin MarinasJul 3, 2008
  22. 04/14 Add utility function for reordering patchesKarl Hasselström, Jun 12, 2008
  23. 05/14 New command: stg resetKarl Hasselström, Jun 12, 2008
  24. 06/14 Log conflicts separatelyKarl Hasselström, Jun 12, 2008
  25. 07/14 Log conflicts separately for all commandsKarl Hasselström, Jun 12, 2008
  26. 08/14 Add a --hard flag to stg resetKarl Hasselström, Jun 12, 2008
  27. 09/14 Don't write a log entry if there were no changesKarl Hasselström, Jun 12, 2008
  28. 10/14 Move stack reset function to a shared locationKarl Hasselström, Jun 12, 2008
  29. 11/14 New command: stg undoKarl Hasselström, Jun 12, 2008
  30. 12/14 New command: stg redoKarl Hasselström, Jun 12, 2008
  31. 13/14 Log and undo external modificationsKarl Hasselström, Jun 12, 2008
  32. 14/14 Make "stg log" show stack log instead of patch logKarl Hasselström, Jun 12, 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.