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

Re: [StGIT PATCH 2/4] Implement a new patch identification scheme and id command

From
Karl Hasselström <kha@treskal.com>
Date
Jun 22, 2008, 15:27 UTC
Message-ID
<20080622152758.GB4468@diana.vm.bytemark.co.uk>
In-Reply-To
<20080619214210.27794.76950.stgit@localhost.localdomain>
On 2008-06-19 22:42:10 +0100, Catalin Marinas wrote:
> The new scheme allows '[<branch>:]<patch>' and '[<branch>:]{base}'
> (the latter showing the base of a stack). The former format allows
> symbols like ^ and ^{...}.

Hmm. Why only the former? Supporting it for the latter should be easy. (Though it would take some extra work, I guess.)

Other than that, it looks good to me.
> +def git_commit(name, repository, branch = None):
> +    """Return the a Commit object if 'name' is a patch name or Git commit.
> +    The patch names allowed are in the form '<branch>:<patch>' and can be
> +    followed by standard symbols used by git-rev-parse. If <patch> is '{base}',
Long line.
> +    # The stack base
> +    if patch == '{base}':
> +        return repository.get_stack(branch).base
Should be a simple matter of
  if patch.startswith('{base}'):
      foo = repository.get_stack(branch).base + drop_prefix(patch, '{base}')
      return repository.rev_parse(foo)
or something.
-- 
Karl Hasselström, kha@treskal.com
      www.treskal.com/kalle
Previous: Catalin MarinasNext: Catalin Marinas
Message 6 of 13 in “Proposed patches”
  1. 0/4 Proposed patchesCatalin Marinas, Jun 19, 2008
  2. 1/4 Allow e-mails to be sent with the Unix sendmail toolCatalin Marinas, Jun 19, 2008
  3. Karl HasselströmJun 22, 2008
  4. Catalin MarinasJun 29, 2008
  5. 2/4 Implement a new patch identification scheme and id commandCatalin Marinas, Jun 19, 2008
  6. Karl HasselströmJun 22, 2008
  7. 3/4 Convert git_id() to the new id formatCatalin Marinas, Jun 19, 2008
  8. Karl HasselströmJun 22, 2008
  9. Catalin MarinasJul 13, 2008
  10. Karl HasselströmJul 14, 2008
  11. 4/4 Remove the applied/unapplied commandsCatalin Marinas, Jun 19, 2008
  12. Karl HasselströmJun 22, 2008
  13. Catalin MarinasJul 13, 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.