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

Re: wishlist: git info

From
Alex Riesen <raa.lkml@gmail.com>
Date
Nov 12, 2007, 23:41 UTC
Message-ID
<20071112234115.GJ2918@steel.home>
In-Reply-To
<4738D8AA.1030604@users.sourceforge.net>
Thomas Neumann, Mon, Nov 12, 2007 23:50:18 +0100:
Show 10 quoted lines
> >> Probably not the most intelligent way to compute it, but you get the
> >> idea. git info should give a brief overview over the current working
> >> directory.
> >
> > Like what? None of the commands you suggested even touch it.
> probably "current working directory" was not the best way to phrase it.
> I mean state of the repository, which in my case is a clone of a central
> repository.
> My commands show (ignoring formatting): 1. the remote repositories with
> URL 2. the current head commit hash 3. the date of the head commit.
Don't you want to know where the remote repo is at?
> Which gives a pretty decent idea about the state of the repository.

...which in Git-lingo would be misunderstood as the output of git-status :)

Show 7 quoted lines
> > Would
> >
> >     git remote -r -v && git log --max-count=1 --pretty=format:'%h %s'
> >
> > do what you think is what you need?
> perhaps, the first command gives me an error (git 1.5.2.5). This here is
> nearly ok
Ach, make it "git remote -v". It does exactly showing of the url.

Dunno what I wanted the "-r" for. Probably left from thinking of "git branch -r" (which shows remote branches).

> git remote && git log --max-count=1 --pretty=format:'%H %cD'
> 
> except the missing URL from git remote (but perhaps your options include
> it with a newer git version, will test).
It is there since 1.5.3-rc1
Previous: Thomas NeumannNext: Jakub Narebski
Message 4 of 17 in “wishlist: git info”
  1. Thomas NeumannNov 12, 2007
  2. Alex RiesenNov 12, 2007
  3. Thomas NeumannNov 12, 2007
  4. Alex RiesenNov 12, 2007
  5. Jakub NarebskiNov 12, 2007
  6. Thomas NeumannNov 13, 2007
  7. Jakub NarebskiNov 13, 2007
  8. Jakub NarebskiNov 13, 2007
  9. Johannes SchindelinNov 13, 2007
  10. Thomas NeumannNov 13, 2007
  11. Jan HudecNov 17, 2007
  12. Junio C HamanoNov 13, 2007
  13. Thomas NeumannNov 13, 2007
  14. Andreas EricssonNov 13, 2007
  15. Junio C HamanoNov 13, 2007
  16. Alex RiesenNov 13, 2007
  17. Andreas EricssonNov 13, 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.