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

Re: adding files in .git?

From
Shawn O. Pearce <spearce@spearce.org>
Date
Mar 16, 2009, 15:18 UTC
Message-ID
<20090316151823.GP22920@spearce.org>
In-Reply-To
<3a69fa7c0903160814u42fbb461qf03a37176546357d@mail.gmail.com>
E R <pc88mxer@gmail.com> wrote:
Show 12 quoted lines
> I'd like to add a "short description" attribute to my .git repository.
> This would be used by my bash prompt setting function in creating the
> PS1 string. How would you recommend that this be implemented?
> 
> My ideas are:
> 
> 1) Use another file in .git similar to the "description" file (such as
> .git/short-description)
> 2) Use a setting in the .git/config file.
> 
> Any comments on the advantages/disadvantages of these approaches? Or
> is there yet another better way?

Using another file may be faster to execute as you can probably read the file directly in shell, vs. needing to fork to read the file with `git config`.

But there really isn't a huge argument either way other than that.
-- 
Shawn.
Previous: E RNext: Matthieu Moy
Message 2 of 3 in “adding files in .git?”
  1. E RMar 16, 2009
  2. Shawn O. PearceMar 16, 2009
  3. Matthieu MoyMar 16, 2009

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.