1 |
On Mon, Nov 29, 2021 at 11:17 AM Peter Humphrey <peter@××××××××××××.uk> wrote: |
2 |
> |
3 |
> On Monday, 29 November 2021 16:03:25 GMT Rich Freeman wrote: |
4 |
> > On Mon, Nov 29, 2021 at 5:39 AM tastytea <gentoo@××××××××.de> wrote: |
5 |
> > > If you want the history for a file, you need to specify the full path: |
6 |
> > > |
7 |
> > > git log sys-devel/gcc/gcc-11.2.1_p20211127.ebuild |
8 |
> > |
9 |
> > You can also point it at a directory and get changes for the entire |
10 |
> > directory. I also suggest trying "git whatchanged" as an alternative |
11 |
> > to "git log." |
12 |
> |
13 |
> I didn't know about whatchanged. I tried it like this and got 120k lines of |
14 |
> output: |
15 |
> |
16 |
> # (cd /var/db/repos/gentoo/sys-devel/gcc && git whatchanged) |
17 |
|
18 |
You'd get just as much output from git log - you didn't restrict the |
19 |
output so it ran on the entire repository. The current working |
20 |
directory has no impact on the function of either git log or git |
21 |
whatchanged. |
22 |
|
23 |
You could append a . to just run git whatchanged on the current |
24 |
directory. I run "git whatchanged ." all the time. |
25 |
|
26 |
> I've always found git counter-intuitive and I've resisted trying to understand |
27 |
> it, so far. Maybe I should make a little more effort. |
28 |
|
29 |
IMO time spent understanding git is highly rewarded. It isn't going anywhere. |
30 |
|
31 |
I've heard it said that git is a data model masquerading as an SCM, |
32 |
and that is very accurate. If you don't understand how it works |
33 |
you're going to be fighting it. |
34 |
|
35 |
I get that you shouldn't have to know how the data model works to use |
36 |
a piece of software, but git runs pretty close to the metal. Sure, |
37 |
you can always just copy/paste some one-liner that you read on a |
38 |
website, but you're always going to feel like you're wrestling it. |
39 |
Linus basically built it for himself and a handful of people like him, |
40 |
and it shows. It is very powerful, but it is a bit like trying to use |
41 |
binutils without wanting to know what an ELF is. |
42 |
|
43 |
-- |
44 |
Rich |