| 2020-09-12 |
| → mat001 joined | 00:00 |
| ← mat001_ left | 00:03 |
| ← INeedAHandle left | 00:05 |
| ← dionysus69 left | 00:07 |
| → arcatech joined | 00:08 |
| ← Lucas_Gray left | 00:08 |
| ← maxwilliamson left | 00:08 |
| ← jimklimov left | 00:08 |
| → maxwilliamson joined | 00:08 |
| ← qqx left | 00:09 |
|
puff
| Is there a way I can grep one particular file in all of the commits? Ideally one *part* of a particular file, but I can't iamgine any way to do that that makes sense, short of a language parser. | 00:09 |
| ← mi12078 left | 00:10 |
| → qqx joined | 00:11 |
| ← goldmund left | 00:12 |
| → mi12078 joined | 00:13 |
| ← tiin57 left | 00:15 |
| → RoboFlex12 joined | 00:16 |
| → mat001_ joined | 00:18 |
| → tiin57 joined | 00:19 |
| → SwiftMatt joined | 00:21 |
| ← mat001 left | 00:21 |
|
Hello71
| man git-grep | 00:21 |
|
gitinfo
| the git-grep manpage is available at https://gitirc.eu/git-grep.html | 00:21 |
|
Hello71
| but probably this is !xy and you actually want git blame or git log -S/-G or somesuch | 00:22 |
|
gitinfo
| You are asking about a solution, but we can help you a lot better if you could describe the actual problem you are trying to solve. | 00:22 |
| → gordonfish joined | 00:27 |
| → R2robot joined | 00:29 |
| qpdb → Guest32554 | 00:38 |
| ← Guest32554 left | 00:38 |
| → qpdb joined | 00:38 |
| ← mjh4386 left | 00:43 |
| ← tiin57 left | 00:45 |
| ← leeN left | 00:45 |
| → mat001 joined | 00:47 |
| → tiin57 joined | 00:48 |
| ← mat001_ left | 00:49 |
| ← RaceCondition left | 00:58 |
| ← SwiftMatt left | 00:58 |
| → goldmund joined | 01:01 |
| → gschanuel joined | 01:02 |
| → mat001_ joined | 01:02 |
| ← shicks2525 left | 01:02 |
| ← goldmund left | 01:03 |
| ← qpdb left | 01:04 |
| → shicks2525 joined | 01:05 |
| ← mat001 left | 01:05 |
| → mud joined | 01:15 |
| ← tiin57 left | 01:15 |
| → tiin57 joined | 01:18 |
| ← rafasc left | 01:20 |
| → mat001 joined | 01:25 |
| → stats4647 joined | 01:25 |
| ← mat001_ left | 01:27 |
| ← F0rTex left | 01:30 |
| → F0rTex joined | 01:32 |
| ← steven left | 01:33 |
| ← nvmd left | 01:34 |
| → sstutz joined | 01:35 |
| → dionysus69 joined | 01:39 |
| → mat001_ joined | 01:43 |
| ← apetresc left | 01:45 |
| ← tiin57 left | 01:45 |
| ← mat001 left | 01:47 |
|
stats4647
| Hi, could someone pls clarify what the following message means? TIA. I did a git pull followed by git log --oneline | 01:49 |
|
| e78fae (HEAD -> master, origin/master, origin/HEAD) chore: Merge branch 'master' of github.com:path/to/project into master | 01:49 |
| ← to1ne left | 01:49 |
| → tiin57 joined | 01:49 |
| → apetresc joined | 01:50 |
| ← dfee left | 01:54 |
| → akemhp_ joined | 01:56 |
| ← akemhp_ left | 01:56 |
| ← akemhp left | 01:58 |
| ← mat001_ left | 01:59 |
| → Xenguy joined | 02:04 |
|
stats4647
| However, when I do, git status, I get "Your branch is up to date with 'origin/master'." so why do I need to merge anything? | 02:04 |
|
Jookia
| stats4647: did you merge it? | 02:05 |
|
stats4647
| Jookia: not explicitly, I thought git pull does fetch and merge (two-in-one), but I could be wrong | 02:06 |
| ← Cabanossi left | 02:06 |
| ← Gurkenglas left | 02:07 |
|
Jookia
| stats4647: if you do 'git log' are you the comitter of the merge? | 02:07 |
|
stats4647
| Jookia: no, the author of the merge is someone else | 02:09 |
|
Jookia
| stats4647: so you've just pulled the latest commit and not merged anything | 02:09 |
| → Cabanoss- joined | 02:10 |
| → to1ne joined | 02:10 |
|
stats4647
| Jookia: thanks, does that mean I have two branches that need merging? And if so, then why do I get this message on git status | 02:11 |
|
| On branch master | 02:11 |
|
| Your branch is up to date with 'origin/master'. | 02:11 |
|
Jookia
| nothing needs merging, your branch is identical to origin/master | 02:11 |
| → mjh4386 joined | 02:12 |
|
stats4647
| Jookia: ok, but then what does this message mean ( from my original question ) | 02:12 |
|
| e78fae (HEAD -> master, origin/master, origin/HEAD) chore: Merge branch 'master' of github.com:path/to/project into master | 02:12 |
| ← mjh4386 left | 02:13 |
|
stats4647
| Jookia: ah, never mind, it's just a message the other merger put in? | 02:13 |
| → mjh4386 joined | 02:13 |
|
Jookia
| stats4647: that shows that your HEAD, your master branch, origin's master branch, and origin's HEAD are all at e78fae, which happens to be a merge commit someone did | 02:13 |
| ← tiin57 left | 02:15 |
|
stats4647
| Jookia: I see, thank you. To confirm, HEAD -> master just means the HEAD points to the last commit on master? | 02:18 |
| ← lagothrix left | 02:18 |
| → lagothrix joined | 02:18 |
| → tiin57 joined | 02:18 |
|
Jookia
| yes. master points to commit e78fae which is the 'last commit' | 02:19 |
| ← hexnewbie left | 02:20 |
|
stats4647
| thank you | 02:21 |
| → hexnewbie joined | 02:21 |
| → sunrunner20 joined | 02:23 |
| → anddam joined | 02:24 |
| ← mirrorbird left | 02:29 |
| ← sunrunner20 left | 02:35 |
| → sunrunner20 joined | 02:36 |
| ← arcatech left | 02:39 |
| ← Aki-lucky left | 02:45 |
| ← tiin57 left | 02:45 |
| ← sunrunner20 left | 02:46 |
| → sunrunner20 joined | 02:48 |
| ← apetresc left | 02:48 |
| ← davispuh left | 02:48 |
| ← dionysus69 left | 02:49 |
| → tiin57 joined | 02:49 |
| → sunrunner20_ joined | 02:51 |
| → apetresc joined | 02:52 |
| ← sunrunner20 left | 02:53 |
| sunrunner20_ → sunrunner20 | 02:53 |
| → mowcat joined | 02:56 |
| ← RoboFlex12 left | 03:03 |
| ← mowcat left | 03:04 |
| → Goplat joined | 03:06 |
| ← jwest left | 03:09 |
| ← tiin57 left | 03:15 |
| ← g00s left | 03:17 |
| → tiin57 joined | 03:18 |
| → dfee joined | 03:21 |
| → Muimi joined | 03:23 |
| → mirrorbird joined | 03:26 |
| ← duderono_ left | 03:32 |
| ← sudoforge left | 03:37 |
| ← tiin57 left | 03:45 |
| ← dfee left | 03:46 |
| ← justanotheruser left | 03:46 |
| → tiin57 joined | 03:49 |
| → ricks_ joined | 03:50 |
| → darkstardev13 joined | 03:52 |
| ← cd left | 03:52 |
| ← cbreak left | 03:53 |
| → cbreak joined | 03:54 |
| ← mjh4386 left | 04:04 |
| → holdsworth joined | 04:06 |
| → c0san0stra joined | 04:08 |
| ← darkstardev13 left | 04:10 |
| ← crose left | 04:12 |
| ← tiin57 left | 04:15 |
| → arcatech joined | 04:18 |
| → tiin57 joined | 04:19 |
| → fledgling joined | 04:26 |
| ← mindCrime_ left | 04:34 |
| ← govg left | 04:34 |
| → duderonomy joined | 04:35 |
| ← stats4647 left | 04:36 |
| → mindCrime_ joined | 04:37 |
| → stats4647 joined | 04:38 |
| → matelot joined | 04:39 |
| ← stats4647 left | 04:43 |
| ← tiin57 left | 04:45 |
| ← Cabanoss- left | 04:48 |
| ← arcatech left | 04:49 |
| → tiin57 joined | 04:49 |
| → heyitsrama joined | 04:49 |
| ← gschanuel left | 04:50 |
| → gschanuel joined | 04:51 |
| → Cabanossi joined | 04:55 |
| → stats4647 joined | 04:56 |
| → dfee joined | 04:57 |
| ← gschanuel left | 04:59 |
| → gschanuel joined | 05:00 |
| ← gschanuel left | 05:00 |
| → gschanuel joined | 05:00 |
| → natechan joined | 05:01 |
| ← gschanuel left | 05:01 |
| ← gast0n left | 05:02 |
| ← bket left | 05:06 |
| ← YuGiOhJCJ left | 05:06 |
| → g00s joined | 05:07 |
| ← heyitsrama left | 05:07 |
| ← ricks_ left | 05:09 |
| → RoriconKnight joined | 05:09 |
| ← astronavt left | 05:12 |
| → bket joined | 05:13 |
| ← cbreak left | 05:15 |
| ← tiin57 left | 05:15 |
| → cbreak joined | 05:15 |
| → tiin57 joined | 05:18 |
| ← stats4647 left | 05:23 |
| → ricks_ joined | 05:23 |
| ← ricks_ left | 05:33 |
| ← th_ left | 05:36 |
| → feriman joined | 05:41 |
| ← vicfred left | 05:42 |
| ← tiin57 left | 05:45 |
| ← raven-au left | 05:48 |
| → tiin57 joined | 05:49 |
| ← to1ne left | 05:52 |
| → tsujp joined | 06:01 |
| ← causasui left | 06:05 |
| → stats4647 joined | 06:05 |
| ← blahboybaz left | 06:05 |
| ← tiin57 left | 06:15 |
| → tiin57 joined | 06:18 |
| → raven-au joined | 06:19 |
| → ADG1089 joined | 06:21 |
| ← stats4647 left | 06:22 |
| ← Jookia left | 06:23 |
| → sudoforge joined | 06:25 |
| → Jookia joined | 06:25 |
| ← thiago left | 06:34 |
| ← FH_thecat left | 06:35 |
| → tarkus joined | 06:37 |
| ← fledgling left | 06:38 |
| → Ransu joined | 06:41 |
| ← ShapeShifter499 left | 06:43 |
| ← nabil_ left | 06:45 |
| → nabil_ joined | 06:45 |
| ← tiin57 left | 06:45 |
| → nabil__ joined | 06:47 |
| → tiin57 joined | 06:49 |
| ← nabil_ left | 06:50 |
| → ransu__ joined | 06:50 |
| ← Ransu left | 06:53 |
| ← unluckyshrubbery left | 07:02 |
| ← hussam left | 07:12 |
| ← feriman left | 07:15 |
| ← tiin57 left | 07:15 |
| ← irimi1 left | 07:17 |
| → tiin57 joined | 07:19 |
| → to1ne joined | 07:21 |
| ← pikapika left | 07:22 |
| → pikapika joined | 07:22 |
| ← clara97 left | 07:24 |
| ← eamanu left | 07:24 |
| ← irc_user left | 07:24 |
| ← timwis left | 07:24 |
| → eamanu joined | 07:24 |
| → nabil_ joined | 07:24 |
| ← n000g left | 07:24 |
| ← afisher left | 07:24 |
| ← jhill left | 07:24 |
| ← rustyshackleford left | 07:24 |
| ← ignapk left | 07:24 |
| ← nilsirl[m] left | 07:25 |
| ← KnownSyntax left | 07:25 |
| → ignapk joined | 07:25 |
| ← omnidapps left | 07:25 |
| ← dmlloyd left | 07:25 |
| → nilsirl[m] joined | 07:26 |
| ← Chaser left | 07:26 |
| ← carlesc left | 07:26 |
| → rustyshackleford joined | 07:26 |
| → clara97 joined | 07:26 |
| ← austin987 left | 07:27 |
| → jhill joined | 07:27 |
| ← nabil__ left | 07:27 |
| → afisher joined | 07:27 |
| → n000g joined | 07:27 |
| ← zalun left | 07:28 |
| → omnidapps joined | 07:28 |
| → KnownSyntax joined | 07:28 |
| → dmlloyd joined | 07:29 |
| ← felixsanz left | 07:30 |
| → gitter1234 joined | 07:30 |
| → DNS777 joined | 07:30 |
| → carlesc joined | 07:30 |
| → nabil__ joined | 07:30 |
| ← DNS left | 07:30 |
| → zalun joined | 07:31 |
| → Chaser joined | 07:31 |
| → Flynn1110 joined | 07:31 |
| ← nabil_ left | 07:33 |
| → felixsanz joined | 07:38 |
| ← sgn left | 07:38 |
| ← sm[m] left | 07:39 |
| ← nabil__ left | 07:40 |
| ← g00s left | 07:41 |
| → timwis joined | 07:41 |
| ← mindCrime_ left | 07:42 |
| → akemhp joined | 07:43 |
| ← tiin57 left | 07:45 |
| → tiin57 joined | 07:48 |
| → sm[m] joined | 07:49 |
| ← blaisebool left | 08:00 |
| ← Gustavo6046 left | 08:11 |
| ← Goplat left | 08:12 |
| ← yonder left | 08:14 |
| → mindCrime_ joined | 08:15 |
| ← tiin57 left | 08:15 |
| → govg joined | 08:18 |
| → stats4647 joined | 08:19 |
| → tiin57 joined | 08:19 |
| → mjh4386 joined | 08:20 |
| ← sphalerite left | 08:23 |
| ← stats4647 left | 08:24 |
| ← fingercomp left | 08:26 |
| ← mindCrime_ left | 08:26 |
| ← mjh4386 left | 08:26 |
| → calcul0n joined | 08:26 |
| → fingercomp joined | 08:27 |
| → unluckyshrubbery joined | 08:27 |
| → th_ joined | 08:28 |
| ← govg left | 08:28 |
| → sphalerite joined | 08:29 |
| → govg joined | 08:29 |
| → Shantara joined | 08:42 |
| ← tiin57 left | 08:45 |
| → Newami joined | 08:46 |
| → tiin57 joined | 08:49 |
| ← Newami left | 08:50 |
| ← ADG1089 left | 08:50 |
| ← sudoforge left | 08:53 |
| ← n000g left | 09:03 |
| → hussam joined | 09:04 |
| → n000g joined | 09:04 |
| → milkt_ joined | 09:08 |
| ← milkt left | 09:09 |
| → Guest20 joined | 09:10 |
| ← matelot left | 09:13 |
| → feriman joined | 09:14 |
| ← cbreak left | 09:15 |
| ← tiin57 left | 09:15 |
| → cbreak joined | 09:16 |
| → tiin57 joined | 09:18 |
| ← Betal left | 09:24 |
| ← jaziz left | 09:38 |
| → leeN joined | 09:43 |
| → vdamewood joined | 09:44 |
| → Borkr joined | 09:45 |
| ← tiin57 left | 09:45 |
| ← Guest20 left | 09:46 |
| → tiin57 joined | 09:49 |
| ← feriman left | 09:54 |
| → feriman joined | 10:00 |
| → Guest20 joined | 10:12 |
| ← tiin57 left | 10:15 |
| → royal_screwup21 joined | 10:15 |
| ← milkt_ left | 10:16 |
| → milkt joined | 10:16 |
| → benfelin joined | 10:17 |
| ← benfelin left | 10:17 |
| ← Flynn1110 left | 10:18 |
| → tiin57 joined | 10:19 |
| → RaceCondition joined | 10:27 |
| → Olipro joined | 10:30 |
| ← Shantara left | 10:32 |
| ← Guest20 left | 10:33 |
| ← palooka_jock left | 10:36 |
| → currybullen joined | 10:38 |
| ← Borkr left | 10:40 |
| ← royal_screwup21 left | 10:41 |
| → palooka-jock joined | 10:41 |
|
currybullen
| is there any shorter way of finding all files named .classpath in the index than something like "git ls-files .classpath '**/.classpath'"? | 10:41 |
| → royal_screwup21 joined | 10:41 |
|
osse
| Does this count? git ls-files {,'**/'}.classpath | 10:43 |
|
| It is a bit annoying that **/ doesn't look in the current dir | 10:44 |
| ← tiin57 left | 10:45 |
|
currybullen
| i can't understand why it doesn't do that. if i put **/.classpath in my .gitignore it will also ignore .classpath in the root directory | 10:47 |
| ← Hello71 left | 10:47 |
|
currybullen
| but searching for .classpath files using my above git ls-files command it will ignore a .classpath file in the root dir | 10:48 |
| → tiin57 joined | 10:49 |
|
osse
| it also goes against the meaning of **/ in bash and zsh | 10:49 |
| → Hello71 joined | 10:49 |
|
currybullen
| yes, the expansion of **/.classpath in bash will include .classpath in the root dir | 10:51 |
|
osse
| honestly I'm often a bad bad boy and do g ls-files | grep classp | 10:53 |
|
| unless I am scripting | 10:53 |
| → stats4647 joined | 10:59 |
| ← stats4647 left | 11:03 |
| ← tiin57 left | 11:15 |
|
Jackneill
| hey. anyone encountered a problem where to a private repo you can successfully push to gitlab but not github? (insteadOf ssh url set, priv key's pub key added to github, etc..) | 11:15 |
| ← feriman left | 11:15 |
|
Jackneill
| any idea? (github chan does not help) | 11:15 |
| → tiin57 joined | 11:18 |
| ← gitter1234 left | 11:19 |
| → DarwinSurvivor joined | 11:29 |
| ← DarwinSurvivor left | 11:30 |
| ← tiin57 left | 11:45 |
| → tiin57 joined | 11:49 |
| → bruce_lee joined | 11:51 |
| → gitter1234 joined | 11:54 |
| ← royal_screwup21 left | 11:55 |
| → royal_screwup21 joined | 11:56 |
| → bolovanos_ joined | 11:58 |
| ← royal_screwup21 left | 12:00 |
| ← to1ne left | 12:09 |
| → sgn joined | 12:09 |
| ← cdown left | 12:12 |
| → cdown joined | 12:13 |
| ← tiin57 left | 12:15 |
|
j416
| Jackneill: more details would help | 12:18 |
| → tiin57 joined | 12:18 |
|
Jackneill
| j416, i have the same pub key set for both gitlab and github personal account. when the origin url is git@gitlab:... it works, when its git@github:... it does not. | 12:19 |
|
osse
| Jackneill: faulty .ssh/config ? | 12:20 |
|
Jackneill
| in the github chan i only got that it does not find the ssh key, but it does because gitlab works | 12:20 |
| → royal_screwup21 joined | 12:22 |
|
Jackneill
| osse, i have set the insteadOf https://github.com use [email@hidden.address] and also the sshCommand to use the locally provided .ssh folder with the keypair | 12:22 |
|
| does .ssh/config play a role in this case too? | 12:23 |
| → to1ne joined | 12:23 |
|
ikke
| url insteadOf only works for http(s) ifaik | 12:23 |
|
| afaik* | 12:24 |
| → theoceaniscool joined | 12:25 |
| ← bolovanos_ left | 12:25 |
| → kdlv joined | 12:26 |
| ← ransu__ left | 12:41 |
|
geirha
| currybullen: a bit late to the party, but git ls-files -- ':(glob)**/.classpath' | 12:43 |
| ← tiin57 left | 12:45 |
|
osse
| whyyyyy | 12:47 |
| → tiin57 joined | 12:49 |
| → txtsd joined | 12:49 |
|
txtsd
| What is this abomination that popped up when I tried to commit? https://i.imgur.com/y9hoTM0.png | 12:49 |
|
| It's the first time I've ever seen it, and I don't even have a keyring. | 12:49 |
|
cbreak
| txtsd: you trying to create a signed commit? | 12:51 |
|
txtsd
| Yes, but I've done it before without having to authenticate anything. | 12:51 |
|
cbreak
| private keys are usually encrypted | 12:52 |
|
currybullen
| geirha: where is this kind of stuff even documented? i can't find anything under the git-ls-files manpage | 12:52 |
|
txtsd
| I haven't set a passphrase for that key | 12:52 |
| ← dfee left | 12:52 |
|
osse
| currybullen: man gitglossary | 12:52 |
|
gitinfo
| currybullen: the gitglossary manpage is available at https://gitirc.eu/gitglossary.html | 12:52 |
|
txtsd
| And I never do anyway | 12:52 |
|
osse
| currybullen: under "pathspec" | 12:52 |
| ← RaceCondition left | 12:53 |
|
osse
| currybullen: seems git ls-files '*.classpath' should work too | 12:57 |
|
vancz
| Is there a way to have git compare a local repository to a remote repository and tell me anything that isnt in the upstream , and maybe even like...pack them into somthing, so I can delete the but keep whatever I may have changed? | 12:58 |
|
| without like, manually trying to find everything | 12:58 |
|
| i have several copies of some repos around my disk and i want to consolidate them | 12:59 |
|
cbreak
| vancz: git push --all? | 12:59 |
|
bremner
| you can fetch them all into one reap | 12:59 |
|
| repo | 13:00 |
|
| and reap the rest | 13:00 |
|
txtsd
| cbreak: any idea what I should do next? I've definitely sign-commited with this key before without authenticating, and I've definitely never used a GUI while doing any git activities, so I don't understand why a GUI is popping up now. | 13:00 |
|
geirha
| though '*.classpath' will also match foo.classpath and foo/bar.classpath | 13:00 |
| → Orphis joined | 13:00 |
|
vancz
| a..ha | 13:01 |
|
| guess i have to commit uncommitted changes | 13:01 |
|
bremner
| yes | 13:02 |
|
| it won't merge anything of course. | 13:02 |
|
| Also, make sure you use the right url scheme to defeat hardlinking | 13:02 |
|
cbreak
| txtsd: the gui is probably not git's, but gpg's | 13:03 |
| → RoboFlex12 joined | 13:03 |
|
currybullen
| i liked git ls-files {,'**/'}.classpath, easy to add other filenames for matching as well: git ls-files {,'**/'}.{classpath,project} | 13:03 |
|
osse
| geirha: goddammit | 13:03 |
|
cbreak
| you can find out which process it belongs to, how it was invocated (via ps maybe), and then why? | 13:03 |
|
currybullen
| maybe a little bit less portable by relying on shell functionality though | 13:04 |
|
| oh wait, the dot has to be repeated for every name in the second set of brackets, but yeah | 13:04 |
|
osse
| git already relies on a bunch of shell functionality, though it's becoming less and less | 13:05 |
|
vancz
| bremner: what do you mean? though i dont think i have any hardlinks | 13:05 |
|
bremner
| vancz: it's about git trying to save space by not copying objects | 13:06 |
|
txtsd
| cbreak: Yes it's gpg, and it's showing under a `systemd --user`. If I kill the process it launches with the gui as soon as I try to commit. | 13:06 |
|
cbreak
| txtsd: so it might belong to gpg's agent, used for password input | 13:06 |
|
vancz
| bremner: aha. I dont know what the right url scheme is then | 13:07 |
|
bremner
| vancz: iirc file:///foo is good, but /foo will hardlink | 13:07 |
|
cbreak
| your platform's pinentry maybe | 13:07 |
|
txtsd
| cbreak: Understood that bit. Now how do I make it stop so the commit signing can happen seamlessly like it used to? | 13:07 |
|
cbreak
| are you sure your key doesn't have a password protecting the secret key? | 13:08 |
|
| because that'd be horribly insecure | 13:08 |
|
txtsd
| Yes, I've been using that key since 2017ish and I've never had to authenticate it like this. | 13:08 |
| ← royal_screwup21 left | 13:10 |
| → royal_screwup21 joined | 13:10 |
| ← to1ne left | 13:11 |
| ← tiin57 left | 13:15 |
| ← royal_screwup21 left | 13:15 |
|
vancz
| bremner: aha. | 13:15 |
| → calcul0n_ joined | 13:17 |
| → jaziz joined | 13:18 |
| → tiin57 joined | 13:19 |
| DNS777 → DNS | 13:19 |
| ← vdamewood left | 13:19 |
| ← calcul0n left | 13:19 |
| → aw1 joined | 13:28 |
| → va5c0 joined | 13:28 |
| ← leeN left | 13:29 |
| ← akemhp left | 13:29 |
| → akemhp joined | 13:29 |
| → royal_screwup21 joined | 13:30 |
| → FH_thecat joined | 13:36 |
| → irc_user joined | 13:37 |
| ← independent left | 13:38 |
| → leeN joined | 13:38 |
| ← RoriconKnight left | 13:40 |
| → drbean joined | 13:42 |
| ← tiin57 left | 13:45 |
| → to1ne joined | 13:45 |
| ← noahmg123 left | 13:48 |
| ← royal_screwup21 left | 13:48 |
| → royal_screwup21 joined | 13:49 |
| → tiin57 joined | 13:49 |
| ← disruptivenl left | 13:49 |
| ← Nizumzen left | 13:50 |
| → noahmg123 joined | 13:50 |
| ← sebito91 left | 13:50 |
| → disruptivenl joined | 13:51 |
| → rjstone joined | 13:51 |
| → sebito91 joined | 13:51 |
| ← drbean left | 13:52 |
| ← circuitbone left | 13:53 |
| ← itok left | 13:53 |
| → Nizumzen joined | 13:53 |
| ← ignapk left | 13:54 |
| → circuitbone joined | 13:54 |
| → itok joined | 13:54 |
| ← altendky left | 13:54 |
| ← fii left | 13:55 |
| → ignapk joined | 13:56 |
| → Iroha joined | 13:56 |
| → altendky joined | 13:56 |
| ← va5c0 left | 13:58 |
| → crose joined | 14:01 |
| → RaceCondition joined | 14:06 |
| → CodeSlingerPaul joined | 14:07 |
| → meropyri joined | 14:09 |
| ← leeN left | 14:14 |
| ← tiin57 left | 14:15 |
| ← jaziz left | 14:15 |
| → ChrisLane_ joined | 14:16 |
| → tiin57 joined | 14:18 |
| ← ChrisLane left | 14:18 |
| → sudoforge joined | 14:23 |
| → dionysus69 joined | 14:24 |
| → Gurkenglas joined | 14:25 |
| ← royal_screwup21 left | 14:27 |
| → royal_screwup21 joined | 14:28 |
|
sudoforge
| if i have a branch `foo` with the configuration `branch.foo.remote = upstream`, `branch.foo.pushremote = origin`, and `branch.foo.merge = refs/heads/master` (with origin and upstream being simple `refs/heads/*:refs/remotes/*` refspecs)... why, after fetching, does FETCH_HEAD represent a completely separate tree? i would expect that it would be equal to upstream/master at that point. am i missing | 14:29 |
|
| something obvious? | 14:29 |
| → stats4647 joined | 14:30 |
| ← royal_screwup21 left | 14:32 |
| ← currybullen left | 14:33 |
| → AnAverageHuman joined | 14:34 |
| ← shored left | 14:38 |
| → shored joined | 14:39 |
| → justanotheruser joined | 14:41 |
| → jaziz joined | 14:45 |
| ← tiin57 left | 14:45 |
| ← diogenese left | 14:46 |
| → diogenese joined | 14:46 |
| ← RaceCondition left | 14:48 |
| → tiin57 joined | 14:49 |
| ← gitter1234 left | 14:49 |
| ← sweatsuit left | 14:55 |
| ← Muzer left | 14:55 |
| ← tejr left | 14:56 |
| → tejr joined | 14:57 |
| ← sudoforge left | 14:58 |
| → royal_screwup21 joined | 15:01 |
| → arcatech joined | 15:02 |
| ← akemhp left | 15:02 |
| → thiago joined | 15:05 |
| → sweatsuit joined | 15:10 |
| → Flynn1110 joined | 15:12 |
| → Muzer joined | 15:12 |
| ← txtsd left | 15:12 |
| ← powerhouse left | 15:15 |
| → gast0n joined | 15:15 |
| ← tiin57 left | 15:15 |
| ← h3ck left | 15:16 |
| → cd joined | 15:17 |
| → txtsd joined | 15:18 |
| → tiin57 joined | 15:19 |
| → powerhouse joined | 15:20 |
| ← Muimi left | 15:23 |
| ← AnAverageHuman left | 15:26 |
| → shabius joined | 15:27 |
| → causasui joined | 15:30 |
| ← stats4647 left | 15:33 |
| → leeN joined | 15:37 |
| ← dionysus69 left | 15:44 |
| ← tiin57 left | 15:45 |
| ← jaziz left | 15:47 |
| → tiin57 joined | 15:49 |
| ← mirrorbird left | 15:49 |
| ← powerhouse left | 15:54 |
| → powerhouse joined | 15:56 |
| ← zebrag left | 15:56 |
| → jaziz joined | 15:57 |
| → zebrag joined | 15:59 |
| → mirrorbird joined | 16:00 |
| → matelot joined | 16:05 |
| → UlrichH joined | 16:05 |
| ← powerhouse left | 16:09 |
| → powerhouse joined | 16:11 |
| → Borkr joined | 16:11 |
| → Gustavo6046 joined | 16:14 |
| ← Borkr left | 16:14 |
| ← tiin57 left | 16:15 |
| ← kdlv left | 16:15 |
| → tiin57 joined | 16:18 |
| → mns joined | 16:22 |
| ← powerhouse left | 16:23 |
| ← justanotheruser left | 16:24 |
| ← mi12078 left | 16:25 |
| → powerhouse joined | 16:25 |
| → barteks2x_ joined | 16:32 |
| ← barteks2x left | 16:32 |
| ← barteks2x_ left | 16:32 |
| → barteks2x_ joined | 16:33 |
| ← mns left | 16:34 |
| ← powerhouse left | 16:39 |
| → powerhouse joined | 16:40 |
| → akemhp joined | 16:41 |
| ← tiin57 left | 16:45 |
| ← theoceaniscool left | 16:46 |
| → tiin57 joined | 16:49 |
| → Aki-lucky joined | 16:52 |
| ← Aki-lucky left | 16:52 |
| → Aki-lucky joined | 16:53 |
| ← Aki-lucky left | 16:53 |
| ← mirrorbird left | 17:04 |
| ← powerhouse left | 17:05 |
| → stats4647 joined | 17:06 |
| → powerhouse joined | 17:07 |
| ← roflin left | 17:07 |
| → otisolsen70 joined | 17:08 |
| → mns joined | 17:10 |
| ← tiin57 left | 17:15 |
| → tiin57 joined | 17:18 |
| → vicfred joined | 17:20 |
| → roflin joined | 17:22 |
| ← royal_screwup21 left | 17:25 |
| → royal_screwup21 joined | 17:25 |
| → mindCrime_ joined | 17:30 |
| ← royal_screwup21 left | 17:30 |
| → yonder joined | 17:33 |
| → otisolsen70_ joined | 17:34 |
| ← raymond left | 17:34 |
| → wrobinson joined | 17:34 |
|
wrobinson
| I'm using libgit2 in a small program to parse doc revisions from a database and convert to git commits | 17:35 |
|
| from reading through libgit2.org, I've set up a fairly naive approach to getting the `add` and `commit`s to work | 17:36 |
| ← tmz_ left | 17:36 |
| ← mns left | 17:36 |
| → tmz joined | 17:37 |
|
wrobinson
| on the surface, things a starting to look functional, but noticed that when I create a further `add` and `commit`, the file | 17:37 |
|
| gets flagged as `deleted` | 17:38 |
| ← otisolsen70 left | 17:38 |
|
wrobinson
| I'm now assuming there's an issue with how I'm `add`ing - that somehow git figures the files are different though they share the same path | 17:38 |
| → mirrorbird joined | 17:41 |
| ← arcatech left | 17:42 |
| → davispuh joined | 17:43 |
| ← tiin57 left | 17:45 |
| → tiin57 joined | 17:49 |
| ← jaziz left | 17:49 |
| ← st-gourichon-fid left | 17:50 |
| → mns joined | 17:50 |
| → st-gourichon-fid joined | 17:51 |
| → jaziz joined | 17:52 |
| ← otisolsen70_ left | 17:54 |
| sstutz → steven | 17:57 |
| ← UlrichH left | 17:57 |
| ← chiastre left | 18:04 |
| → chiastre joined | 18:06 |
| → Betal joined | 18:10 |
| ← Case_Of left | 18:11 |
| ← sunrunner20 left | 18:11 |
| → Case_Of joined | 18:13 |
| → royal_screwup21 joined | 18:14 |
| ← tiin57 left | 18:15 |
| → fstd_ joined | 18:16 |
|
osse
| wrobinson: Are you using your program in a repo and running git status after? | 18:16 |
| → tiin57 joined | 18:19 |
|
osse
| wrobinson: Because if that's the case then it makes sense | 18:19 |
| ← royal_screwup21 left | 18:19 |
| ← fstd left | 18:20 |
| fstd_ → fstd | 18:20 |
| → Goplat joined | 18:24 |
| → dfee joined | 18:32 |
| ← qgTG_ left | 18:33 |
| ← Xenguy left | 18:38 |
| → feriman joined | 18:38 |
| → h3ck joined | 18:39 |
| ← chiastre left | 18:39 |
| → chiastre joined | 18:41 |
| ← tiin57 left | 18:45 |
| ← mns left | 18:46 |
| → rafasc joined | 18:47 |
| → tiin57 joined | 18:48 |
| → sunrunner20 joined | 18:49 |
| → qgTG joined | 18:51 |
| ← aw1 left | 18:56 |
| → Xenguy joined | 18:59 |
| ← dfee left | 19:01 |
| → dfee joined | 19:06 |
|
wrobinson
| osse: I use libgit2 to create the repo, to perform an initial commit, then to do individual add + commit for each "doc revision" | 19:09 |
|
| i saw that the code finished in a muddy state | 19:10 |
|
| *finished with the repo in a muddy state | 19:10 |
|
| checked `status` and saw the file was marked 'deleted' | 19:11 |
|
| so ran `gdb` and found that the first file add+commit seems fine | 19:11 |
|
| but subsequent ones would create a file with the same name, but somehow different identifier | 19:11 |
|
| so git was adding and commiting fine, but was also flagging the "same" file as deleted | 19:12 |
| ← tiin57 left | 19:15 |
| → royal_screwup21 joined | 19:15 |
| ← Hello71 left | 19:15 |
| → Hello71 joined | 19:16 |
|
rafasc
| wrobinson: in git a file exists in 3 states. In the HEAD, which defines the commit you have checked out, as in the latest commit; on the index/"staging area", git add puts files in the staging area; and on the worktree, which is usually on the same directory the .git is. | 19:17 |
| → tiin57 joined | 19:19 |
|
rafasc
| So you get <file.txt in worktree> | (git add file.txt) -> puts file.txt in the staging area | (git commit) -> puts the files in the staging area in a commit. | 19:19 |
|
| If you are pragmatically doing "git add", and put a file in the index without it existing in the worktree, for git it looks like the file was deleted. | 19:20 |
|
| from the worktree. | 19:20 |
| ← royal_screwup21 left | 19:20 |
|
rafasc
| Because the assumption is that git add is performed on existing files on the worktree. | 19:20 |
| → royal_screwup21 joined | 19:20 |
|
rafasc
| The same applies one level up, if you have a commit with certain files and pragmatically create a staging area where some of the files are not present, it will also look like a deletion. | 19:21 |
| ← mindCrime_ left | 19:21 |
| → mindCrime_ joined | 19:22 |
|
wrobinson
| rafasc: excellent explanation - thanks | 19:22 |
|
| so looks like my current solution is a little too naive | 19:22 |
|
| as I start I guess I should figure how to build the worktree | 19:23 |
|
rafasc
| wrobinson: I'm not sure which is your specific case, but if you're doing it pragmatically you can generally ignore the worktree state. | 19:23 |
|
wrobinson
| do you mean programmatically? | 19:24 |
|
rafasc
| wrobinson: when you finish, you can do a git checkout HEAD; and git will materialize the files. | 19:24 |
|
wrobinson
| aha! | 19:24 |
|
| that makes sense - so I'm making the commit, but not updating HEAD | 19:25 |
| → cdown_ joined | 19:25 |
|
rafasc
| It's hard to say, but if you're getting "deleted", you're either adding things to the staging are without updating the worktree, or changing the index in a way it removes the files when compared to HEAD> | 19:26 |
|
| you can tell which one it is by using git diff; and git diff --staged; | 19:27 |
| ← cdown left | 19:27 |
| cdown_ → cdown | 19:27 |
|
rafasc
| the "git commit" action, should itself update the HEAD. | 19:28 |
|
wrobinson
| rafasc: atm i think my code basically does whats outlined here: https://libgit2.org/docs/examples/init/ (but with an additional `git_index_add_bypath()` | 19:28 |
|
| thanks again, I'll check out the diffs | 19:28 |
|
| yeah, I thought commit would update the HEAD, but wasn't sure if something different was happening when using the lib code | 19:30 |
|
rafasc
| wrobinson: let me guess, the path you're passing is outside of the git repository | 19:30 |
|
wrobinson
| nope | 19:30 |
|
| i init a repo | 19:30 |
|
| then use c to build the directory structure inside it | 19:30 |
|
| and add the files | 19:31 |
|
| (all without updating git) | 19:31 |
|
| then for each file, I do a git add and commit; perform a "revision" on the file; and repeat | 19:31 |
|
| i ran the diffs you suggested | 19:32 |
|
| `git diff` returns empty | 19:33 |
|
rafasc
| then the problem is more complex than what I imagined. | 19:33 |
|
| that means your worktree and your staging area matches. | 19:33 |
|
wrobinson
| `git diff --staged` shows a deletion (like the opposite of the revision i just committed) | 19:33 |
|
j416
| what is all this for? | 19:33 |
|
wrobinson
| j416: taking cloud9 IDE document revisions, and converting to a git repo | 19:34 |
|
| rafasc: Is it possible I'm messing up something with the "parent" value when committing | 19:34 |
|
| ? | 19:34 |
|
j416
| wrobinson: maybe man git-fast-import is of use? | 19:35 |
|
gitinfo
| wrobinson: the git-fast-import manpage is available at https://gitirc.eu/git-fast-import.html | 19:35 |
|
wrobinson
| j416: interesting, thanks | 19:36 |
|
rafasc
| wrobinson: if git diff --staged is showing deleted, it means the files are no longer present on the index. | 19:36 |
| → pacuna joined | 19:37 |
|
rafasc
| does git update-index -g; change anything? | 19:38 |
|
wrobinson
| so when i say my code performs a revision, it reads the file to a buffer, then also re-opens the file in O_WRONLY, truncates it to be blank, then performs the revision based off of the buffered content | 19:38 |
| ← shailangsa left | 19:38 |
|
wrobinson
| but still gets saved to the same filename | 19:38 |
|
| so i figured that should all be fine | 19:38 |
|
| one moment, checking | 19:38 |
| → shailangsa joined | 19:38 |
|
wrobinson
| nope | 19:39 |
|
| I assume I need to call the `add` function before every commit, like i would do with the commandline | 19:40 |
|
rewt
| I agree with j416, git-fast-import is the tool you should be using for this... you're basically doing what those cvs-to-git, hg-to-git, etc type of tools do, and they also use git-fast-import, iirc | 19:40 |
|
rafasc
| wrobinson: yes, you do | 19:40 |
| → SuperLag joined | 19:41 |
|
wrobinson
| rafasc: if you're interested: https://paste.ubuntu.com/p/W3T2BFYSyC/ | 19:41 |
|
| hopefully it's not too horrible | 19:41 |
|
rafasc
| using libgit might be easier if you're used to how git itself does things. To use fast-export you have to learn its stream format. | 19:42 |
|
wrobinson
| rewt: thanks - i definitely will look into it | 19:42 |
|
rafasc
| Shouldn't be too hard to learn it though. | 19:42 |
|
wrobinson
| would at least be nice to understand what's causing this problem though | 19:43 |
|
| seeing as it's not directly my use-case that is the issue | 19:43 |
|
| i'm wondering if i'm buggering stuff up with the commit parent | 19:44 |
| ← tiin57 left | 19:45 |
|
rafasc
| I think I know what's happening. | 19:46 |
| → tiin57 joined | 19:48 |
|
rafasc
| or maybe not. | 19:49 |
|
| wrobinson: are you sure you're passing the existing index to this function? | 19:49 |
|
wrobinson
| yes, the index doesn't change right? | 19:50 |
|
| i just tried the approach for getting the `git_commit *` to HEAD here: https://www.git-scm.com/book/en/v2/Appendix-B%3A-Embedding-Git-in-your-Applications-Libgit2 | 19:50 |
|
rafasc
| I would suspect that if you would call this with a blank index, you would add one file and it would work, but on the second add, the first file would show as deleted while the second file would show as added. | 19:50 |
|
wrobinson
| hmm, makes sense, but think the index is valid | 19:51 |
|
| and the code I just tried seems to work | 19:51 |
|
| so far, I think | 19:51 |
|
rafasc
| a valid index doesn't mean it's the index you want. | 19:51 |
|
wrobinson
| ah fair point | 19:51 |
|
rafasc
| i.e. a blank index is valid. | 19:51 |
|
wrobinson
| and no, the edit didn't help | 19:52 |
|
| ok, hceking | 19:52 |
|
| checking* | 19:52 |
|
j416
| wrobinson: in a regular repo when "git status" says clean with nothing to commit, the index matches your last (current) commit | 19:52 |
| ← geosmile left | 19:53 |
|
wrobinson
| ah | 19:54 |
|
| i misread the docs - i've been using the repo index | 19:54 |
| ← Heirlung left | 19:54 |
|
wrobinson
| from `git_repository_index()` | 19:55 |
| → Heirlung joined | 19:56 |
| → mowcat joined | 19:56 |
| ← royal_screwup21 left | 19:57 |
| → royal_screwup21 joined | 19:57 |
| ← JanC left | 20:00 |
| ← to1ne left | 20:01 |
| ← Flynn1110 left | 20:02 |
| → JanC joined | 20:04 |
| ← tarkus left | 20:06 |
| ← royal_screwup21 left | 20:11 |
| → royal_screwup21 joined | 20:11 |
|
wrobinson
| ok, it looks like i in fact did read the docs correctly | 20:12 |
|
| the repo index is used: https://libgit2.org/libgit2/ex/HEAD/add.html | 20:13 |
|
| i let the code run, it finishes with the same 'deleted file' status | 20:14 |
|
| but I have 80 (what appear to be) successful commits in `git log` | 20:14 |
| ← foul_owl_ left | 20:14 |
| ← tiin57 left | 20:15 |
|
rewt
| if you checkout the commits, do they contain all the files that they should? | 20:15 |
| → blaisebool joined | 20:16 |
| ← royal_screwup21 left | 20:16 |
|
wrobinson
| checking (atm I'm only testing with one file) | 20:18 |
| → tiin57 joined | 20:18 |
|
wrobinson
| so I'm just running some diff tests, e.g. `git diff HEAD~43 HEAD~42` | 20:18 |
|
| it appears that after a commit, there's the staged delete, but running another update and commit seems fine, but just leaves another staged delete | 20:20 |
|
| I'm obv messing _something_ up | 20:20 |
|
| hmm. `git status` shows the parent directory as not added | 20:22 |
|
rewt
| are you creating the file in the worktree (the actual directory)? | 20:23 |
|
| or just adding to the index? | 20:23 |
|
wrobinson
| I create the file using `open()` and `write()`. I assume thats what you mean by creating in the actual dir | 20:25 |
| → royal_screwup21 joined | 20:25 |
|
rewt
| yes, so a simple 'ls' will show the file | 20:25 |
|
wrobinson
| yes | 20:25 |
|
| I also have a .bak of the original doc in it's final state (after all revisions) | 20:25 |
|
| and can vimdiff them with no differences against the ones written alongside the git stuff | 20:26 |
| → cosimone joined | 20:27 |
|
wrobinson
| (that's not entirely true it appears, but just looks like some formatting errors) | 20:28 |
| → foul_owl_ joined | 20:28 |
| ← feriman left | 20:36 |
| → cuppajoeman joined | 20:38 |
| ← cosimone left | 20:38 |
|
cuppajoeman
| I found this file https://github.com/github/gitignore/blob/master/Python.gitignore. If I use the `Python.gitignore` file directly in my directory will it work or does it have to be named `.gitignore` ? | 20:38 |
| → arcatech joined | 20:39 |
| → cosimone joined | 20:40 |
|
wrobinson
| rewt: j416: rafasc: thanks again for the help. I'm gonna have to rest and try again tomorrow with a (hopefully) clear head | 20:40 |
|
rewt
| cuppajoeman, it has to be .gitignore | 20:40 |
|
cuppajoeman
| Ok, thanks! | 20:41 |
| → HumanG33k joined | 20:41 |
| ← tiin57 left | 20:45 |
|
rafasc
| wrobinson: It?s worth noting that this doesn?t actually write the index to disk. There?s a separate call for that: git_index_write. All this code does is use the empty index to get the SHA-1 hash of the empty tree. | 20:46 |
|
| https://libgit2.org/docs/examples/init/ | 20:46 |
| ← HumanG33k left | 20:46 |
| → tiin57 joined | 20:48 |
| → justanotheruser joined | 20:48 |
|
wrobinson
| rafasc: ah. thanks again. will need to do more digging and reading | 20:51 |
|
| so `git log` still shows what's expected, but still no index is written to disk? | 20:52 |
| ← akemhp left | 20:53 |
|
wrobinson
| also, did another quick test while the app is in mid-state (directories have been created and files exist on disk) | 20:55 |
|
| and the initial commit performed | 20:55 |
|
| I then manually ran `git add top-dir/subdir/file.c` which immediately altered how `status` looks | 20:56 |
| ← eb0t_ left | 20:57 |
|
wrobinson
| it (as I would expect) no longer complained about "top-dir" in the same way as being untracked | 20:57 |
|
| whereas, if i let my code run, it's as though all of the files are still untracked | 20:57 |
|
| (sorry if thats a poor/unclear explanation) | 20:57 |
| ← pacuna left | 20:58 |
| → mns joined | 21:01 |
| ← cosimone left | 21:01 |
| → cosimone joined | 21:01 |
| → tiin57- joined | 21:02 |
| ← tiin57 left | 21:02 |
| ← epsilonKNOT left | 21:03 |
| ← cosimone left | 21:03 |
| → W3BV1P3R joined | 21:04 |
| ← W3BV1P3R left | 21:05 |
| → cosimone joined | 21:05 |
| ← matelot left | 21:09 |
| → vicfred_ joined | 21:10 |
| ← vicfred left | 21:12 |
| ← tiin57- left | 21:15 |
| → epsilonKNOT joined | 21:15 |
| ← royal_screwup21 left | 21:16 |
| ← cosimone left | 21:16 |
| → royal_screwup21 joined | 21:16 |
| → cosimone joined | 21:17 |
| → tiin57 joined | 21:19 |
| ← royal_screwup21 left | 21:21 |
| → akemhp joined | 21:30 |
| ← cosimone left | 21:32 |
| ← acetakwas left | 21:32 |
| → acetakwas joined | 21:33 |
| ← xphacter left | 21:34 |
| ← POQDavid left | 21:36 |
| → POQDavid joined | 21:37 |
| ← POQDavid left | 21:38 |
| ← acetakwas left | 21:38 |
| → POQDavid joined | 21:38 |
| ← RoboFlex12 left | 21:38 |
| → acetakwas joined | 21:39 |
| ← POQDavid left | 21:41 |
| → shicks_ joined | 21:42 |
| ← acetakwas left | 21:43 |
| → acetakwas joined | 21:44 |
| ← shicks2525 left | 21:44 |
| ← pikapika left | 21:44 |
| → pikapika joined | 21:44 |
| ← nikivi left | 21:45 |
| → cosimone joined | 21:45 |
| → nikivi joined | 21:45 |
| ← tiin57 left | 21:45 |
| ← pikapika left | 21:45 |
| → pikapika joined | 21:45 |
| ← acetakwas left | 21:45 |
| → acetakwas joined | 21:47 |
| ← mindCrime_ left | 21:47 |
| ← nikivi left | 21:47 |
| ← igemnace left | 21:47 |
| → nikivi joined | 21:47 |
| → mindCrime_ joined | 21:47 |
|
j416
| wrobinson: sleep well, I hope you figure it out. z/ | 21:48 |
| → tiin57 joined | 21:48 |
| ← calcul0n_ left | 21:49 |
| → gschanuel joined | 21:56 |
| → g00s joined | 21:56 |
| ← mns left | 21:57 |
| → RoboFlex13 joined | 22:00 |
| ← gschanuel left | 22:01 |
| → gschanuel joined | 22:02 |
| ← gschanuel left | 22:02 |
| → gschanuel joined | 22:02 |
| → barteks2x__ joined | 22:03 |
| ← barteks2x_ left | 22:03 |
| ← gschanuel left | 22:03 |
| → raymond joined | 22:12 |
| ← acetakwas left | 22:14 |
| ← pikapika left | 22:14 |
| → royal_screwup21 joined | 22:14 |
| ← tiin57 left | 22:15 |
| → pikapika joined | 22:15 |
| → acetakwas joined | 22:16 |
| ← acetakwas left | 22:16 |
| → acetakwas joined | 22:17 |
| → tiin57 joined | 22:18 |
| ← justanotheruser left | 22:18 |
| ← royal_screwup21 left | 22:19 |
| ← blaisebool left | 22:20 |
| ← surfist left | 22:29 |
| → Kaedenn1 joined | 22:34 |
|
Kaedenn1
| Are git hooks part of the repository? If I create a pre-commit hook, can I ensure other people who clone the repository obtain the same hook? | 22:35 |
|
| We're designing a new CI system and I want to ensure certain constraints: checked-in code should compile without errors and code may not be checked-in directly to a non-development (qa, prod, training) branch. | 22:37 |
|
| I'm concerned the latter would happen if someone pulls code out of the prod branch and forgets to change which branch they commit to. | 22:38 |
| → mns joined | 22:40 |
| → to1ne joined | 22:40 |
|
rafasc
| Kaedenn1: no, for security reasons hooks are not transferred on clones. | 22:41 |
|
Kaedenn1
| Does git provide some sort of mechanism for me to implement these needs? | 22:41 |
|
rafasc
| Kaedenn1: in general, anything that goes inside .git is out of bounds for clone. | 22:41 |
|
| Kaedenn1: usually what you do for that is use git hooks on the server, and refuse any pushes that do not fit your criteria. | 22:42 |
|
Kaedenn1
| Server hooks? We're using github.com, how do I configure server hooks for the repos in question? Also, we have ~300 repos, is there a way to configure these hooks on an org level? | 22:43 |
| ← mns left | 22:45 |
| ← tiin57 left | 22:45 |
|
rafasc
| you need a pre-receive hook, but I think you would need github enterprise for that. | 22:47 |
|
Kaedenn1
| We have that. | 22:47 |
|
| So a pre-receive hook could populate the repository with desired local hooks. | 22:47 |
|
rafasc
| No. the pre-receive hooks can deny pushes that do not fit your criteria. | 22:48 |
|
Kaedenn1
| (this is all code internal to our organization and only approved people can see the code, let alone make changes) | 22:48 |
|
rafasc
| There's no way to enforce hooks on clients. | 22:48 |
|
Kaedenn1
| Do those hooks run on the server, e.g. github.com? | 22:48 |
|
rafasc
| yes | 22:48 |
| → tiin57 joined | 22:49 |
|
Kaedenn1
| So there isn't a way to ensure our code compiles upon checkin, then, because we use a proprietary compilation system installed locally. z_z | 22:49 |
|
| Unless we wrap checkin in some other script and invoke that instead of git commit. | 22:49 |
|
rafasc
| you can politely ask devs to install client side hooks. | 22:49 |
|
| but there's no way to enforce them to run said hooks. they can always skip it with --no-verify, or by creating commits with lower level commands that do not trigger the hooks. | 22:50 |
|
Kaedenn1
| Is it possible to have global client-side hooks that run for all repositories inside of our org? Again, we have ~300 repos and I'm not sure how I'd ensure everyone has the right hooks. | 22:50 |
|
| Oh, we'd use a "please don't do that" method of enforcing that. | 22:50 |
|
| We're a team and we trust each other. | 22:50 |
|
| s/right hooks/right hooks everywhere/ | 22:51 |
|
rafasc
| you can make git read the hooks from a shared directory by configuring core.hookspath | 22:51 |
|
Kaedenn1
| Then I can set that via a global system-wide git config. | 22:52 |
|
rafasc
| yes, but people cloning will not get those hooks. | 22:52 |
|
Kaedenn1
| The developers can only check in code from a central system (whether the proprietary compiler suite is installed). This is an artifact of our current VCS. | 22:53 |
|
| The simplest option here is to do what our existing VCS/migration system does: scripts for checkout, checkin, etc. | 22:54 |
|
| Users /can/ invoke the git commands directly to bypass everything, but we'll ask politely they not do that. | 22:55 |
| ← arcatech left | 22:55 |
|
rafasc
| I have no ideia "what can only check in code from a central system" means. But with git, it is not possible to clone in a way that you inherit the hooks of whatever you are cloning. | 22:55 |
|
Kaedenn1
| There's a common "development server" we all use. | 22:55 |
|
| We check out code to our locations on that server, we compile code on that server, and we check in code from our locations on that server. | 22:56 |
|
| Users can check out the code to any machine they please, but they won't be able to compile it. | 22:56 |
| ← irc_user left | 22:56 |
| ← Hello71 left | 22:56 |
|
rafasc
| people usually either include the hooks as part of the repo, and ask users to configure hookspath, or make it part of their build scrip to check the critearia. | 22:56 |
|
Kaedenn1
| (unless they install the same compiler suite from our vendor) | 22:56 |
|
rafasc
| Kaedenn1: "we check out code" is not clear | 22:57 |
| ← vicfred_ left | 22:57 |
|
Kaedenn1
| by "we check out code" I mean obtaining repo/file.c from github.com/org/repo/file.c | 22:57 |
|
| s/-file.c/file.c/ | 22:58 |
|
| extracting code out of our version control system, github.com/org/repo | 22:58 |
| → Hello71 joined | 22:59 |
|
Kaedenn1
| We're rebuilding our entire VCS and migration systems from scratch because we have an ETA for losing our current one. So I'm in charge of designing how all of this works given the constraints we have. I really have no clue what I'm doing. | 22:59 |
|
rafasc
| well, not being able to enforce hooks is just another constraint you'll have to consider. | 23:01 |
|
Kaedenn1
| Two big constraints I need to work around: 1) changes may only be pushed to the dev (or a development) branch; changes shouldn't be pushed to the qa or production branches, 2) (compiled) code must compile without error before pushing changes | 23:02 |
| ← cosimone left | 23:04 |
|
rafasc
| 1) is relatively easy to do it server side. 2) is impractical to put in a server side hook as you would need to compile it on the server to decide if the push is allowed or not. | 23:04 |
|
| the alternative is to use pre-push client side, and check there. But pre-push is a client hook, and there's no way (deliberate) to enforce that. | 23:05 |
|
| Kaedenn1: if you're using github, why don't you use something like github actions to compile your code and invalidate the PR? | 23:06 |
|
| you can host your own runners with github actions. | 23:06 |
|
| So you could include whatever compiler you need to compile it. | 23:07 |
|
Kaedenn1
| ...so we can use some kind of web-hook to invoke code on our server based on an action on github.com? Is the request inbound (to our server from github) or outbound (from our server to github)? The former will require firewall rules. | 23:07 |
|
| ...is there a way to do this via github -> jenkins? We have a Jenkins setup and if that can receive Github triggers and do things, that'd work. | 23:08 |
|
| Actually no, crap. | 23:09 |
| ← pikapika left | 23:15 |
| ← acetakwas left | 23:15 |
| ← tiin57 left | 23:15 |
| → pikapika joined | 23:15 |
| → acetakwas joined | 23:16 |
| ← tejr left | 23:17 |
| → tejr joined | 23:17 |
| ← acetakwas left | 23:18 |
| → tiin57 joined | 23:18 |
| → acetakwas joined | 23:19 |
| → theoceaniscool joined | 23:30 |
| ← pikapika left | 23:32 |
| ← akemhp left | 23:32 |
| → pikapika joined | 23:32 |
| ← theoceaniscool left | 23:36 |
| ← nikivi left | 23:40 |
| → nikivi joined | 23:41 |
| → justanotheruser joined | 23:41 |
| ← nikivi left | 23:41 |
| ← acetakwas left | 23:42 |
| → nikivi joined | 23:42 |
| → acetakwas joined | 23:44 |
| ← tiin57 left | 23:45 |
| → tiin57 joined | 23:48 |
| ← cdown left | 23:53 |
| → cdown joined | 23:55 |
| ← Gustavo6046 left | 23:55 |
| ← foul_owl_ left | 23:56 |