Subject: searching for git commit hash

From: Bruce Momjian <[email-masked]>
Date: Tue, 29 May 2012 20:31:33 -0400

How do I search for a commit with a specific hash tag on our git web
site?

	http://git.postgresql.org/gitweb/?p=postgresql.git;a=summary

-- 
  Bruce Momjian  <[email-masked]>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  + It's impossible for everything to be true. +

---

From: Magnus Hagander <[email-masked]>
Date: Wed, 30 May 2012 07:06:54 +0200

>        http://git.postgresql.org/gitweb/?p=postgresql.git;a=summary

I don't believe gitweb supports searching. You'll need to pick another
hash and then copy/paste on the URL.

-- 
 Magnus Hagander
 Me: http://www.hagander.net/
 Work: http://www.redpill-linpro.com/

---

From: Bruce Momjian <[email-masked]>
Date: Wed, 30 May 2012 01:09:45 -0400

> hash and then copy/paste on the URL.

That's what I thought, but it seemed there must be a way.  Obviously
not.

---

From: Marti Raudsepp <[email-masked]>
Date: Wed, 30 May 2012 12:44:20 +0300

> hash and then copy/paste on the URL.

Well there is a "search" box in the upper right corner, but I think it
can only search for text, not commit hashes.

Regards,
Marti

---

From: Greg Stark <[email-masked]>
Date: Wed, 30 May 2012 13:54:17 +0100

> How do I search for a commit with a specific hash tag on our git web

I just paste the hash into google and hit I'm Feeling Lucky.

Actually in reality I paste it into the omnibox in chrome so I then I
have to click the first search result.

-- 
greg

---

From: Bruce Momjian <[email-masked]>
Date: Wed, 30 May 2012 09:09:56 -0400

> have to click the first search result.

Wow, having Google search for it works;  those hashes really are unique.

---

From: Tom Lane <[email-masked]>
Date: Wed, 30 May 2012 10:03:44 -0400

> can only search for text, not commit hashes.

I have a private page containing a text box I can type the hash into.
This is very fast and it works with hash prefixes too, which I bet
google would not.

     <form action="http://git.postgresql.org/gitweb"
      method="get" id="goto-commit-id">
      <input type="hidden" name="p" value="postgresql.git" />
      <input type="hidden" name="a" value="commitdiff" />
      Git Commit Hash <input type="text" name="h" size="60" />
     </form>

Dunno if enough people would use this to justify putting it on a public
page.

			regards, tom lane

---

From: Magnus Hagander <[email-masked]>
Date: Wed, 30 May 2012 16:34:27 +0200

> Dunno if enough people would use this to justify putting it on a public

Should be easy enough to add if people want it - somewhere under
www.postgresql.org/developer/ i'd assume...

---

From: Bruce Momjian <[email-masked]>
Date: Sun, 2 Sep 2012 08:54:07 -0400

> www.postgresql.org/developer/ i'd assume...

Yes, I think it would be very useful to have on our website.

---

From: Peter Geoghegan <[email-masked]>
Date: Sun, 2 Sep 2012 14:06:54 +0100

> Yes, I think it would be very useful to have on our website.

+1

I'd like to have a Google chrome extension that exposes it through a
right-click context menu. Do you know enough javascript to throw one
together, Magnus? :-)

-- 
Peter Geoghegan       http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training and Services

---

From: Magnus Hagander <[email-masked]>
Date: Tue, 4 Sep 2012 15:07:20 +0200

> Yes, I think it would be very useful to have on our website.

Added to http://www.postgresql.org/developer/coding/.

---

From: Magnus Hagander <[email-masked]>
Date: Tue, 4 Sep 2012 15:07:41 +0200

> right-click context menu. Do you know enough javascript to throw one

Funny guy... I can test it once you've written it though.

---

From: Dimitri Fontaine <[email-masked]>
Date: Tue, 25 Sep 2012 23:34:01 +0200

> Added to http://www.postgresql.org/developer/coding/.

What I would like to have is the result of whatever tool is used those
days to know which branches contain any given patch. I though that was
./src/tools/git_changelog but I can't seem to have that work here.

Regards,
-- 
Dimitri Fontaine
http://2ndQuadrant.fr     PostgreSQL : Expertise, Formation et Support

---

From: Tom Lane <[email-masked]>
Date: Tue, 25 Sep 2012 17:52:03 -0400

> ./src/tools/git_changelog but I can't seem to have that work here.

That's what I use.  What about it doesn't work for you?

			regards, tom lane

---

From: Dimitri Fontaine <[email-masked]>
Date: Tue, 25 Sep 2012 23:56:52 +0200

> That's what I use.  What about it doesn't work for you?

I don't remember how to summon it properly so it keeps barking at me.
Mmmm, I did try to have the information reported for a single commit,
though.

./src/tools/git_changelog --since '2012-09-14 00:00:00' --oldest-first --details-after
fatal: ambiguous argument 'master..origin/REL9_2_STABLE': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions
git log --format=fuller --date=iso --since=2012-09-14 00:00:00 --parents
master..origin/REL9_2_STABLE failed at ./src/tools/git_changelog line
141.

Well, I would like having the information on the web. Ideally at the
same place where we can browse the commit logs (gitweb), if not from
somewhere else where it's easy to grasp.

Regards,

---

From: Tom Lane <[email-masked]>
Date: Tue, 25 Sep 2012 18:10:09 -0400

> I don't remember how to summon it properly so it keeps barking at me.

FWIW, I run it once a week or so without any parameters and keep the
results in a text file for quick reference.  I won't be answerable
for whether any of those options Bruce added work ;-)

> master..origin/REL9_2_STABLE failed at ./src/tools/git_changelog line

That is a bit odd though, since it seems to be failing in mainline code
that's not dependent on any options at all.  What version of git do you
have?

			regards, tom lane

---

From: Magnus Hagander <[email-masked]>
Date: Wed, 26 Sep 2012 04:10:09 +0200

> ./src/tools/git_changelog but I can't seem to have that work here.

Are you talking about a simple "git branch -a --contains=<hash>"?

That only works if the hash is the same of course - not if the patch
was different in a back branch.

---

From: Alvaro Herrera <[email-masked]>
Date: Tue, 25 Sep 2012 23:52:12 -0300

> that's not dependent on any options at all.  What version of git do you

I remember having it fail in a similar way (don't really recall exactly)
when I tried to run it in a clone that didn't have all branches (I had
deleted them per the instructions in the wiki).  Once I restored them,
it started working.

-- 
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

---

From: Dimitri Fontaine <[email-masked]>
Date: Wed, 26 Sep 2012 11:24:21 +0200

> that's not dependent on any options at all.  What version of git do you

git version 1.7.3.1

That said, I'm realizing that on this development machine:

dim ~/dev/PostgreSQL/postgres git branch
  command_triggers
  event_triggers
  evt_trig_v1
  evt_v1_diff
* master
  origin-utility_node_to_string

And of course my origin here is my own github fork, the real thing here
is called the postgres remote…

And now trying to get several branches exist in different subdirs… not
there yet exactly with git, which is why an online tool would be great…