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

Re: wishlist: git info

From
Jakub Narebski <jnareb@gmail.com>
Date
Nov 13, 2007, 09:44 UTC
Message-ID
<fhbrll$ceq$1@ger.gmane.org>
In-Reply-To
<fhbn50$uqu$1@ger.gmane.org>
Thomas Neumann wrote:
>> Perhaps also project description (if it exists?)
> one can specify a project description? I did not even know this. But
> yes, this would be useful, too.

It is project description for gitweb (git web interface), and I think also for other web interfaces (cgit, wit, git-php). Or rather *repository* description. It is in .git/description (in 'description' file in git repository).

Unfortunately by default it contains (see: ${tempate_dir}/description)
  Unnamed repository; edit this file to name it for gitweb.
> In general I think git info should show everything to quickly understand
> what is currently checked out. The name of the current branch should
> probably be included, too.

Name of current branch, current directory, name of topdir (with '.git' stripped if it is bare repository), perhaps oneline description of top commit. And if branch is under StGit or Guilt (patch management interfaces) control.

See also helper functions to set shell prompt in contrib/completion/git-completion.bash.

I for example have "1760:[gitweb/web!git]$ " as bash prompt:
 - 1760 is number of command in history, 
 - 'gitweb/web' is name of branch I am on,
 - 'git' is the name of repository
This migitates need got 'git-info' command.
> I use an alias with the commands proposed by Alex Riessen for now, but a
> more general command would be nice.

You can always write[*1*] git-info.sh or git-info.perl[*2*], and install it as git-info in your git installation. And send patches here, to git mailing list, for comments.

Footnotes:
----------
[*1*] Even if one of the most common complaints is "too many user-visible
      commands".
[*2*] Scripts are better for ptototyping. Choose your own poison: POSIX
      shell or Perl...
-- 
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git
Previous: Thomas NeumannNext: Jakub Narebski
Message 7 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.