IRCloggy #git 2022-08-25

Logs Search ←Prev date Next date→ Channels Documentation

Provider of IRC logs since 2005.
WARNING: As Freenode became unjoinable and lost all warnings in topics, we cannot log channels on Freenode anymore.

2022-08-25

gildasio left00:00
atrigent_ joined00:02
gildasio joined00:02
YuGiOhJCJ left00:02
gildasio left00:02
atrigent left00:03
thiago joined00:03
gildasio joined00:03
nate4 joined00:09
cousteau shailangsa: if a commit doesn't change, its hash won't change00:12
if a commit changes, e.g. because you amend it, its hash will change00:12
nate4 left00:14
rama left00:14
loulou left00:15
cousteau a commit is a file (an object, rather) that contains: (1) a snapshot of the worktree, (2) a reference to its parent commit(s), (3) meta-info (who and when created the commit), and (4) a commit message00:16
for example, you can print the content of the HEAD commit by doing: git cat-file -p HEAD00:17
GNUmoon2 joined00:20
rgrinberg left00:20
tirnanog left00:20
cousteau the hash of that "file" is the hash of the commit00:21
in fact, the hash is simply the sha1sum of a file containing the object type ("commit"), a space, the object content size, a null char, and the object content00:23
{ printf '%s %s\0' "$(git cat-file -t HEAD)" "$(git cat-file -s HEAD)"; git cat-file -p HEAD; } | sha1sum # prints the hash of HEAD00:25
rgrinberg joined00:26
cousteau so, if you change (1) the content of the tree, (2) any reference to parent commits, or the hash of the parent commits, (3) author/committer name and date, or (4) the commit message, the hash will change.00:26
Hash Sigh.00:26
cousteau if you don't, it won't.00:26
Hash: hey, you knew the risks when you chose that nick00:26
Hash Bro.00:26
I can't even.00:27
willow joined00:27
Hash Man I'm just exhausted.00:27
Just... sigh.00:27
cousteau I'm sorry man, I didn't know you were here00:27
Hash It's not you, man. It's me!00:27
cousteau long day?00:27
tyson2 left00:29
codaraxis left00:30
lucasta joined00:30
rgrinberg left00:35
atrigent joined00:37
rgrinberg joined00:37
atrigent_ left00:38
dsrt^ joined00:40
zebrag left00:40
cousteau I wonder if git can handle files with newlines in their name. The tree format suggests it doesn't.00:41
hans_ left00:44
willow how to delete all entries that show up as 'deleted' in 'git status'?00:45
cousteau add them00:45
or `git add .` to add all files in the current folder00:46
willow so i don't have to do 'git rm' for each entry?00:46
nate4 joined00:46
cousteau like, if you delete a file doing `rm file.txt`, then you can tell git "hey look I deleted the file" by doing `git add file.txt`00:47
willow thing is, there are other untracked entries that i don't want added. i only want to rm the ones listed as 'deleted'00:47
cousteau or `git add .` for "add/delete all the files andchanges in this directory"00:47
oh00:47
yeah, that'd be a problem... it would have been a better idea to delete them with `git rm` instead00:48
willow saw this suggested online but doesn't work: git rm "$(git status | grep deleted | awk '{print $2}')"00:48
cousteau there are probably better ways00:48
at the very least, I'd recommend using `git status --porcelain` if you're going to use the output in a script like that00:49
arescorpio left00:50
Polo joined00:50
LuKaRo left00:51
mven3 joined00:51
dsrt^ left00:52
Polo left00:52
mven left00:53
mven3mven00:53
cousteau git status --porcelain | grep '^ D ' | sed 's/^...//' (might still be quoted)00:54
LuKaRo_ joined00:55
cousteau ...or git ls-files --deleted00:55
git ls-files --deleted | xargs git add might do the trick (unless the files have very weird names)00:57
hiroot joined00:57
willow well this will work: for l in "$(git status | grep deleted | cut -d " " -f 2-)"; do git rm "$l"; done00:57
cousteau it's a bit hacky; I'd recommend the `git ls-files --deleted` way rather than trying to parse the output of git status00:58
willow however there's another issue: "fatal: pathspec ' 3Ware RAID controllers/9650SE-2LP RAID controller/Download/.gitkeep" however the Download/ directory was deleted so I can't remove the .gitkeep00:58
cousteau yeah, I think you can't `git rm` that which doesn't exist... maybe try with --force00:59
but I think my method is a better idea00:59
mackerman git ls-files -z --deleted | xargs --null git add00:59
cousteau ah, -z to the rescue :)00:59
willow ah yes!01:00
cousteau mackerman: cool, that removes every weird formatting from git ls-files too01:00
I tried it on a "file containing a newline" and it didn't print the quotes and \n it usually prints01:01
chexum left01:04
chexum joined01:04
cousteau left01:05
rgrinberg left01:06
rgrinberg joined01:10
Sasazuka left01:10
ChmEarl joined01:11
ferdna left01:11
Sasazuka joined01:11
skapata left01:11
dsrt^ joined01:13
redscroll joined01:15
Sasazuka left01:16
hiroot left01:18
tyson2 joined01:20
Sasazuka joined01:22
forgotmynick left01:23
lucasta left01:25
rgrinberg left01:28
tyson2 left01:30
ZacSharp left01:32
tyson2 joined01:36
Colere left01:38
howdoi left01:45
rgrinberg joined01:48
nate4 left01:49
knolle left01:50
bambanxx left01:53
Colere joined01:53
dsrt^ left01:56
ghost43 joined01:58
ghost43_ left01:59
tyson2 left02:02
knolle joined02:04
Sasazuka left02:11
LuKaRo_ left02:13
vertreko joined02:19
dsrt^ joined02:23
LuKaRo joined02:24
nate4 joined02:28
ghost43 left02:28
GNUmoon2 left02:28
ghost43 joined02:28
clime left02:33
JanC left02:33
JanC joined02:33
rama joined02:33
thiago left02:34
dsrt^ left02:35
rama left02:38
keypusher left02:40
derpydoo left02:40
terrorjack left02:42
terrorjack joined02:42
keypusher joined02:43
gast0n joined02:45
tyson2 joined02:47
cdown left02:49
redscroll left03:05
The_Blode joined03:17
Misotauros left03:18
Betal joined03:26
atrigent left03:28
Misotauros joined03:33
atrigent joined03:33
nate4 left03:38
gast0n left03:39
TheCatBehemoth joined03:45
atrigent_ joined03:46
atrigent left03:46
rgrinberg left03:54
ChmEarl left04:01
cristiioan joined04:02
nate4 joined04:04
clime joined04:06
sympt joined04:14
nate4 left04:15
tyson2 left04:17
chemsmith left04:18
chemsmith joined04:20
vertreko left04:21
stewie925 joined04:23
human_g33k left04:27
human_g33k joined04:29
bloody left04:33
TheCatBehemoth left04:37
EvilDMP joined04:41
Night_Wulfe left04:46
pulse joined04:48
nate4 joined04:49
FH_thecat joined04:54
nate4 left04:54
firewyre joined04:55
lgc joined04:58
cristiioan left04:59
lgc left04:59
firewyre left05:01
firewyre joined05:02
SteveR joined05:02
atrigent_ left05:03
SteveR Hi, i tried to do a git push, and i got a message that the tip of the current branch is behind05:03
when i did a git pull05:03
it says You have divergent branches and need to specify how to reconcile them.05:03
what needs to be done here before i do a push?05:03
srinidhi joined05:03
atrigent joined05:07
SteveR tried this git pull --ff-only05:10
but i get an error saying fatal: Not possible to fast-forward, aborting.05:10
hbautista left05:13
jazzy left05:16
maret joined05:18
SteveR tried git push -f, and it worked05:18
maret left05:19
themill you just delete the remote work.05:20
maret joined05:20
Murr left05:20
Murr joined05:21
coot joined05:21
EvilDMP left05:22
Betal left05:22
Night_Wulfe joined05:24
coot left05:25
coot joined05:26
EvilDMP joined05:27
zeenk joined05:28
coot_ joined05:30
EvilDMP left05:31
coot left05:32
coot_ left05:34
pulse left05:35
coot joined05:37
enkeyz joined05:40
coot left05:46
coot joined05:48
srinidhi left05:49
reset left05:51
reset joined05:52
hamburgler left05:52
coot left05:54
carl-- joined05:55
carl-- left05:57
coot joined05:57
carl-- joined05:57
bn_work left06:00
laocid joined06:01
coot left06:01
Hi-Angel joined06:03
coot joined06:04
vlado joined06:07
srinidhi joined06:07
thebombzen joined06:07
igemnace joined06:08
coot left06:14
coot joined06:17
Sazhen86 joined06:21
coot left06:23
coot joined06:26
coot left06:26
vlado left06:31
sudoforge left06:31
mbalmer joined06:33
otisolsen70 joined06:37
stewie925 left06:38
coot joined06:39
srinidhi left06:42
rullie joined06:43
ulmanak joined06:47
coot left06:48
luffy left06:50
rfuentess joined06:50
coot joined06:51
SteveR left06:52
nate4 joined06:52
srinidhi joined06:54
gryffus left06:56
nate4 left06:57
theoceaniscool joined06:59
FH_thecat left06:59
Bjoi joined06:59
OnkelTem joined07:01
Sazhen86 left07:02
peirik joined07:03
mven1 joined07:06
mven left07:08
mven1mven07:08
vicecea left07:10
vicecea joined07:11
gryffus joined07:14
OnkelTem left07:24
peirik left07:24
zan left07:26
hiroot joined07:33
zan joined07:33
nyah joined07:35
feriman joined07:38
vlado joined07:39
laocid left07:52
RiFo joined07:54
hqdruxn08_ joined07:55
hqdruxn08_ left07:56
hqdruxn08 left07:58
dsrt^ joined07:58
peirik joined08:01
Sazhen86 joined08:02
peirik left08:08
dsrt^ left08:12
Bjoi left08:14
laocid joined08:19
cyber_heretic joined08:25
cyber_heretic left08:29
cart_ joined08:29
xayto left08:34
laocid left08:37
luffy joined08:41
OnkelTem joined08:46
peirik joined08:48
pulse joined08:48
xayto joined08:52
cristiioan joined08:54
adanwan left09:05
adanwan joined09:05
crabbedhaloablut left09:06
fling left09:06
FinnElija left09:06
fling joined09:06
ghost43_ joined09:06
ghost43 left09:06
crabbedhaloablut joined09:06
Aminda left09:08
FinnElija joined09:08
nate4 joined09:09
Aminda joined09:10
hqdruxn08 joined09:12
peirik left09:13
nate4 left09:14
Aminda left09:15
cyber_heretic joined09:16
menace joined09:16
menace left09:16
menace joined09:16
menaceDeknos09:16
cyber_heretic left09:16
Aminda joined09:32
kenanmarasli joined09:42
dionysus69 joined09:44
fling left09:47
crabbedhaloablut left09:47
crabbedhaloablut joined09:47
fling joined09:48
adanwan left09:51
adanwan joined09:51
reset left09:54
wallabra_ joined09:57
reset joined09:57
wallabra left09:58
peirik joined09:58
wallabra_wallabra09:59
Sazhen86 left10:00
adanwan left10:01
adanwan joined10:02
skapata joined10:07
skapata left10:07
skapata joined10:07
cristiioan left10:11
Hi-Angel left10:13
magic_ninja left10:14
maret left10:15
maret joined10:15
magic_ninja joined10:15
OnkelTem left10:24
peirik left10:25
gas51627 joined10:32
gxt_ joined10:34
gxt left10:35
vishal left10:36
himint joined10:37
vishal joined10:38
hiroot left10:40
luffy left10:43
luffy joined10:43
cdown joined10:45
gxt_ left10:47
gxt_ joined10:48
PocketLagger left10:51
PocketKiller joined10:52
schoty left10:52
schoty joined10:54
cyber_heretic joined10:55
maret left10:57
indy left10:59
indy joined10:59
feriman left11:02
ZacSharp joined11:04
feriman joined11:07
bkircher left11:08
fuzzybear396575 joined11:09
fuzzybear396575 I have a branch foo on top of a branch bar on top of a branch staging.11:09
I want to put foo on top of staging.11:09
pretty_dumm_guy joined11:09
fuzzybear396575 I think this is a use case for git rebase --onto but I'm scared to execute.11:09
Does anyone know how to do what I want? foo and bar would be in parallel on staging, thten.11:10
*then.11:10
selckin checkout branch foo, git rebase staging11:10
indy left11:10
fuzzybear396575 selckin It says it's already up to tdate.11:10
*date.11:10
Because foo is on top of bar which is on top of sttaging.11:10
*staging.11:10
thiago joined11:11
fuzzybear396575 I think it's git rebase --onto staging foo.11:11
I'm going to try it.11:11
selckin sounds like you made a big mess11:12
indy joined11:12
fuzzybear396575 Not really.11:12
selckin you have a - b - c, and want to remove b to have a - c11:13
either way, crazy branching strategies going on11:14
peirik joined11:15
fuzzybear396575 It's actually a common case that's documented in `git rebase --help`.11:17
It was just git rebase --onto staging bar foo11:17
https://git-scm.com/docs/git-rebase11:18
> This is useful when topicB does not depend on topicA.11:18
indy left11:19
Murr left11:20
Murr joined11:21
ZacSharp left11:26
indy joined11:26
fuzzybear396575 left11:28
indy left11:30
peirik left11:32
indy joined11:33
luffy left11:36
luffy joined11:37
cousteau joined11:43
cousteau Hi11:43
adanwan left11:43
LuKaRo left11:43
luffy left11:44
indy left11:44
cousteau Imaagine I want to use the pattern "https://github.com/foo/bar.git" as a replacement for both "git://github.com/foo/bar.git" and "git@github.com:foo/bar.git". What config options do I need?11:44
froyo joined11:44
adanwan joined11:44
epony joined11:46
cousteau If I do `git config url.'https://github.com/'.insteadOf 'git://github.com/'` that takes care of the first replacement11:46
If I then do `git config url.'https://github.com/'.insteadOf 'git@github.com:'` that would take care of the second replacement... but it removes the first replacement11:46
indy joined11:47
LuKaRo joined11:47
cousteau also, if I do something like the former, and then `git config url.'http://github.com/'.insteadOf 'git://github.com/'`, I will have two conflicting candidates for a replacement of 'git://gitnub.com/*' URLs11:47
maret joined11:48
indy_ joined11:53
indy left11:54
cousteau the documentation says "when more than one insteadOf strings match a given URL, the longest match is used", but in this case the two URLs are identical, so it's a tie11:55
Hi-Angel joined11:55
cyber_heretic left11:56
lucasta joined11:56
indy_ left11:58
himint left11:59
austin987 left12:02
indy joined12:02
cousteau I have the impression that this config param is specified the wrong way around; it should be `url.<oldbase>.replaceWith = <newbase>`, not `url.<newbase>.insteadOf = <oldbase>`12:04
Deknos left12:04
cousteau ...guess I'll nag the people at #git-devel or the mailing list12:05
indy left12:06
indy joined12:07
peirik joined12:10
maret left12:12
Seng left12:13
bambanxx joined12:13
indy left12:14
fuzzybear396515 joined12:14
fuzzybear396515 Where can I post git graphs?12:14
I have a question about how a particular branching history came-to-be.12:15
Git forensics...12:15
https://pastebin.com/qCUZ9gF012:15
The diffs on origin/staging and staging commits are identical for all commits whose messages are in common.12:16
My CTO force-pushed to origin/staging and when I fetched later I see this weird history.12:16
What did he do?12:16
osse Maybe you're around :pray?12:16
osse of course i am12:16
fuzzybear396515 :')12:16
osse the CTO rebased the staging branch and then force pushed12:17
fuzzybear396515 Rebased the staging branch on `main`?12:17
cousteau I recall there was a graph pasting tool12:17
osse can't tell from this12:17
he rewrote it one way or another12:17
fuzzybear396515 cousteau I was hoping there was one.12:17
osse I've diffed the first descendant of main on both branches and they're identical.12:17
Shouldn't they have the same commit SHA?12:17
osse fuzzybear396515: git diff fee88fa 2504701 ?12:18
fuzzybear396515: the commit sha1 is still affected by the timestamp, author and message.12:19
fuzzybear396515 That commit's ambiguous. 1s.12:19
osse maybe he fixed a typo or something12:19
fuzzybear396515 Oh, I was in the wrong repo when I ran that diff. :facepalm:12:20
osse Yeah, I diffed those. There's no difference.12:20
osse fuzzybear396515: then compare git log -1 --pretty=fuller fee88fa and 250470112:20
fuzzybear396515 Maybe author changed?12:20
cousteau Found it, the Graph Generator Thingy! https://gitirc.eu/g/12:21
example: https://gitirc.eu/g/Rb.png12:21
you paste input like `A -> B -> C; B -> D` and it will generate the corresponding graph12:21
...not sure if that's what you wanted12:22
fuzzybear396515 osse Okay, the Committer and the CommitDate changed.12:22
indy joined12:22
fuzzybear396515 The "rebased" branch (origin/staging) has an updated timestamp12:22
osse that's the only difference?? sounds like he rebased for no good reason then12:22
fuzzybear396515 Also, the email address is a github email address on the origin/staging branch. Probably pushed a button in GitHub.12:23
osse maybe there is a meaningful change in one of the later commits and the whole branch was rewritten for some reason12:23
can try the same exercise with the tip of the branches12:23
fuzzybear396515 There's only one commit diffference between the two branches and it's on the tip of origin/staging.12:24
osse well... the tip of staging and the second newest on origin/staging12:24
fuzzybear396515 Right.12:24
The git diff for all of those commits is empty.12:24
cousteau osse: maybe he rebased, realized that was the wrong thing to do, and re-rebased back12:24
osse cousteau: heh, could be. but why would he push then :p12:24
fuzzybear396515 I'm trying to figure out what he did because it's messing up the PRs that are based on staging and he's refusing to acknowledge that it's s strange.12:24
cousteau maybe he had already pushed it?12:25
fuzzybear396515 What did he _do_ though?12:25
We had a staging branch, it was ahead of main (that's clear from the graph).12:25
osse is it out of the question to ask him?12:25
maybe he intentionally changed the emails and that was that12:25
fuzzybear396515 It's not out of the question. I asked him. I told him "You shouldn't need to force push to staging when we merge staging into main, since staging is on top of main, already".12:26
He said "yep if I rebase with main".12:26
Then I said "Why is staging not on top of main, already?" then he said "because of the merge".12:27
indy left12:27
osse from this graph alone it's impossible to tell what he did. we only see the effects of what he did.12:28
and to me it looks like a pointless rebase12:28
fuzzybear396515 osse Okay.12:28
froyo left12:28
froyo joined12:29
osse normally git just does nothing when there's nothing to do in these situations though12:29
peirik left12:29
fuzzybear396515 Right?12:29
cousteau does diff -u <(git cat-file -s 2504701) <(git cat-file -s fee88fa) only change the committer line?12:30
lucasta left12:30
vertreko joined12:30
fuzzybear396515 cousteau I'm not sure what this command should tell me. I ran it and I got12:31
$ diff -u <(git cat-file -s 2504701) <(git cat-file -s fee88fa)12:31
--- /proc/self/fd/11 2022-08-25 13:30:29.394850450 +010012:31
+++ /proc/self/fd/12 2022-08-25 13:30:29.395850443 +010012:31
@@ -1 +1 @@12:31
-30012:31
+27112:31
lucasta joined12:32
maret joined12:33
feriman left12:33
cousteau oops, -p not -s12:33
maret left12:33
cousteau diff -u <(git cat-file -p 2504701) <(git cat-file -p fee88fa)12:34
indy joined12:34
osse or he could have done an interactive rebase, made a changed, regretted it and rebased back, like cousteau said, instead of reset --hard or whatever12:35
but doesn't sound like that based on your conversation12:35
cousteau maybe he did an interactive rebase, realized it didn't work, tinkered until it worked, and force-pushed the thing, not realizing that what he had at the end was what he started with12:36
maybe you could simply merge the two alternative timelines, for greater history confusion :P12:37
osse cousteau: As for the url stuff. I've no effing clue. I too think the way that config thing works is unnatural and the reverse would be more intuitive12:38
cousteau or force-push your branch! Start a force-push war!12:38
osse ♫ ♪ At the gay bar, gay bar ! ♪12:39
feriman joined12:39
cousteau osse: the mailing list suggests it went like "yeah, the opposite feels more natural, but we've already implemented it this way, so who cares?"12:39
osse Makes sense12:39
peirik joined12:39
cousteau but in this case... I've found an actual reason NOT to do it this way, but the other way. This way is intrinsically buggy. If nobody realized that, it deserves being discussed on the mailing list.12:39
osse Go for it12:40
cousteau osse: unless you can tell me a way to make https://site0.com/ be used insteadOf both https://site1.com/ and https://site2.com/12:40
indy left12:40
cousteau in which case it's not really a bug12:40
otisolsen70 left12:41
cousteau should I start a new thread, or somehow reply/append to that thread?12:41
osse Two config entries with the same value, noe?12:41
bloody joined12:42
osse Nvm, wrong way around haha12:43
One config entry with two values for it I think should work12:44
fuzzybear396515 cousteau Yeah, the only changes were committer and timestamp. I ran the cat-file -p .12:45
cousteau I would love to force-push my branch. Unfortunately, I don't have force push to `staging` privileges.12:46
osse fuzzybear396515: On second thought, did you rebase your local staging onto main at some point during all of this?12:47
cristiioan joined12:48
fuzzybear396515 osse No, I don't think so.12:48
Actually, wait.12:49
I do `git pull` and my `pull` config is --rebase.12:49
So, implicitly, yeah. I think so.12:49
But, our branches have the same base.12:49
RiFo left12:49
fuzzybear396515 And, his force-push to `staging` forced the divergence.12:49
So, it wasn't my history diverging from the remote's because of local operations.12:50
osse Is the authordate and committerdate identical on your side?12:50
fuzzybear396515 osse AuthorDate yes. CommitterDate no.12:50
The CommitterDate of origin/staging corresponds to his force-push.12:50
What are you thinking?12:51
osse fuzzybear396515: No I mean is the authordate the same as the committerdate on your side?12:51
fuzzybear396515 Oh, no. They aren't.12:52
The CommiterDate corresponds to when he merged my PR in.12:52
The AuthorDate corresponds to when I committed the changes locally.12:52
bn_work joined12:53
osse To be clear, on your local staging, right.12:53
?12:53
fuzzybear396515 On my local staging, right.12:53
osse Then I think I give up12:53
fuzzybear396515 Hahaha12:53
RiFo joined12:54
derpydoo joined12:55
osse fuzzybear396515: ask him to send you the output of 'git reflog staging' and 'git reflog origin/staging'12:58
kek12:58
fuzzybear396515 osse I just told him to ping me the next time he feels the need to rewrite the history of staging (force push).12:59
It's a consistent thing so I'm sure we'll have an opportunity to figure out what's going on soon.13:00
nate4 joined13:11
nate4 left13:15
peirik left13:15
maret joined13:16
absence joined13:17
absence i'm in an interactive rebase, edited a commit, did "git rebase --continue", and got a conflict. it then seems like a merge tool managed to screw up the files, so i want to get back to the point before i did "git rebase --continue" so i can try again. is that possible?13:19
heftig absence: I think you need to restart the rebase. but remember the ID of your commit post-edit, you can just reset to that one instead of re-amending13:22
I mean, assuming you'd rather continue working on the already-edited commit13:23
dsrt^ joined13:24
Xenguy left13:26
indy joined13:27
tyson2 joined13:30
indy left13:31
causasui joined13:32
dsrt^ left13:38
absence heftig: yes... so git rebase --abort, git rebase -i and select the same commit to edit, then what? git reset --hard id-of-edited-commit?13:39
heftig yeah13:40
OnkelTem joined13:40
Freeaqingme joined13:42
thomas25 joined13:44
Betal joined13:45
FH_thecat joined13:45
FH_thecat left13:48
hamburgler joined13:49
maret left13:51
mncheck joined13:52
gh34 joined13:53
maret joined13:54
arash joined14:02
absence heftig: worked, thanks!14:02
Frogging101 joined14:07
maret left14:10
vlado when you develop a bigger feature and you maybe need to work on other branches, how do you do that?14:10
stash everything, then switch14:10
or making temp commits and rebase/squash them?14:10
heftig add another worktree? (`git worktree`)14:12
but yeah, usually making temp commits14:12
thiago no need to stash14:12
just commit your work before switching branches14:12
maret joined14:12
wgrant left14:15
sudoforge joined14:21
gast0n joined14:21
Kartagis-Kartagis14:21
mthall joined14:25
wgrant joined14:29
Freeaqingme_ joined14:29
Freeaqingme left14:31
lucasta left14:31
skapata left14:40
rama joined14:41
mthall left14:45
mthall joined14:46
Thanzex joined14:47
wgrant left14:47
Guest29 joined14:48
ChemicalRascal_ joined14:48
feriman left14:49
ChemicalRascal left14:51
amcsi joined14:53
amcsi hey, how can I list all stashes involving a certain file?14:53
zebrag joined14:55
jazzy joined14:55
vanessa joined14:57
dsrt^ joined14:57
tirnanog joined14:58
tyson2 left14:58
wgrant joined15:00
LuxuryMode joined15:01
OnkelTem left15:05
gxt_ left15:07
adanwan left15:07
adanwan joined15:07
gxt_ joined15:07
[twisti] joined15:09
TheCatBehemoth joined15:09
dsrt^ left15:10
rfuentess and suddenly I grasp that "reflog" means "reference logs" instead of being a wordplay for bowl movement noises15:10
my spanish mind played dirty with the "reflog" phonetic15:10
[twisti] im not sure this question belongs here, please let me know if you think the problem cant be solved in the git aspect. i am using composer for php to check out a dependency from a private gitlab instance. i specify the location like ssh://git@our-ip:someport/foo/bar/project.git. i try to check it out, and i get `Permission denied (publickey).`. i cannot do git or ssh -v for more information, because the concrete call is being abstracted away by composer.15:12
i suspect the incorrect user name is used, since there seems to be no way to supply it. is there a way to supply the user used for ssh auth via environment variable maybe ?15:12
vertreko left15:13
Koeniz left15:14
RiFo left15:18
maret left15:19
thiago can you use git or ssh directly and make it work?15:23
is there a git clone command that works?15:23
vitali64 joined15:27
causasui left15:29
Koeniz joined15:30
Guest29 left15:32
indy joined15:33
malteger left15:35
fuzzybear396515 left15:37
coot left15:38
EvilDMP joined15:41
froyo7 joined15:43
ZacSharp joined15:43
rostero joined15:43
froyo left15:45
froyo7froyo15:45
vlado why does, in git docs, every reference is written like this: git-stash, git-workspace etc. and not just git stash15:46
is there a reason for it?15:46
it's a stupid question but yea15:47
bambanxx left15:49
dsrt^ joined15:49
atrigent left15:50
mackerman Many git sub commands were implemented as seperate scripts following that naming convention15:52
dhrv joined15:53
mackerman Today the core git commands are part of the git binary, although you will still see, probalby in some libexec dir, git-stash as a symlink back to the git binary.15:53
bremner it also avoids awkward quoting15:53
mackerman man page documentation is smart enough to resolve "man git stash" to git-stash.115:54
gitinfo the git-stash manpage is available at https://gitirc.eu/git-stash.html15:54
amcsi left15:54
peirik joined15:57
nedbat vlado: also, if you have an executable thing called git-xyzzy on your path, then "git xyzzy" will run it.15:57
dhrv maybe not the right channel, but is there a way to count the loc updated between given two commits?15:58
ChmEarl joined15:59
nedbat dhrv: git diff --stat c1..c2 # or --numstat16:00
justinf210 joined16:00
dhrv thanks!16:00
gryffus left16:01
peirik left16:02
justinf210 left16:08
tyson2 joined16:11
malteger joined16:11
justinf210 joined16:11
dsrt^ left16:13
ramblebamble joined16:14
_vanessa_ joined16:14
rfuentess left16:17
vanessa left16:17
jamiejackson joined16:18
stutz joined16:18
stutz left16:18
stutz joined16:18
malteger left16:18
gryffus joined16:19
malteger joined16:20
EvilDMP left16:22
rgrinberg joined16:27
tulpa_ joined16:27
ramblebamble left16:28
srinidhi left16:34
justinf210 left16:34
madewokherd joined16:35
zebrag left16:36
zebrag joined16:36
_vanessa_vanessa16:37
maret joined16:41
feriman joined16:46
vlado left16:47
theobjectivedad left16:47
srinidhi joined16:47
theobjectivedad joined16:47
theobjectivedad left16:47
theobjectivedad joined16:47
rgrinberg left16:48
loulou joined16:50
loulou left16:50
loulou joined16:50
human_g33k hello there is a way to "merge" 2 distinct repository in same directory ?16:52
let says repo 1 with code source and repo 2 with ci-config-file16:53
feriman left16:53
human_g33k and i want insert ci-config-file in the root of the repo 116:53
dionysus69 left16:54
human_g33k i asking myself if there is something like submodule16:54
howdoi joined16:54
human_g33k that can feet that need16:54
cousteau you mean merge two completely different repo histories into one?16:54
human_g33k yes but only temporary16:55
i want to trigger building from repo 2 recipe repo 1 when a new change occur16:56
not sure i m clear16:56
maret left16:56
human_g33k (at the end i know i can do it with bash script)16:56
cousteau not quite... maybe you just want to copy the one file from one repo to the other?16:56
human_g33k ^^ i know but i m not a git expert so i asking myself if there is an inside way16:57
cousteau in any case I'm not very good at merging and splitting and Frankensteining repos, but I know it can be done16:57
human_g33k it's more to not touch the upstream repo16:58
i currently want to automate some build for quite ≠ language and software16:59
thx btw i will go to the bash way17:00
maret joined17:03
TheCatBehemoth left17:03
atrigent joined17:07
nate4 joined17:12
OnkelTem joined17:17
nate4 left17:17
Murr left17:20
dionysus69 joined17:20
Murr joined17:20
tyson2 left17:24
rgrinberg joined17:24
feriman joined17:27
dhrv left17:41
Hi-Angel left17:44
thiago left17:49
thiago joined17:49
vanessa left17:54
cristiioan left17:55
vanessa joined17:55
igemnace left17:58
EvilDMP joined18:00
Guest92 joined18:00
LuxuryMode left18:01
cristiioan joined18:02
rostero left18:02
JordiGH joined18:02
JordiGH What's the difference between ort and recursive merges? The manpage for both is almost identical.18:03
Like, literally copy-pasted.18:03
nyah left18:04
EvilDMP left18:06
feriman left18:06
ZacSharp left18:06
feriman joined18:08
Guest92 left18:09
EvilDMP joined18:10
cousteau JordiGH: ort is the "Ostensively Recursive's Twin", so it would make sense that they are similar18:14
but mow I'm curious too18:15
EvilDMP_ joined18:16
JordiGH afaict, the only difference is that ort takes more options.18:16
It's also supposed to be a dumb pun.18:16
git merge -s ort18:16
EvilDMP left18:16
JordiGH Git coming up with stupid names on its UI as usual.18:17
cousteau well, for one fact, the definition of "recursive" removes some instances of the word "strategy" >:(18:17
I think that ort is newer so it must be better / more sophisticated18:18
EvilDMP joined18:19
Noisytoot left18:20
EvilDMP_ left18:20
cousteau ok I can confirm that the definitions are identical except for a few missing words "strategy", etymology and history, and the extra options18:20
it is possible that ort is simply recursive with some different defaults18:21
> Note that ort specifically uses diff-algorithm=histogram, while recursive defaults to the diff.algorithm config setting.18:22
JordiGH Yeah, I diffed the two paragraphs too.18:23
EvilDMP left18:23
JordiGH idgi, if the point was to change the default... why not just change it?18:24
Because ort is now the default.18:24
gast0n left18:24
JordiGH I guess maybe just as a concession to people who specifically had called out recursive in their gitconfig?18:24
rsx joined18:25
Noisytoot joined18:26
cousteau https://github.blog/2021-08-16-highlights-from-git-2-33/#merge-ort-a-new-merge-strategy suggests ort is "written from scratch" and "much faster" and "more maintainable"18:26
"The real win is that merge-ort consistently performs at that fast speed while merge-recursive has high variance."18:27
Do we take github blog's word as valid, or do we keep searching other sources?18:27
EvilDMP joined18:28
cousteau https://lore.kernel.org/git/4a0f088f3669a95c7f75e885d06c0a3bdaf31f42.1628055482.git.gitgitgadget@gmail.com/ claims that ort was more successful in some tests than recursive (recursive failed in some cases where ort succeeded, but not the other way around)18:30
although the documentation may lead to think that ort is functionally equivalent to recursive with some defaults changed18:30
tyson2 joined18:31
Lord_of_Life left18:34
rsx left18:34
cousteau JordiGH: maybe because ort removed some options?18:35
Lord_of_Life joined18:35
cousteau then again... "ort with option X which isn't supported by ort is implemented by calling recursive with that option instead of ort", bam, solved18:36
JordiGH Seems... weird.18:37
Just change the implementation, do the other algorithm in the background if an unsupporetd option is given.18:37
ah well, c'est la guitte18:37
cousteau yeah that's what I meant18:37
JordiGH I mean, no need to expose anything different to the user.18:37
cousteau call them recursive and ors?18:38
old recursive strategy18:38
JordiGH git merge --the-unsupported-ort-option=lolomgwtf # Ah, we'll use the old algorithm, nbd.18:38
coot joined18:38
JordiGH No need to copy-paste a paragraph and most of the options and give it a whole new name.18:38
But there's no point arguing about git UI.18:39
cousteau am I gonna need to look up nbd now?18:39
JordiGH "no big deal"18:39
cousteau ah thanks18:39
was trying to figure it out18:39
cristiioan left18:41
Rashad joined18:42
cristiioan joined18:42
mbalmer left18:43
bambanxx joined18:46
rgrinberg left18:48
tyson2 left18:48
Hi-Angel joined18:50
indy left18:53
tyson2 joined18:57
indy joined18:57
maret left18:57
gxt_ left19:03
gxt_ joined19:05
Rashad left19:05
darkstardev13 joined19:05
Nei_ joined19:05
tykling_ joined19:05
tchan1 joined19:05
hernan_ joined19:05
escherial joined19:05
tykling left19:05
rhe joined19:05
phylaz joined19:06
Dreadnaught joined19:06
Jck_true joined19:06
Koeniz left19:06
tchan1 left19:06
Nei_Nei19:06
tchan1 joined19:06
Koeniz joined19:06
tchan1tchan19:07
Kulrak left19:07
cristiioan left19:08
Dreadnaught left19:10
Dreadnaught joined19:10
Betal left19:11
cristiioan joined19:13
tyson2 left19:13
EvilDMP left19:14
vitali64 left19:14
bloody_ joined19:16
cristiioan left19:17
bloody left19:19
ulmanak left19:19
cristiioan joined19:23
cristiioan_ joined19:26
Betal joined19:26
cristiioan left19:28
cristiioan_cristiioan19:28
bambanxx left19:28
cristiioan left19:31
cristiioan joined19:31
OnkelTem left19:32
coot left19:34
nyah joined19:35
theoceaniscool left19:36
coot joined19:37
myme1 left19:40
coot left19:43
EvilDMP joined19:45
cristiioan left19:48
EvilDMP left19:49
cambrian_invader left19:51
enkeyz left19:53
EvilDMP joined19:54
enkeyz joined19:55
bambanxx joined19:56
enkeyz left19:56
EvilDMP_ joined20:02
EvilDMP left20:03
Telgareith0 joined20:07
TonyStone left20:07
Telgareith left20:08
Telgareith0Telgareith20:08
theoceaniscool joined20:12
EvilDMP_ left20:15
carl-- left20:18
tyson2 joined20:20
Sasazuka joined20:25
The_Blode left20:25
EvilDMP joined20:27
ferdna joined20:28
bn_work left20:32
srinidhi left20:32
bambanxx left20:34
EvilDMP_ joined20:35
EvilDMP left20:36
Hi-Angel left20:36
Guest92 joined20:37
Hi-Angel joined20:38
bambanxx joined20:38
TonyStone joined20:39
jamiejackson left20:45
stewie925 joined20:46
Coop left20:47
bambanxx left20:47
lucasta joined20:47
Guest92 left20:47
bambanxx joined20:50
JordiGH Oh, you can just write git merge -sort.20:52
lol?20:52
EvilDMP joined20:53
skapata joined20:53
skapata left20:53
skapata joined20:53
peirik joined20:53
bridgefan joined20:56
EvilDMP_ left20:56
ZacSharp joined21:03
bridgefan left21:05
cambrian_invader joined21:08
Rashad joined21:10
kevr left21:13
cousteau yeah, short options do that21:13
nate4 joined21:14
kevr joined21:14
cousteau well, depending on the program21:14
-<letter> <argument> can also be written -<letter><argument> for options with an argument21:15
bambanxx left21:17
peirik left21:17
nate4 left21:18
peirik joined21:19
cambrian_invader left21:22
cousteau same as how you can write `gcc ... -lm` as `-l m` or `-I.` as `-I .` or `-DMACRO` as `-D MACRO`21:22
TheChillenial joined21:23
TheCatBehemoth joined21:24
cambrian_invader joined21:26
derpydoo left21:29
EvilDMP left21:30
bambanxx joined21:38
Coop joined21:40
peirik left21:44
zeenk left21:44
loulou left21:49
gustik joined21:51
Sasazuka left21:52
bambanxx left21:53
Anarchic joined21:54
Anarchic left21:54
Anarchic joined21:55
gh34 left21:58
justinf210 joined21:58
jinsun left22:02
jinsun joined22:04
peirik joined22:05
Sasazuka joined22:06
justinf210 left22:07
TheChillenial left22:07
Xenguy joined22:08
peirik left22:09
adanwan_ joined22:11
adanwan left22:11
tyson2 left22:14
justinf210 joined22:14
ash_worksi joined22:14
Colere left22:15
ash_worksi how do I add parts of changes to a commit again? I thougth it was `git add -i` but that doesn't look right22:15
cousteau git add -p? or --patch22:15
ash_worksi oh is it "patch"22:15
weird22:15
cousteau yep :)22:15
because it is formatted like a patch22:16
ash_worksi I for some reason thought that would do something else22:16
yeah22:16
cousteau I guess22:16
Colere joined22:16
cousteau I think I always use --patch instead of -p because -p is a bit meaningless22:16
justinf210 left22:20
ash_worksi okay, something has confused me. I was in --patch mode and on a very specific file whose changes I specifically wanted to divy up into separate commits, all the changes were presented as 1 hunk22:21
the changes are actually interspliced; like if there are 4 changes, and 2 are for commit A and 2 for commit B, the would appear in order in the file as: A B A B22:21
kevr_ joined22:22
Lunatrius` joined22:22
thekingofbandit left22:23
feriman left22:23
neightchan joined22:23
cousteau you will probably need to manually edit the hunk22:23
kevr left22:24
kevr_kevr22:24
thekingofbandit joined22:24
cdleonard9 joined22:24
omnigoat5 joined22:24
brw6 joined22:24
Cienisty joined22:24
realies2 joined22:24
Rashad left22:25
Visne_ joined22:25
cousteau OR, or, you can create a backup of the file, edit the file so that it undoes the B changes and only preserves the A changes, git add that (with or without -p), and then restore the file22:25
matt0x6f_ joined22:25
fossdd_ joined22:25
cousteau might be easier than fighting with artificial diffs22:25
ash_worksi makes sense22:25
rishi`` joined22:25
cespare_ joined22:25
ludovicchabant_ joined22:25
shush_ joined22:25
bertiger_ joined22:25
tcurdt joined22:25
lcn_ joined22:25
wyre_ joined22:25
DvdKhl joined22:25
hashwork- joined22:25
moviuro_ joined22:25
ash_worksi why wouldn't it present these as separate hunks from the start though?22:25
ProperN[out] joined22:25
t0mm13b_ joined22:25
Trieste_ joined22:25
Celeo_ joined22:26
qwd- joined22:26
canton7 left22:26
vicky__ joined22:26
h4x0riz3d joined22:26
jakesyl____ joined22:26
Manouchehri_ joined22:26
Wolf481pl joined22:26
cousteau ash_worksi: what do you mean?22:26
cluelessperson_ joined22:26
CelestiaIsTheWay joined22:26
cousteau two consecutive lines of code, or too close together, are going to be identified as a single hunk22:27
Gamah_ joined22:27
tulpa__ joined22:27
cousteau if they are separated, you can split them with ...I think it was '/'22:27
gryffus_ joined22:27
kapil_ joined22:27
cousteau maybe you can separate the hunk down to a line level using split multiple times22:27
ash_worksi '/' ?22:27
haasn` joined22:27
bleb_ joined22:27
eqw_ joined22:27
Walex joined22:27
jjakob_ joined22:28
teear_ joined22:28
kandinsk1 joined22:28
nyah_ joined22:28
BlessJah_ joined22:28
oj_ joined22:28
glider_ joined22:28
madduck_ joined22:28
mjt0k_ joined22:28
pretty_d1 joined22:28
Fischmiep joined22:28
Betal_ joined22:28
cousteau ah no, 's' for split22:28
ash_worksi I mean, if I were to label lines as ABX with X being lines that havent changed its like: XXXX A XXXXX B XXXXX A XXX B XXXX22:28
cousteau '/' to search22:28
YellowSu1 joined22:28
YellowSuB left22:28
YellowSu1YellowSuB22:28
OnkelTem joined22:28
ash_worksi oh22:28
I see22:28
cousteau ash_worksi: ah, yeah those should be separate hunks22:29
cbreak if splitting doesn't work, you can manually edit these things too22:29
Quack joined22:29
cousteau or if there aren't enough X between them, 's' will take care of that22:29
cbreak but that's quite unintuitive22:29
cousteau yeah, manually editing the hunk as a diff is feasible, but rather hard22:29
ash_worksi splitting seems to be working... I just don't know why it presented me with a single hunk22:29
cousteau maybe they were too close together22:30
ash_worksi ¯\_(ツ)_/¯22:30
thanks though22:30
cousteau if it would've been shown as a single hunk in a diff, it'll be shown as a single hunk in git add -p22:30
Peng__ joined22:30
x88x88x joined22:31
madprops_ joined22:31
jab416171 joined22:31
OnlineCop When I do `git checkout <commit-ish> -- path`, it adds the files to the (index? staging area? I forget the correct term). I can then `git reset .` to un-add them. Is there a command that would do it at the same time?22:32
nyah left22:33
Betal left22:33
tulpa_ left22:33
gryffus left22:33
pretty_dumm_guy left22:33
mw_ left22:33
jjakob left22:33
BlessJah left22:33
Visne left22:33
splud left22:33
elastic_dog left22:33
hashworks left22:33
vicky_ left22:33
moviuro left22:33
avu left22:33
Raito_Bezarius left22:33
madprops left22:33
omnigoat5omnigoat22:33
Trieste_Trieste22:33
ludovicchabant_ludovicchabant22:33
shush_shush22:33
fossdd_fossdd22:33
bleb_bleb22:33
brw6brw22:33
realies2realies22:33
Visne_Visne22:33
DvdKhlArokh22:33
matt0x6f_matt0x6f22:33
cdleonard9cdleonard22:33
Lunatrius`Lunatrius22:33
vicky__vicky_22:33
cespare_cespare22:33
haasn`haasn22:33
lcn_lcn22:33
madduck_madduck22:33
Manouchehri_Manouchehri22:33
elastic_dog joined22:33
skapata left22:33
TheCatBehemoth left22:33
ash_worksi OnlineCop: git restore ?22:34
perhaps22:34
(idk, don't really listen to me)22:34
madprops_madprops22:35
madprops left22:35
madprops joined22:35
cousteau OnlineCop: I thought git checkout -- <files> simply added them to the tree22:36
the tree is the filesystem on disk22:36
OnlineCop Possibly. I haven't used `git restore`, and so I may be using checking in the wrong way.22:37
cousteau I thought git checkout <files> only did that, but didn't touch the head nor the index22:37
head = the current commit, index = the staging area, the added files, when you do git checkout the index will become the new commit and the head will point to it22:37
Raito_Bezarius joined22:39
avu joined22:39
mw_ joined22:39
OnlineCop Looks like `git restore --source=tree <files>` might be what I should have been doing instead.22:39
splud joined22:40
rama left22:40
rama joined22:40
lolok left22:41
kadoban1 joined22:42
jinsun left22:42
ike[m] joined22:44
gitinfo joined22:45
ChanServ set mode: +o22:45
jjakob_jjakob22:55
pretty_d1 left22:55
Hayro joined22:55
nyah_nyah22:58
user24037 joined23:00
user24037 left23:00
user24037 joined23:00
Hi-Angel left23:01
jinsun joined23:02
Hayro left23:03
pulse left23:04
Misotauros left23:04
canton7 joined23:07
cart_ left23:10
kenanmarasli left23:12
nyah left23:15
Xenguy left23:17
luffy joined23:17
locness3 joined23:17
lucasta left23:19
tulpa__ left23:20
Misotauros joined23:24
rgrinberg joined23:27
dsrt^ joined23:31
bingos joined23:32
arescorpio joined23:32
OnkelTem left23:35
irc_user joined23:40
phogg left23:47
phogg joined23:49
bambanxx joined23:49
phogg left23:50
phogg joined23:50
stewie925 left23:55
adanwan_ left23:57
adanwan joined23:58

Logs Search ←Prev date Next date→ Channels Documentation