wishlist: git info

Previous thread: [PATCH] Make GIT_INDEX_FILE apply to git-commit by Remi Vanicat on Monday, November 12, 2007 - 2:45 pm. (1 message)

Next thread: [PATCH] Call refresh_cache() when updating the user index for --only commits. by Kristian Høgsberg on Monday, November 12, 2007 - 4:48 pm. (2 messages)
To: <git@...>
Date: Monday, November 12, 2007 - 4:30 pm

Hi,

while git is pleasant to use in everyday work, there is one svn feature
which is miss dearly, namely "svn info". svn info can give information
about specific file objects, but I think its main feature is to use it
without any path and thus just describe the current project.
I use this a lot to quickly find out to which remote repository the
current directory belongs (yes, some work projects tend to look very
similar...) and what is the current state of the directory.

As a crude approximation, "git info" should print something like:
cat .git/config | grep url
git show | head -3

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.
If there is consensus that this is a useful feature I can try to suggest
a patch (although honestly I would prefer that someone else does it, I
am not familiar with the git internals).

Thomas

-

To: Thomas Neumann <tneumann@...>
Cc: <git@...>
Date: Monday, November 12, 2007 - 6:21 pm

[Empty message]
To: Alex Riesen <raa.lkml@...>
Cc: <git@...>
Date: Monday, November 12, 2007 - 6:50 pm

hm, this is not what I am after. I do not want to inspect the history, I
want to see where this repository "belongs" to. Gitk shows me the name
(which is reasonable, of course), but not the URL. And it is a GUI
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.
perhaps, the first command gives me an error (git 1.5.2.5). This here is
nearly ok

git remote && git log --max-count=1 --pretty=format:'%H %cD'

except the missing URL from git remote (but perhaps your options include
this is has side effects, and is quite slow. Your command sequence above
is more handy (and faster).

So I can emulate git info with an alias, and this is good enough for mew
now, thanks for the hints. Perhaps a somewhat more elaborate version of
git info might be useful for others, too, but this is not urgent.

Thomas
-

To: Thomas Neumann <tneumann@...>
Cc: <git@...>
Date: Monday, November 12, 2007 - 7:41 pm

...which in Git-lingo would be misunderstood as the output of

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

It is there since 1.5.3-rc1

-

Previous thread: [PATCH] Make GIT_INDEX_FILE apply to git-commit by Remi Vanicat on Monday, November 12, 2007 - 2:45 pm. (1 message)

Next thread: [PATCH] Call refresh_cache() when updating the user index for --only commits. by Kristian Høgsberg on Monday, November 12, 2007 - 4:48 pm. (2 messages)