All of lore.kernel.org
 help / color / mirror / Atom feed
* Retrieving logs matching pattern for all time.
@ 2011-09-03  0:03 Jeremy Nickurak
  2011-09-04 16:13 ` Thomas Rast
  0 siblings, 1 reply; 3+ messages in thread
From: Jeremy Nickurak @ 2011-09-03  0:03 UTC (permalink / raw)
  To: git

I have a glob pattern of files, and I'd like to get git logs for every
commit that touched those files. 'git log filesmatchingglob*' is
pretty close.

Unfortunately, because the * is interpreted by bash, it doesn't catch
logs for files that don't exist anymore.

Protecting the * from bash was my next thought, but that doesn't seem to help:

> user@host:~$ mkdir something
> user@host:~$ cd something
> user@host:~/something$ git init
> Initialized empty Git repository in /home/nickuj/something/.git/
> user@host:~/something$ echo hello > hello.txt
> user@host:~/something$ git add hello.txt
> user@host:~/something$ git commit -m hello hello.txt
> [master (root-commit) ca4b223] hello
>  1 files changed, 1 insertions(+), 0 deletions(-)
>  create mode 100644 hello.txt
> user@host:~/something$ git log -- 'hel*'
> user@host:~/something$

IE, git doesn't seem to interpret globs itself in patterns.

http://stackoverflow.com/questions/543346/git-list-all-the-files-that-ever-existed
suggests a means to get a list of all files that ever existed, and I
could certainly iterate across that, find the files that match the
pattern, and then run git-log against that.... but it seems like a
problem somebody's already solved more elegantly.

Any thoughts?

-- 
Jeremy Nickurak

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Retrieving logs matching pattern for all time.
  2011-09-03  0:03 Retrieving logs matching pattern for all time Jeremy Nickurak
@ 2011-09-04 16:13 ` Thomas Rast
  2011-09-04 18:59   ` Junio C Hamano
  0 siblings, 1 reply; 3+ messages in thread
From: Thomas Rast @ 2011-09-04 16:13 UTC (permalink / raw)
  To: Jeremy Nickurak; +Cc: git

Jeremy Nickurak wrote:
> > user@host:~/something$ git log -- 'hel*'
> > user@host:~/something$
> 
> IE, git doesn't seem to interpret globs itself in patterns.

It does for me:

thomas@thomas:~/g(next u+59)$ g log --oneline --name-status -- "REA*"
f73b3af README: git lives at http://git-scm.com these days
M       README

etc.

Which git version are you using?

-- 
Thomas Rast
trast@{inf,student}.ethz.ch

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Retrieving logs matching pattern for all time.
  2011-09-04 16:13 ` Thomas Rast
@ 2011-09-04 18:59   ` Junio C Hamano
  0 siblings, 0 replies; 3+ messages in thread
From: Junio C Hamano @ 2011-09-04 18:59 UTC (permalink / raw)
  To: Thomas Rast; +Cc: Jeremy Nickurak, git

Thomas Rast <trast@student.ethz.ch> writes:

> Jeremy Nickurak wrote:
>> > user@host:~/something$ git log -- 'hel*'
>> > user@host:~/something$
>> 
>> IE, git doesn't seem to interpret globs itself in patterns.
>
> It does for me:
>
> thomas@thomas:~/g(next u+59)$ g log --oneline --name-status -- "REA*"
> f73b3af README: git lives at http://git-scm.com these days
> M       README
>
> etc.

The "git log" family learned globbing pathspecs in 1.7.5 if I believe the
Release Notes.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-09-04 19:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-03  0:03 Retrieving logs matching pattern for all time Jeremy Nickurak
2011-09-04 16:13 ` Thomas Rast
2011-09-04 18:59   ` Junio C Hamano

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.