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

Re: [RFC] git --trace: trace command execution

From
MLMatthias Lederhofer <matled@gmx.net>
Date
Jun 25, 2006, 12:51 UTC
Message-ID
<E1FuU5a-0000u3-Bc@moooo.ath.cx>
In-Reply-To
<7v3bdtv4h3.fsf@assigned-by-dhcp.cox.net>
Show 9 quoted lines
> Interesting.  Debugging one's alias entries would be helped with
> this I would imagine, and for that you would want something like
> this:
> 
> > Example:
> > % git showtag v1.4.1-rc1 > /dev/null
> > trace: exec: /home/matled/local/stow/git/bin/git-showtag v1.4.1-rc1
> > trace: exec failed: No such file or directory
> * trace: expanded alias "showtag" => "cat-file tag"
That's a good idea, I'll integrate that.
> By the way "git cat-file -p" or "git verify-tag -v" might be
> more pleasant to view a tag since they make the tagger timestamp
> human readable.

Ok, yesterday I was searching for something to see the annotation of a tag. verify-tag -v looks quite much like that, is there any other way to read this? Or in general: how do I work with tags? I want to build a version tagged as v1.2 so currently I'll do

> git checkout -b 1.2 v1.2

and built it. But then I've to type the version number twice (typing it once is annoying enough :)) and I've to type it once more to get the tag annotation.

> Might be worth reusing quote.c::sq_quote(), perhaps?

Oh, sure, did not know about this. This would result in a loop of malloc'ing memory for the buffer. Is this ok? Or should I add a function like sq_quote which takes a stream and writes to it?

So for the --trace part I think an environment variable GIT_TRACE is more suitable for this because children inherit this. So running git status will show what internal commands the shell script uses. Otherwise I see no way to pass the --trace option down because an extern program like git-status, git-annotate etc will not accept parameters which can be passed to `git'.

Previous: Junio C HamanoNext: Matthias Lederhofer
Message 3 of 10 in “[RFC] git --trace: trace command execution”
  1. Matthias LederhoferJun 25, 2006
  2. Junio C HamanoJun 25, 2006
  3. Matthias LederhoferJun 25, 2006
  4. GIT_TRACE: show which built-in/external commands are executedMatthias Lederhofer, Jun 25, 2006
  5. Johannes SchindelinJun 25, 2006
  6. Petr BaudisJun 25, 2006
  7. Matthias LederhoferJun 25, 2006
  8. Johannes SchindelinJun 25, 2006
  9. Matthias LederhoferJun 28, 2006
  10. Jakub NarebskiJun 29, 2006

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.