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

Re: [TopGit PATCH] prev/next/tsort: commands to explore dependencies

From
Uwe Kleine-König <ukleinek@strlen.de>
Date
Sep 22, 2008, 20:10 UTC
Message-ID
<20080922201025.GB792@strlen.de>
In-Reply-To
<36ca99e90809221032x3003c1f7q8ef09cb92a0473ad@mail.gmail.com>
On Mon, Sep 22, 2008 at 07:32:50PM +0200, Bert Wesarg wrote:
Show 32 quoted lines
> On Mon, Sep 22, 2008 at 17:36, Petr Baudis <pasky@suse.cz> wrote:
> >  Hi,
> >
> > On Fri, Sep 19, 2008 at 11:55:00AM +0200, Bert Wesarg wrote:
> >> I hacked 3 commands to explore the dependencies of TopGit patches:
> >
> >  thanks, the idea of all three commands is good,
> >
> >>   I) tg prev [NAME]
> >>      outputs the dependencies of NAME
> >>
> >>  II) tg next [NAME]
> >>      outputs patches that depends on NAME
> >
> >  but I think it would be cleaner to add this functionality to
> > tg info...
> Right, but 'tg next' is shorter than any 'tg info --next'.
> 
> >
> >> III) tg tsort [PATTERN]
> >>      outputs a topological order of all patches starting with PATTERN
> >
> > ...and tg summary (overally, to have a tree view of branches).
> Maybe something like the graph output from git rev-log --graph?
> 
> >> +                                     printf "%s\t%q\n" "${dep_rev}" "${dep}" >&3
> >> +                                     printf "%s\t%s\n" "${topic_rev}" "${dep_rev}"
> >
> > %q?
> 
> "and %q causes printf to output the corresponding argument in  a
> format that can be reused as shell input."

With /bin/sh == dash this doesn't work. I havn't looked where and how this is used, but rev-parse has an --sq option that results in the output being shell quoted. Maybe this can help?

Best regards Uwe

Previous: Bert WesargNext: Bert Wesarg
Message 7 of 9 in “prev/next/tsort: commands to explore dependencies”
  1. prev/next/tsort: commands to explore dependenciesBert Wesarg, Sep 19, 2008
  2. tg-patch: add From/Date: line to header and print to fileBert Wesarg, Sep 19, 2008
  3. Petr BaudisSep 22, 2008
  4. Bert WesargSep 22, 2008
  5. Petr BaudisSep 22, 2008
  6. Bert WesargSep 22, 2008
  7. Uwe Kleine-KönigSep 22, 2008
  8. Bert WesargSep 22, 2008
  9. Petr BaudisSep 24, 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.