IRCloggy #git 2019-03-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.

2019-03-25

jokajak left00:03
leeN left00:03
n3wborn left00:03
finalbeta left00:04
mescalinum left00:04
justanotheruser joined00:05
cdown left00:05
nightshift joined00:06
jokajak joined00:06
nightshift Is there such a thing as a post-init hook, or any other way that I can enforce editing of the description file?00:06
rafasc nightshift: init uses templates. Check the bottom of man git init.00:09
gitinfo nightshift: the git-init manpage is available at https://gitirc.eu/git-init.html00:09
nightshift thank you.00:09
mooasaurus left00:13
mooasaurus joined00:13
orbyt_ joined00:14
nightshift hmmmmm, not quite what I'm looking for. Looks like I might have to find a way to script it.....00:16
dpyro joined00:16
Narrat left00:18
nightshift Should be a fairly simple bash function, actually. Unless I want to force using git-shell for that user00:21
CCDelivery joined00:24
Beam_Inn joined00:29
kerframil left00:31
topdownjimmy left00:32
topdownjimmy joined00:33
kerframil joined00:33
AtumT left00:38
esran joined00:43
rafasc nightshift: what are you trying to do?00:43
nightshift rafasc: I want to force the developer to edit the description file when they create a new repository on the server (granted, I know I can't actually make them make changes, but I'd like the file to be opened in an editor)00:45
rafasc How are they creating said repositories?00:47
Beam_Inn_ joined00:47
rafasc nightshift: You could make a hook that denies pushes to the repository if the description is empty/default...00:48
nightshift mkdir and git init via ssh session (that right now runs bash, but, eventually I'd like to switch over to git-shell), on a linux command line only machine00:48
rafasc Not sure why you would do that, but you could.00:48
nightshift rafasc, this is part of my web based static repo viewer00:49
Beam_Inn left00:50
Beam_Inn_Beam_Inn00:50
nightshift It utilizes the description to give a short description of the project the repo is for on the main list page00:50
boombatower joined00:50
fstd_ joined00:53
rafasc The only way I am thinking is having a ~/git-shell-commands directory , with a script that can change the description, and having a server side hook that denies pushes if the description is empty or is the default one.00:55
The hook can print information on how to use the custom command to set up the description.00:56
fstd left00:56
fstd_fstd00:56
nightshift rafsc: thank you, I will explore that option00:58
shabius_ joined00:58
nightshift The other way I was considering is a custom command that makes the directory, init's the repo and calls an editor to bring up the file for editing.01:00
de-facto left01:01
de-facto joined01:01
shabius left01:01
nightshift That doesn't force actual changes, but, if I copy the template directory, I can change the default description file with instructions to place the short description there. The hook would probably be better01:02
dpyro left01:07
Inline left01:10
rafasc or only init the repository if they have a proper description. That way the hook is not needed.01:13
If the repo doesn't exist, they can't push.01:13
nightshift How would you cancel the init without the description?01:14
(sorry, I learn better with something resembling a real world problem to fix, so, I'm sure I'm missing some fairly basic linux/scripting knowledge at this point)01:15
fishsource joined01:18
nightshift hmmmmmmm, possible idea... make the description as part of the parameters of the custom command, and exit the command if it doesn't exist.01:19
rafasc yea, you can ask for the description first and only git init; if you received what you expected.01:21
Khisanth left01:21
rafasc then you can git init, and cp the file into place. For example.01:21
CCDelivery left01:22
CCDelivery joined01:22
nightshift With you using cp to get the file, are you envisioning the user/developer specifying a file location (or, looking for it in the directory), initially creating it in /tmp, or something else?01:23
nowhere_man left01:24
nightshift Just trying to make sure we're kind of on the same page, since I don't have any actual code written for this yet.01:25
sydbarret joined01:26
esrse joined01:27
watabou_ joined01:27
Es0teric joined01:31
fishsource left01:31
Khisanth joined01:34
ferdna left01:36
b7219264_ left01:36
b7219264 joined01:36
ferdna joined01:39
ferdna left01:41
watabou_ left01:49
Duikb00t joined01:51
Duikb00t left01:55
rafasc I think for something simple as a quick description, having it as an argument to a git-shell command is fine.01:56
kreyren left01:57
rafasc But that doesn't work so well for long, multi line descriptions.01:58
I think you can make the script read from stdin, for those cases.01:59
lankanmon left01:59
boombatower left02:03
motoko-chan joined02:13
nightshift Yeah, seems like most uses for description, including my plan, are less than 80 characters, usually02:14
lankanmon joined02:14
nightshift Should probably run the script interactively and pull from stdin, just in case. (If I'm the only one ever using it, I can stress test it to see how long I can let it go as an argument, and just make sure I never go there, but if I release it to the wild, I should assume that people won't read documentation and make it too long)02:15
twb joined02:22
twb Should libgit2 be faster than git?02:22
The slowness appears to be in the blame function; the rest are reasonably fast02:24
rafasc twb: are you using windows?02:25
twb nope02:26
rafasc some things are slower in windows, especially shell-based commands. But blame isn't one of them.02:27
twb Here's my actual code: http://ix.io/1Eqy (new, libgit, slow on large codebases) http://ix.io/1xbm (old, fork+exec, fast on large codebases)02:27
watabou_ joined02:27
twb With hot disk caches, on a small repo, fork+exec takes 3.189s and libgit2 takes 2.728s02:28
johnny56 left02:28
twb But on a big repo, fork+exec|head takes 0.605s and libgit2|head takes 19.703s02:30
https://libgit2.org/libgit2/#HEAD/type/git_blame_flag_t02:33
apoos_maximus joined02:34
twb I haven't got -M and -C turned on yet, because libgit2 apparently doesn't understand them02:34
rafasc where is libgit2 taking the bulk of the time difference?02:34
twb Not sure yet, I don't know how to profile the library02:34
(Note that I'm using it via python3 as well)02:35
rafasc I did not review the code, but I would start there.02:35
twb I guess I could strace it02:35
Ori_B I'd expect a few tens of milliseconds of overhead for forking/execing a process, plus a few microseconds to parse each line of output.02:35
twb Yeah I totally concede that fork itself is fast02:36
rafasc 19 seconds different is considerable time.02:36
Ori_B given that git itself has been beaten on longer, it wouldn't surprise me if more work has been spent optimizing it02:37
as for the 19s difference in time, you're probably going to have to profile it02:37
fishsource joined02:39
yyy left02:40
rafasc well libgit2 is used by may git hosts, and they have incentives to keep things fast.02:40
twb I sort of assumed that libgit2 was the same underlying codebase as git itself02:40
But maybe that's a dumb assumption02:40
motoko-chan left02:40
dviola joined02:40
lvns joined02:41
tombusby left02:43
tombusby joined02:43
sgn left02:44
rafasc dumb? no. Incorrect yes.02:45
twb hehe02:45
can the regular git codebase be used as a C library?02:45
rafasc if it could do you think people would bother to code libgit2?02:46
twb Maybe if they didn't like the license or something02:46
kjartan left02:47
rafasc I think they're both gplv202:48
nightshift but, twb, the license is the same as git itself02:48
give me a second to check something02:48
twb: my code editor has git integration, I'm trying to check if they use libgit2 or git itself02:50
nevermind, it uses libgit2, which is weird, because git is also a dependancy02:52
kjartan joined02:52
nightshift I think02:52
lvns left02:52
watabou_watabou02:53
F0rTex left02:54
F0rTex joined02:55
twb I'm sure emacs magit just fork+execs02:58
fishsource left03:01
rafasc left03:01
Ori_B it... kind of can, sort of -- see cgit, which I think does that.03:02
but it's not clean.03:02
twb Ori_B: you mean not reentrant?03:03
nightshift yeah, I need to dive into the code to see what atom does03:03
twb nightshift: atom is basically js, right? How does it even fork+exec, let alone dlopen03:04
Ori_B I mean, not particularly stable -- it's including gits internal headers and hoping for the best.03:04
twb Ori_B: ah gotcha03:04
Ori_B twb: electron supports c++ extensions.03:04
or rather, node does.03:04
so, basically, you do it via an ffi03:04
nightshift twb: it's built on top of node, yes. That's why I need to dive into it's code. Because it uses libgit2, apparently, but also depends on git03:05
alex_pa joined03:05
fishsource joined03:06
orbyt_ left03:07
motoko-chan joined03:08
twb haha, pygit2's blame methods accepts flags= but never passes them to git03:08
nightshift twb: so, is that the source of your slowdown maybe?03:09
twb nightshift: I wasn't passing any flags anyways03:09
I wanted to enable mailmap and -w -M -C, eventually03:09
nightshift ah, missed that part03:09
twb But those would make it *slower* typically03:09
CCDelivery left03:10
nightshift sorry, I'm getting lost in atom's code. Still can't find why it NEEDS git. So far all the git stuff is passed to gitutils, which uses libgit203:10
kadoban joined03:10
fishsource left03:12
Dirak left03:14
johnny56 joined03:14
twb heh https://github.com/libgit2/libgit2/issues/302703:20
"one of the authors of some of the recent optimizations to Git's blame code has explicitly asked this his work not be included in libgit2."03:23
orbyt_ joined03:23
nightshift yeah, guess you have your answer :(03:25
fyi, I think I just found where atom uses git instead of libgit2, I'm still working through the code to see what they do03:26
twb FTR I was running libgit 0.27 and there's a 0.28 available03:26
wcstok joined03:27
lagothrix left03:27
lagothrix joined03:28
duderonomy left03:28
nightshift That MIGHT help, but, it sounds like they can't just grab newer versions of git's blame code, and they don't have anyone that can/wants to rewrite it though03:29
twb Agree03:30
Kinda weird that people don't see blame as a critical part of git :-)03:30
nightshift (and I don't know anywhere near enough js to stare at this and figure out what atom is doing)03:30
twb Like, there's no point keeping records of who screwed up if you can't go back and say "see, here is proof, now lash him to the mainmast!"03:31
nightshift I think they just don't see it as something to really use outside of git's CLI utilities....03:31
z8z left03:31
nightshift but, I do know that node allows fork and exec, and when you use those commands, they literally leave the node environment and go to your shell (or, at least they did a couple years ago)03:32
apoos_maximus left03:45
Dirak joined03:47
Duikb00t joined03:52
dpyro joined03:53
orbyt_ left03:53
Duikb00t left03:57
Es0teric left03:57
alex_pa left03:58
alex_pa joined03:58
veegee left04:03
ferdna joined04:12
Shentino_Shentino04:15
nightshift left04:23
nic-hartley left04:24
fishsource joined04:25
fishsource left04:27
fishsauce joined04:27
misuto left04:32
dviola left04:34
Cabanoss- left04:36
dviola joined04:44
Cabanossi joined04:46
z8z joined04:50
mowcat left05:01
pks_ joined05:01
pks left05:03
pks_pks05:03
bashfulshell left05:03
yonder left05:11
duderonomy joined05:14
yonder joined05:15
dpyro left05:15
wcstok left05:20
hofmann3900 joined05:33
thiago left05:37
GreenJello left05:39
motoko-chan left05:43
thejunkjon joined05:44
thejunkjon is there a way to get a submodule's submodules?05:44
I do a git pull --recurse-submodules05:45
and it only seems to do one level05:45
inkbottle left05:45
_ikke_ git submodule update --init --recursive05:48
irqq left05:48
carb0n_ joined05:52
finalbeta joined05:55
dviola left06:06
fatalhalt left06:08
thejunkjon thanks _ikke_06:19
I should probably make that an alias06:20
NccT left06:20
learningc joined06:25
learningc left06:26
learningc joined06:27
sydbarret left06:28
al-damiri left06:30
shabius joined06:31
Bobdude left06:31
shabius_ left06:33
hotbobby joined06:43
hotbobby i made a .git to track the mainline linux kernel. when i git pull it says it's up to date but all objects are still in the .git folder, not in the directory i git init'd from06:43
how can i get a copy of FETCH_HEAD's objects in the directory i git init'd from?06:44
gxt left06:46
hotbobby the data i want is in src/.git/objects/pack and i just want a copy of the repo in src06:47
tsdh joined06:47
hotbobby i think i need to specify a branch i want to clone?06:50
SkarmoutsosV joined06:56
Goplat left07:01
andrzejv joined07:04
learningc left07:05
learningc joined07:06
learningc left07:06
learningc joined07:07
learningc left07:07
learningc joined07:08
chele joined07:09
learningc left07:09
learningc joined07:10
learningc left07:10
learningc joined07:11
learningc left07:11
_ikke_ hotbobby: How did you create the repository?07:13
ferdna left07:14
learningc joined07:15
learningc left07:16
learningc joined07:18
learningc left07:18
learningc joined07:18
wateriswet joined07:18
wateriswet left07:18
sQVe joined07:19
learningc left07:19
wateriswet joined07:19
Es0teric joined07:19
learningc joined07:20
troyt left07:21
rsrx joined07:24
Duikb00t joined07:24
gambl0r3 left07:29
learningc what is the difference between a detached head and normal head?07:32
dre_ joined07:33
_ikke_ learningc: a detached HEAD means that HEAD points to a commit in stead of a branch07:33
Whenever you checkout anything that is not a branch, HEAD will become detached07:33
Makaveli7 joined07:36
mescalinum joined07:47
Noti joined07:48
satifant joined07:48
jas4711 joined07:49
n3wborn joined07:50
alex_pa left07:51
Serus left07:54
hotbobby _ikke_: git init, git remote add origin https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git07:54
jelmer left07:55
hotbobby then tried things like git clone, git pull, git fetch origin v5.1-rc2 etc07:55
osse git fetch downloads stuff. git pull does fetch plus merge, but there is nothing to merge into07:56
oxymoron93 joined07:56
osse you probably want to git checkout something07:56
Duikb00t left07:56
osse what you're doing is essentually what clone does, but manually07:56
hotbobby checkout will unpack a tag into the directory?07:56
osse yes07:56
hotbobby i could just git clone $url but then i cant just go to the directory and update it easily07:57
unless i can clone into the same folder i previously did and it will only grab differences? trying to get around downloading 1.4GB after every commit to mainline07:57
Serus joined07:57
jelmer joined07:57
osse sounds like you're misunderstanding git. after a successfull git clone you never use clone again. you use fetch to get updates07:58
learningc left07:58
SkarmoutsosV left07:58
hotbobby wow!07:58
that is exactly what i want to do , thank you07:59
learningc joined07:59
Es0teric left08:02
hotbobby how come i can fetch even though there is no .git? meaning how does it know where to fetch from08:02
ah, config file i see :)08:04
osse there is a .git08:04
git rev-parse --git-dir will show you where it is08:04
hotbobby https://pastebin.com/raw/s9s0utGz its a bit different than you said, that command also has no output08:05
oxymoron93 you are in it08:06
osse hotbobby: that command prints "."08:06
meaning the current directory is the .git directory08:06
hotbobby so i need to make a new folder in here then checkout?08:06
osse no08:07
what did you do exactly?08:07
hotbobby git clone "mainline kernel url" in a new directory08:07
the only step08:07
osse then you should already have a bunch of files immediately above where you are now08:08
hotbobby yes!08:09
wow ok. sorry, i think i get it now :o08:09
thanks for being patient and for all of your help08:09
i can even git status from here even though my .git folder is not even .git, it's accidently the name of the folder i wanted to clone the objects into08:11
osse go into where the source code of the kernel is, then run these commands;08:12
git rev-parse --show-toplevel08:12
git rev-parse --git-dir08:12
mikecmpbll joined08:13
hotbobby https://pastebin.com/raw/PWbEJr7h08:14
it looks like i have two copies of it08:14
osse everything looks normal to me08:15
source code is at /home/nick/src/linux-mainline-acs/src/linux-mainline-acs and the magic git stuff is in /home/nick/src/linux-mainline-acs/src/linux-mainline-acs/.git08:15
dre_ left08:15
hotbobby so ~/linux-mainline-acs is the copy of the entire repo, and ~/linux-mainline-acs/src/linux-mainline-acs is the latest objects08:15
_ikke_ The latter is called your working tree08:16
kernel-sanders joined08:16
osse hotbobby: the first one is irrelevant08:16
lowbro joined08:17
hotbobby oh so i can move the one inside of src/ to where i want it to be all along and delete everything else08:18
osse yes08:18
move the whole directory so that you also move .git with it08:18
Es0teric joined08:18
osse mv /home/nick/src/linux-mainline-acs/src/linux-mainline-acs somewhere08:19
hotbobby yes, no /* at the end i see08:21
im happy i have a folder i can git fetch from. ive been downloading the whole thing each time forever.. this will save me a lot of time in the future im very grateful for the walkthrough08:22
mimajof joined08:22
learningc _ikke_, but a branch point to the last commit? Or to all commits of that branch?08:26
Es0teric left08:26
exorades joined08:31
cbreak a branch points to a single commit08:32
dege joined08:33
fishsauce left08:39
xcm left08:41
xcm joined08:43
JimDungo joined08:44
st-gourichon-f left08:45
YuGiOhJCJ joined08:46
jelmer left08:47
staafl_ joined08:48
rsrx left08:48
rsrx joined08:48
jelmer joined08:49
libertyprime joined08:50
st-gourichon-fid joined08:51
threenuc joined08:51
Es0teric joined08:56
sozuba joined08:57
Es0teric left09:00
T_UNIX joined09:01
twb left09:01
wateriswet left09:02
kjartan left09:04
Noti left09:05
fishsauce joined09:07
kjartan joined09:09
esrse left09:16
wateriswet joined09:18
yonder left09:19
lembron joined09:22
Lucas_Gray joined09:24
kerframil left09:24
Dirak left09:25
clime joined09:28
learningc left09:29
lembron hi there, for-each-ref & merge-base are fudging me... given the following tree: https://i.imgur.com/UkeDvJ8.png -- "known" is 'dev' - worktarget is the 'tarchild-*' tree ||| how can i get "all branchnames in that tree"? ---- merge-base is fine to find master, but then for-each-ref doesnt filter as expected ;/ -- say, contains "newchild" while it shouldnt (--no-merged dev), or also contains09:29
"oldchild" when going via contains :/09:29
learningc joined09:29
thejunkjon left09:30
learningc left09:30
learningc joined09:31
lembron tldr: "get all branches on a tree"? - know my start&end points, "missing leafs (tarchild-two-sub)" would even be okay....09:31
so from input "dev + tarchild-tree" -- wanted output: "tarchild-one tarchild-two tarchild-tree" -- and im already happy.09:32
exorades left09:33
osse lembron: what does git for-each-ref --merged tarchild-three --contains $(git merge-base dev tarchild-three) print ?09:34
yyy joined09:34
xcpep joined09:36
hellauer joined09:39
lembron osse hm, that seems about right, or better indeed... - still contains "master" (from the mergebase i guess) ill need to filter away - but "tarchild-one tarchild-three tarchild-two" looks better-ish09:39
made2591 joined09:40
made2591 left09:40
lembron order is screwed up, but a lot of the "Junk" is gone indeed =)09:40
osse order is probably alphabetic09:41
mescalinum left09:43
Brilpikk3wyn joined09:43
theoceaniscool joined09:44
Brilpikk3wyn left09:44
Es0teric joined09:44
mescalinum joined09:45
duderonomy left09:46
osse lembron: you can try specify --no-contains master09:46
lembron well, "master" is not a given... just "bad luck" that the merge-base commit sits right there in this case...09:47
cd left09:48
Lucas_Gray left09:49
Lucas_Gray joined09:49
osse Since it is the merge base it will always be sitting right there, no?09:51
sozuba left09:53
sozuba joined09:53
lembron hm, while the man-page mentions a magic-sort "version:refname" that doesnt seem to have wanted effect ether...09:54
osse these names don't exactly follow a version-like scheme09:55
tarkus joined09:57
Es0teric left09:57
yyy left09:58
lembron can i maybe get "list of commits between two hashes"? - then i could tree-walk them and pick up branches on the way or so...09:58
AlHafoudh left09:59
laerte left09:59
Mech0z joined09:59
laerte joined09:59
osse git rev-list foo..bar09:59
Mech0z I am trying to use BFG to cleanup some big files from my repo, but my push to a new repository is being rejected by bitbucket "remote: You are attempting to update refs that are reserved for Bitbucket's pull request functionality. Bitbucket manages these refs automatically, and they may not be updated by users. remote: Rejected refs: remote: refs/pull-requests/2/from"10:00
I have found https://community.atlassian.com/t5/Bitbucket-questions/Bitbucket-reserved-refs-when-cleaning-up-with-BFG-tool/qaq-p/70296910:00
which states I ahve to run "git show-ref | cut -d' ' -f2 | grep 'pull-request' | xargs -r -L1 git update-ref -d" but that dont seem to work on windows, is there a similar command for that for windows10:01
osse lembron: branches point to commits, not the other way around, so you cannot exactly "pick up" branches that way.10:01
Mech0z grep seems like a unix command10:01
osse you'd have to check which branches point to that commit, for each commit10:01
laerte left10:01
bebbet left10:02
bebbet joined10:03
lankanmon left10:03
laerte joined10:04
yuriii joined10:04
apoos_maximus joined10:05
exorades joined10:07
kapil____ joined10:08
osse Mech0z: you should be able to run that command from Git Bash10:09
Mech0z: other than that, on windows there's a program called findstr that works basically the same way10:09
fishsauce left10:10
Mech0z osse git bash works10:10
z8z left10:26
wateriswet left10:27
exorades left10:28
mikecmpbll left10:30
finalbeta left10:30
Noti joined10:30
finalbeta joined10:30
rocketmagnet joined10:37
rocketmagnet hi everyone, how can i get the hash of a certain repo/tag ?10:38
hellauer left10:38
_ikke_ rocketmagnet: what do you mean with repo/tag?10:38
exorades joined10:39
rocketmagnet i need the hash of a repo with the tag 5.1.210:39
_ikke_ Do you have that repo locally?10:39
rocketmagnet no10:39
_ikke_ git ls-remote <remote-url> refs/tags/5.1.210:40
rocketmagnet gives me no output10:41
jast then that tag doesn't exist in that remote repository10:41
_ikke_ git ls-remote <remote-url> | grep -F 5.2.110:41
rocketmagnet git ls-remote https://github.com/qt/qt5.git refs/tag/5.1.2 gives me no output10:42
jast btw if it's an annotated tag, this will give you the hash of the tag object, not the hash of the tagged commit)10:42
osse rocketmagnet: you're missing the v in front of the tag10:42
jast the tag is called v5.1.2, not 5.1.210:42
rocketmagnet ah ok10:42
still no output10:42
User_ joined10:43
rocketmagnet git ls-remote https://github.com/qt/qt5.git refs/tag/v5.12 gives me no output10:43
jast oh, there is no 5.1.210:43
osse rocketmagnet: now you're missing the .0 at the end10:43
jast 5.12.0 doesn't exist, either (still in beta)10:43
rocketmagnet no output =(10:44
jast the newest stable tags are v5.11.2 and v5.9.710:44
osse works here10:44
git ls-remote https://github.com/qt/qt5.git refs/tags/v5.12.010:44
jast oh, huh... works for me too, but doesn't show up in the web interface10:44
n3wborn left10:44
osse v5.12.2 is out, even10:44
jast oh never mind, I was doing dumb things in the web interface10:45
anyway, you can just view all the tags in your browser, it shows you the commit info, too: https://github.com/qt/qt5/tags10:45
wateriswet joined10:45
rocketmagnet git ls-remote https://github.com/qt/qt5.git refs/tag/v5.12.0 gives me no output10:45
jast refs/tags, not refs/tag10:46
learningc left10:47
rocketmagnet thanks10:47
hyperair left10:47
rocketmagnet when i've checked out 5.11.0, how to make git checkout 5.12.0 ?10:48
jelmer left10:48
jast just insert the missing 'v' and you should be good (you may need to run 'git fetch' to make sure your local repo's metadata is up-to-date)10:49
jelmer joined10:49
rocketmagnet in the repo dir: git fetch v5.12.0 gives me an error telling me that's not an git repo10:50
_ikke_ Just git fetch10:50
rocketmagnet but i need 5.12.010:50
v5.12.010:50
_ikke_ git fetch will fetch everything that is available10:50
jast are you sure you have a repo clone there, or is it just an unpacked archive maybe?10:50
_ikke_ ah right, that's the first issue10:51
jast oh, my bad10:51
yeah, 'git fetch' without arguments10:51
error confused me for a bit :)10:51
_ikke_ heh10:51
User_ left10:53
made2591 joined10:55
rocketmagnet thanks10:55
tarkus left10:57
yyy joined10:58
irqq joined10:59
made2591 left11:00
JimDungo left11:05
threenuc left11:05
Noti left11:07
emsjessec joined11:08
mikecmpbll joined11:08
clime is it possible to get "easily" parsable list of HEAD commit hashes of submodules for particular commit in the superproject?11:09
Noti joined11:10
clime e.g. git submodule gives me +<HEAD hash> <path to submodule> <something>11:13
but i need the latest HEAD in a submodule that _has_ been committed already11:14
cbreak left11:15
cbreak joined11:16
lankanmon joined11:16
jast clime: git ls-tree -r <commit> | grep commit11:17
clime oh ls-tree11:17
jast yeah, the submodule commit hash is stored inside the tree object for that path11:18
exorades left11:18
Makaveli7 left11:18
clime jast: great thanks11:20
tombusby left11:25
tombusby joined11:25
apoos_maximus left11:26
exorades joined11:27
clime i assume i can also use git ls-tree -r <commit> | grep 16000011:27
YuGiOhJCJ left11:28
cdown joined11:30
F0rTex left11:31
F0rTex joined11:33
jast clime: sure - but I don't think it has any advantage11:34
if you want to be sure there are no false positives, I guess grepping for ^160000 is better11:34
clime right11:41
mescalinum left11:44
mescalinum joined11:44
tarkus joined11:45
osse that won't work for recursive submodules though11:48
clime osse: they have different mode?11:48
or they do not appear in the list at all...?11:48
probably the latter11:49
osse yes the latter11:49
SCHAAP137 left11:49
lembron hmpf, im not getting on a golden tree there... when all i want is having a simpler "rebase that whole tree" command than doing it one-by-one... https://github.com/nornagon/git-rebase-all kinda gets close-"ish", but tries to hack that via some merge and then breaks itself ;D11:49
"octomerge doesnt survive the rebase" seems to be the main curlpit - but there are some more issues with that branch discovery there it seems... (getting ALL childs inc. master and dev themself, so that octomerge is super-havoc), manually shifting fixes the first, but leaves the octo-issue11:52
clime ok, that's fun11:52
so i need to basically do DFS/BFS search on submodules (until i reach the one i am looking for)11:52
in bash11:52
SCHAPiE joined11:54
clime lol, ok11:54
threenuc joined11:56
laerte left11:56
jast lembron: that seems rather unreliable... it would fail whenever one of the branches is made redundant by the changes in the upstream branch11:56
laerte joined11:56
Mattiaslndstrm joined11:56
jast I don't think it makes any sense to do this, anyway11:57
it doesn't really reduce the number of conflicts you have to address, or anything11:57
lembron "sense" = upstream is ff-only -- so everythign HAS to be pulled up to "dev" -- usecase https://i.imgur.com/UkeDvJ8.png11:58
jast honestly I think I'd just do something similar but loop over the branches instead of trying to do it all at once11:58
I have no idea how that is related to what I said ;)11:58
lembron > similar and loop --- kinda... guess the nice thing with the octomerge there is that it uses that as marker for "--continue" and such - and would -technically- make it work with the sub-forks too -- what would go a bit ham in a simple "for branch ontop of next; do..."12:02
threenuc left12:05
SkarmoutsosV joined12:05
threenuc joined12:06
elichai2 joined12:09
elichai2 Hey, I have branch 1 that contains commit A, branch 2 that contains A->B, and 3 with A->B->C, now I added to branch 1 the commit W so now it's A->W, I rebased branch 2 ontop of 1 (A->W->B), how do I rebase branch 3 ontop of 2?12:11
if I just rebase will it give me B twice?12:11
stamina joined12:11
apoos_maximus joined12:12
ashnur morning. i have branch from which i would like to merge everything apart from a specific users' changes under a specific directory path. how can I do that? I saw how to do either separately on stackoverflow (directory with merge then checkout, and author with cherry pick) but I can't find a way that's probed and documented that would do both at once12:12
elichai2 Do I must create a new branch from 2 and cherry pick 3?12:13
oxymoron93 `git rebase --onto=branch2 branch3~ branch3` should do the job elichai212:17
elichai2 and replace `branch3~` with the oldest commit that is special to branch3?12:17
Lucas_Gray left12:20
Lucas_Gray joined12:21
oxymoron93 elichai2: <oldest commit necessary to rebase>~ , mind the tilde12:21
elichai2 because it's exclusive?12:21
oxymoron93 for example in your case, running `git log branch3~..branch` only lists C12:21
which is the only commit you want to rebase12:22
elichai2 ha, thanks, cool feature12:22
styler2go left12:24
rwb left12:25
rocketmagnet left12:25
Muzer left12:27
jim left12:28
elichai2 I'll make some sort of nice alias/wrapper to this because I have tons of subfeatures12:28
jim joined12:28
WhiskerBiscuit joined12:29
oxymoron93 elichai2: as usual https://git-scm.com/docs/git-rebase there are nice graphical presentation of various "rebases"12:30
Muzer joined12:32
ashnur so, i am thinking that from the branch that has the changes i need i create a new branch, and I checkout everything under the directory that I don't want to change just partially. then from the original changes branch i cherry pick the commits from the authors whose changes i need12:40
i can't seem to find anything simpler :( and i am not even sure this will work but something has to :D12:40
i found git-filter-branch too but the docs scare me :D12:44
threenuc left12:45
oxymoron93 yup, `git fitler-branch` seems like a job for this, but I also never used it... so yeah, you can play after all, make some backups if needed :)12:45
ashnur I started with the backup :D I am an old git (ab)user :D12:46
WhiskerBiscuit left12:50
SerialSmile joined12:51
nic-hartley joined12:54
R2robot left12:54
wateriswet left12:55
kapil____ left12:57
Raed left13:02
fury joined13:02
tarkus left13:02
shabius_ joined13:03
rsrx left13:03
wateriswet joined13:04
Raed joined13:05
libertyprime left13:06
shabius left13:06
Mech0z left13:07
howell joined13:10
exorades left13:13
fishsauce joined13:15
fishsauce left13:16
kjartan left13:17
WhiskerBiscuit joined13:18
exorades joined13:19
kjartan joined13:19
R2robot joined13:19
supernov1h joined13:20
CalebT joined13:20
justanotheruser left13:21
CalebT Hey guys, I have a design question. How can you support continuous development (i.e., you don't commit code that you know isn't ready for production) while also supporting features for integrators (i.e., you have feature_a that integrator_a is also working on; you need to allow integrator_a to test feature_a with their system befor pushing it to production)13:22
osse CalebT: branches13:23
_ikke_ CalebT: The premise that in order to support CD you cannot commit is false13:23
osse CalebT: replace "don't commit code that you know isn't ready for production" with "don't commide code that you know isn't ready for production to master"13:24
_ikke_ s/commit/merge13:24
osse both work13:24
CalebT Yeah we intend to use branches, my concern is where the environment for each of those will live13:25
So we have a "primary" trunk that goes dev -> stable -> prod and we have environments that support those and are expected to be "clean" of features, yea?13:25
stkirk left13:26
CalebT How do we then support branches with known not-prod-ready features? Should ever feature have it's own ephemeral environment that can come up and down? Can everyone work off the same "feature" environment?13:26
osse CalebT: what kind of software are we talking about?13:26
CalebT So my team writes and maintains a central service (gaming company)13:27
Our "clients" are the game teams, making new games and integrating features into their game13:27
So we provide like achievements, matchmaking, etc., to the games13:27
My concern with the hand wavy "feature branches will solve everything" answer is that we need a way for those features to be tested by "external" teams13:28
jast so am I understanding this correctly, you need your clients to be able to test non-ready features but the test instances need to run on your infrastructure?13:29
CalebT The only way I can see us doing that without spending a boatload of money for resources is to have a single dedicated "feature" environment -- but it will have work from multiple features and be integrated into by multiple game devs13:29
exorades left13:29
CalebT Yes, we don't currently have a way to run all of our services locally (some services depend on cloud resources to function fully)13:30
jast each environment has substantial overhead, I guess?13:31
each environment you're running in parallel, that is13:31
CalebT Each environment costs about $1300/mo. at rest13:31
jast dang13:31
CalebT indeed13:31
jast well, I suppose it's probably a bad idea to have multiple versions of the code run in the same environment13:31
unless your application is designed to be able to deal with that13:32
subopt joined13:32
CalebT Yeah we can't really do that, everything deployed would have to be whatever is in that branch (no way to deploy multiple sets of code to the same environment)13:34
jast I think if there's a good solution it would depend very much on the specifics of how your system works -- generally speaking I don't think there's a straightforward way to do this without basically giving clients time slices on one of your environments13:34
CalebT Yeah, I kind of think the only way to keep our main trunk clean is to have either (a) ephemeral environments that can quickly come up and go down with little effort, or (b) have a single "feature" environment that's completely split off from the main trunk, and that's where all new feature work goes to be tested by the game devs13:35
scrote joined13:36
CalebT We'd played with the idea that we could put a "integration" environment in our main trunk somewhere, but in my mind that breaks CD?13:36
scrote hello.13:36
mowcat joined13:36
scrote I have project with a detached HEAD. how do I point it to master?13:36
osse scrote: how did you become detached?13:36
justanotheruser joined13:36
scrote This project was given to me.13:37
jast CalebT: if it means different code, at the very least it would seem like a terrible hack :)13:37
scrote: if you haven't committed on top of the detached HEAD, or at least nothing you'd like to keep, simply 'git checkout master'13:37
_ikke_ scrote: git checkout master13:37
scrote ok thanks.13:38
oxymoron93 and to inspect whether you have modified changes or not run: `git status`13:38
jast though depending on how someone else messed it up for you, there might be a rebase or merge in progress13:38
CalebT jast: It wouldn't necessarily be different, it'd just be introducting a step in our development pipeline that requires explicit user intervention and testing before going any higher13:38
jast CalebT: if it's a different branch I think, in terms of repo structure, that's probably okay. the problem: basically if you have a test environment and merge a combination of changes there to test them, there is a small risk that merging a different combination to your stable/production branch will behave differently13:40
supernov1h left13:40
jast I think of it as patch algebra: if you test a combination of two patches but deploy only one, there is no way to know for certain that the one will work on its own (without fully understanding the effects of both of them, which is a tall order)13:41
deploy = move forward in the pipeline13:41
mescalin_ joined13:42
justanotheruser left13:42
carb0n_ left13:43
mescalinum left13:43
CalebT I agree, yeah - it's hard to see this being an ideal workflow without truly ephemeral environments for each feature. I know this is a solved problem, I just don't know what that solution is. Like I'm sure Facebook doesn't have every developer spin up a dedicated environment to test their changes before commiting to the main dev trunk13:43
osse CalebT: I would aim for (a) here. VMs and such?13:43
sergmartidi joined13:43
jungsubk joined13:43
CalebT (a) is ideal, I agree - it's just a challenge to make environments easily spun up and tore down at will13:44
jast it is... but it has many advantages :)13:48
where I work we use local VMs like crazy and if we wanted, we could easily set up public instances based on arbitrary versions, too13:49
osse throw longshoremen at the prolem13:49
*problem13:49
learningc joined13:50
bsanford joined13:53
sergmartidi left13:53
CalebT The other problem there is that will take 6 months or more of effort to get working. So until then, we need a bandaid of sorts13:56
Can anyone think of a major issue with having a dedicated "feature" environment (so an environment that would have multiple feature_x branches deployed to it at any given time) -- and if a feature needs to be tested with the external team prior to hitting our main trunk (dev -> stable -> prod), it gets deployed there13:57
I know it's not *ideal*, but are there any super major issues I should try to account for in that workflow?13:57
shabius joined13:57
jottr joined13:58
rafasc joined14:00
shabius_ left14:00
Beam_Inn left14:05
bsanford left14:06
kgirthofer joined14:08
m1sosoup joined14:08
kgirthofer morning - why when I do git branches -a I get a nice list of all the branches, but if I do branches=$(git branch -a) it also includes the files in the current directory?14:08
oxymoron93 what is `git branches` ?14:10
osse kgirthofer: because you don't quote $branches when printing it14:10
oxymoron93 aha right14:11
kgirthofer ah rad14:11
thanks14:11
rafasc because git branches was never meant to be parsed.14:11
use for-each-ref instead.14:11
kgirthofer oh perfect14:11
thanks rafasc14:11
mattcen left14:14
rafasc $git for-each-ref refs/remotes refs/heads, for the branches -a equivalent.14:14
sandlotasn left14:15
mattcen joined14:17
Es0teric joined14:21
Es0teric left14:21
Es0teric joined14:24
Silenced joined14:27
slothtrop joined14:29
sbeyer joined14:31
slothtrop left14:32
matheustavares left14:32
loc left14:33
nic-hartley left14:34
voidSurfr joined14:34
CalebT left14:34
toothlessg joined14:35
oojacoboo joined14:37
loc joined14:38
clime i am using this to get the current branch name: basename "$(git symbolic-ref HEAD )" ... anyone knows a better/different method?14:40
osse git symbolic-ref --short HEAD14:40
clime osse: thanks14:41
matheustavares joined14:41
benharri git rev-parse --abbrev-ref HEAD14:41
should work too14:41
clime benharri: thx14:42
benharri not sure if one is preferred over the other14:43
foo left14:43
rafasc clime: ask again in a couple of days, and the answer will be probably git branch --show-current;14:44
clime rafasc: cool, i will ask in about half a year when i have the new git ;)14:44
no offense14:45
rafasc https://github.com/git/git/blob/041f5ea1cf987a4068ef5f39ba0a09be85952064/Documentation/RelNotes/2.22.0.txt#L2514:45
clime alright that will be quite soon then :)14:46
\o/14:46
spacesuitdiver joined14:46
rafasc although, it lives in a gray area, in regards of being ok for script use.14:47
Lucas_Gray left14:47
learningc left14:50
Lucas_Gray joined14:52
exorades joined14:52
Puffball joined14:52
exorades left14:54
jast for scripts I'd use one of the existing ones14:54
exorades joined14:55
bluezone joined14:55
rafasc I think that's the most sensible.14:56
mattcen left14:58
Wryhder joined14:58
Lucas_Gray left14:59
WryhderLucas_Gray14:59
SerialSmile left15:00
kgirthofer left15:01
johnstonf left15:02
CodeSlingerPaul joined15:02
subopt left15:03
tang^ joined15:06
mattcen joined15:08
exorades_ joined15:09
exorades left15:10
Lucas_Gray left15:10
threenuc joined15:11
Lucas_Gray joined15:11
deltam left15:13
Regon joined15:13
deltam joined15:14
Makaveli7 joined15:15
Noti left15:18
nic-hartley joined15:18
Lucas_Gray left15:18
Lucas_Gray joined15:19
clime left15:21
spacesuitdiver left15:23
oxymoron93 left15:24
inkbottle joined15:25
rocketmagnet joined15:27
rocketmagnet hi everyone15:28
rafasc hi rocketmagnet!15:28
rocketmagnet when i want to revert my hole repository to a certain commit, how can i do that ?15:28
rafasc !undo15:28
gitinfo [!fixup] So you lost or broke something or need to otherwise find, fix, or delete commits? Look at http://sethrobertson.github.com/GitFixUm/ for full instructions, or !fixup_hints for the tl;dr. Warning: changing old commits will require you to !rewrite published history!15:28
rafasc !revert15:29
gitinfo That's a rather ambiguous question... options: a) make a commit that "undoes" the effects of an earlier commit [man git-revert]; b) discard uncommitted changes in the working tree [git reset --hard]; c) undo committing [git reset --soft HEAD^]; d) restore staged versions of files [git checkout -p]; e) move the current branch to a different point(possibly losing commits)[git reset --hard $COMMIT]?15:29
sydbarret joined15:29
robertparkerx joined15:30
jottr left15:31
WhiskerBiscuit left15:32
WhiskerBiscuit joined15:32
rocketmagnet hmm git reset commit-id does not work15:34
i want the hole repo to be in the same state as it where when i commited15:35
wateriswet left15:36
jottr joined15:36
rafasc with or without discarding local changes?15:36
czart joined15:37
rocketmagnet i don't need the changes15:37
rafasc then follow option e)15:37
It will delete any uncommitted work without possibility of recovery.15:38
So, be sure that's what you want.15:38
exorades_ left15:39
exorades joined15:40
Mattiaslndstrm left15:41
mescalin_ left15:44
dviola joined15:45
mescalinum joined15:47
Lucas_Gray left15:48
andrzejv left15:49
AtumT joined15:49
Lucas_Gray joined15:51
esotericnonsense left15:52
gracecr joined15:53
dpyro joined15:54
threenuc left15:54
dpyro left15:55
Lucas_Gray left15:57
GreenJello joined15:57
yaoxu joined16:07
gambl0r3 joined16:09
egovirus joined16:10
sQVe left16:11
SkarmoutsosV left16:12
jakogut joined16:15
aako__ joined16:17
egovirus left16:17
fatalhalt joined16:19
renich joined16:19
renich left16:20
subopt joined16:21
renich joined16:21
renich left16:22
durham joined16:23
Mattiaslndstrm joined16:23
renich joined16:23
yaoxu left16:28
durham left16:28
yaoxu joined16:28
yaoxu left16:29
yaoxu joined16:29
eegad left16:30
jungsubk left16:31
DaGoaty joined16:32
jungsubk joined16:32
DaGoaty left16:33
DaGoaty joined16:33
gambl0r3 left16:34
Envil joined16:37
iam730 joined16:39
causa_sui joined16:41
dviola left16:42
esotericnonsense joined16:45
robertparkerx left16:45
boombatower joined16:47
wadadli what do I pass to user.signingkey16:47
the sig or the keygrip?16:47
aako__ left16:48
yaoxu left16:48
egovirus joined16:48
cdown left16:49
robertparkerx joined16:50
esotericnonsense left16:50
wadadli ah the fingerprint16:50
rafasc wadadli: have you read the documnentation of it?16:50
"... you may specify a key using any method that gpg supports."16:50
orbyt_ joined16:51
sweatsuit left16:51
blackandblue joined16:51
wadadli OH :P16:51
chele left16:52
z1haze joined16:52
duderonomy joined16:52
Jackneill left16:52
z1haze im trying to squash down a branch into a single commit because it will be a lot easie to merge in -- but the developer merged another branch in a while back and it seems that im unable to squash beyond that point16:52
can anyone help me out?16:52
rafasc z1haze: I think your expectation is broken. Squashing a branch doesn't make it easier to merge in.16:53
z1haze well it helps me16:54
instead of fixing conflicts in commits, i fix them in 1 commit16:54
wadadli broken expectations. RIP.16:54
z1haze i do it all the time so i mean what helps me may not help you, doesnt make it broken16:54
rafasc z1haze: with merge you only fix them in 1 commit. The merge commit.16:55
z1haze is there a reason though i cannot squash a merge commit16:55
Jackneill joined16:55
Inline joined16:56
z1haze rafasc, yeah, but when rebasing you have to step through every commit16:56
so i want this branch to be rebased before its merged, and i prefer only having to rebase a single commit instead of 5016:57
lowbro left16:57
rafasc z1haze: when you merge changes, git tries to find a common parent and merge the changes since then. In other words, the squash is not picking up past changes because those changes are probably already merged in.16:57
nowhere_man joined16:57
orbyt_ left16:57
sweatsuit joined16:57
z1haze so there's really no way to get past this merge commit to continue squashing?16:57
i guess can explain the actual issue, but its not really complicated -- there is a feature branch that has been worked on for a long time, but its very diverged, and there a tons of conflicts16:58
im trying to get that branch rebased onto master to get it up to date, but there are so many conflicts the rebase is hell16:58
nic-hartley left16:59
z1haze so i normally just create a new branch and squash the commits, then rebase the squashed branch and handle the conflicts 1 time16:59
nic-hartley joined16:59
thiago joined17:04
rafasc I assumed you were using merge --squash, If you are using rebase you can just try making the branch as you do, then use git rebase -i <COMMIT>; where commit is the parent of the first commit you squash. Then s/pick/fixup/.17:05
after that you will end up with a single commit you can try to merge, cherry-pick, or even rebase again on top of the desired target.17:06
nowhere_man left17:06
rafasc you can do it in one go, $git rebase --interactive --onto target COMMIT long-lived-branch-to-be-squashed.17:07
gambl0r3 joined17:13
yyy left17:13
z1haze rafsac i do, but it doesnt let me on a merge commit for some reason17:13
jakogut left17:14
hahuang65 left17:17
rafasc !errors17:17
or maybe !situation17:18
gitinfo Please post the url returned by `git log -n 20 --all --graph --format="%h %p %d %s" | curl -F text=@- https://upaste.de/` to give us an idea about what your situation is (increase the -n argument if your problem is more complex than 20 commits can explain)17:18
rafasc rebase flattens history, So you probably seeing a side effect of that.17:19
jakogut joined17:19
Silenced left17:21
al-damiri joined17:24
sunri5e left17:25
kjartan left17:27
beefjoe joined17:27
sunri5e joined17:27
z1haze so what's after <<<< is the current commit and after ==== is the previous commit, right?17:28
Tweth-U-PDS joined17:28
kjartan joined17:29
m1sosoup left17:29
rafasc keep in mind that due how rebase works, the sides of the conflict may look like they're swapped.17:30
xcm left17:32
Tweth-U-PDS I'm having an issue, and wondering if it's user error... log shows the LAST commit added a function (via a merge), but that function is not in the source file. Or is there some kind of obscure merge-bug I've hit? *confused*17:32
rafasc z1haze: why don't you try a --squash merge? Because that's your end goal right? Just having a single commit on top of master?17:32
xcm joined17:32
z1haze that is the end goal - am just unfamiliar17:33
ill try it17:33
exorades left17:33
rafasc z1haze: git checkout master; git merge --squash otherbranch; fix conflicts, git merge --continue;17:34
z1haze well definitely dont want to merge into master17:34
esotericnonsense joined17:34
z1haze but i get your point17:34
rafasc git checkout -b not-master master; git merge --squash otherbranch; ;)17:35
z1haze ya, lol i understand17:35
mikecmpbll left17:36
Tweth-U-PDS left17:37
stennowork joined17:37
stennowork good day, assuming that i have a remote repository, how can i merge a tag (say, 3.1.4) into my local branch?17:38
i tried: git merge oro/3.1.4 but it tells me that it is not something we can merge17:38
'oro' is the name of the remote repo17:38
rafasc git fetch --tags; git merge 3.1.4;17:38
that will fetch all tags from 'oro' into your tags though.17:39
stennowork ah thanks, strange17:39
it worked17:39
rafasc stennowork: tags unlike branches do not get namespaced.17:40
So when you used oro/3.1.4, it tried to merge a remote branch named 3.1.4, which doesn't exist.17:41
stennowork gotcha17:41
rsrx joined17:41
rafasc another way you could've done it without polluting your local tag namespace would be to fetch the tag directly into a branch.17:41
stennowork git fetch 3.1.4 ?17:41
fstd left17:42
rafasc git fetch oro refs/tags/3.1.4:refs/heads/my-3.1.417:42
fstd joined17:42
stennowork hmm i see17:42
opalepatrick joined17:42
wootehfoot joined17:43
mescalinum left17:44
bhelgaas is there a way to have "git send-email --compose" include a diffstat in the cover letter template? i know about "git format-patch --stat", but i'd like to do this in one step instead of "format-patch + send-email"17:48
nowhere_man joined17:49
Mattiaslndstrm left17:49
mescalinum joined17:49
Hello71 why not17:50
you can write a script to do it if you want17:51
orbyt_ joined17:51
Mattiaslndstrm joined17:51
Hello71 also I'm pretty sure you can pass --stat to send-email if you also pass a rev-list17:51
according to the man page17:51
man git-send-email17:52
gitinfo the git-send-email manpage is available at https://gitirc.eu/git-send-email.html17:52
gracecr left17:52
gracecr joined17:52
Dirak joined17:52
orbyt_ left17:56
_gracecr_ joined17:57
bhelgaas i don't see "--stat" mentioned on the man page, and "git send-email --compose --stat master" doesn't work for me (2.21.0.392)17:57
made2591 joined17:57
gracecr left17:57
rafasc --stat will work, but will add it as annotations (after --- of each patch).17:57
bhelgaas: try git send-email --annotate --cover-letter --stat <revision>18:00
The trick is asking format-patch to write the cover-letter for you.18:01
cliluw joined18:02
made2591 left18:02
Sasazuka joined18:04
bhelgaas rafasc: aah, that's perfect, thank you! it's quite embarrassing how long i spent looking for something like that :)18:04
threenuc joined18:04
xcm left18:05
xcm joined18:05
thiago left18:05
thiago joined18:05
beefjoe left18:06
elichai2 left18:08
TomyLobo joined18:08
DaGoaty left18:10
Chex left18:11
kreyren joined18:11
threenuc left18:13
mimajof left18:16
irqq left18:16
robertparkerx left18:16
jrnieder rafasc, bhelgaas: patch to Documentation/git-send-email.txt please? ;-)18:16
SkarmoutsosV joined18:17
dysfigured left18:18
dysfigured joined18:19
sauvin left18:24
mescalin_ joined18:25
mescalinum left18:26
stennowork left18:27
[rg] joined18:33
[rg] can I merge an untracked file and a staged file18:33
causa_sui left18:37
hahuang65 joined18:40
rafasc [rg]: you can make temporary copies of them and use git merge-file; something like: git cat-file blob :0:LICENSE; can be used to retrieve the staged version.18:40
xmate joined18:40
jottr left18:40
orbyt_ joined18:41
[rg] ok18:41
thanks mate18:41
xcm left18:42
rafasc merge-file needs a common ancestor, the file at HEAD is probably the right one.18:42
xcm joined18:43
Kobaz i'm on the 2.0 branch, and the master branch is behind, is there a way to 'git pull' without doing a checkout and switching to master18:44
mikecmpbll joined18:46
rafasc [rg]: git merge-file LICENSE <(git cat-file blob HEAD:LICENSE) <(git cat-file blob :0:LICENSE); if your sell supports process substitution.18:46
cliluw left18:47
nightshift joined18:47
cliluw joined18:48
cliluw left18:49
causa_sui joined18:49
cliluw joined18:50
rafasc jrnieder: what do you think failed here? git-send-email.txt not being clear about supporting format-patch options, or --compose/--annotate not mentioning it can compose messages generated by --cover-letter? I figured the solution of the problem, but I have trouble putting it into words in english.18:51
CCDelivery joined18:51
rafasc Kobaz: !pull18:51
gitinfo Kobaz: pull=fetch+merge (or with flags/config also fetch+rebase). It is thus *not* the opposite of push in any sense. A good article that explains the difference between fetch and pull: http://longair.net/blog/2009/04/16/git-fetch-and-merge/18:51
CCDelivery left18:52
rafasc you can just fetch now, and merge the next time you checkout master. Merge needs a worktree to work, so you need to check it out.18:53
_gracecr_ left18:53
made2591 joined18:53
yyy joined18:53
_gracecr_ joined18:53
rafasc One workaround is to add a new $git worktree; and do the pull there. worktree allows having multiple branches checked out simultaneously.18:54
WhiskerBiscuit left18:55
nic-hartley left18:55
plexigras joined18:56
Kobaz k, that's what i figured18:56
xmate left18:56
xcm left18:57
nic-hartley joined18:57
xcm joined18:57
Mattiaslndstrm left18:58
devster31 left18:59
made2591 left18:59
pks left19:00
T_UNIX left19:00
orbyt_ left19:01
rossome joined19:03
devster31 joined19:03
lucasb joined19:04
pks joined19:04
v0lksman joined19:07
DisruptiveNL joined19:07
v0lksman I've made a merge on a remote system. now I want to clone my repo over that remote again to bring it back to sync with my master repo. Is that possible without deleting the directory structure? Like can I just issue the clone command again and it will overwrite the changed files?19:08
theoceaniscool left19:08
subopt left19:10
yoh _ikke_: what else should/could I try about my problem with Bad file descriptor on NFS mounted partition? I've tried already with --threads=1, and --max-pack-size=100M -a -d19:10
subopt joined19:11
subopt left19:12
sydbarret left19:14
borkr joined19:15
tarkus joined19:16
rafasc v0lksman: you clone the repository once, then pull to update it.19:17
v0lksman rafasc: yeah but I made a bunch of changes that I don't want to keep but they are staged for commit. How can I roll that back without deleting and re-cloning...I can't reset I don't think cause I have history built up due to the merge (this is all isolated though. I didn't share that or push/pull it)19:19
_ikke_ yoh: Why do you think those kind of options would solve thie issue?19:19
jottr joined19:19
jrnieder rafasc: most likely an example in the EXAMPLES section would take care of it19:19
_ikke_ yoh: what basically happens is: fd = open(...); write(fd) -> EBADF19:20
You open a file, try to write to it, system complains19:20
Phylock joined19:20
threenuc joined19:20
yyy left19:21
yyy joined19:21
rsrx left19:21
nowhere_man left19:23
tarkus Q: What would be the easiest way to get date from the last commit? show -s --format=?? ... I need it to generate app version number such as 2019.03.25.4fa80b319:24
Mattiaslndstrm joined19:26
v0lksman reset19:26
acercle joined19:26
v0lksman that's what I was looking for19:26
jrnieder tarkus: check out "git help describe"19:26
yoh _ikke_: I was just checking anything possible and others reported possibly addressing similar issues in the past19:27
jrnieder tarkus: for extracting information from a commit, check out "git diff-tree -s --always --format=%s HEAD"19:28
yoh _ikke_: I see that all those .git/objects/pack/tmp_pack_* 0-sized files are read-only (write bit is not set)19:28
irqq joined19:28
yoh is that normal? umask is 02219:28
libertyprime joined19:29
yoh touching a file there makes it writeable. So I wonder how it turns readonly?19:29
clarifiction: touching a NEW file there makes it writeable19:30
_ikke_ yoh: Does it only happen on an nfs share?19:30
mattcen left19:31
tarkus git show -s --format="%cd+%t" --date=format:"%Y.%m.%d"19:33
Envil left19:35
mattcen joined19:36
jungsubk left19:36
mikecmpbll left19:37
emsjessec left19:38
jottr left19:39
yoh _ikke_: well -- it only happens for that repo. I have others, and I think I am not experiencing the same behavior. But this one might be the largest. but let me check19:40
duncan1 joined19:40
yoh _ikke_: crap - got kicked out again. might take awhile to get back on it, but I will check19:40
libertyprime left19:42
jungsubk joined19:42
cliluw left19:43
logithack left19:43
czart left19:44
logithack joined19:44
cliluw joined19:47
jstimm joined19:50
[rg] left19:51
cdown joined19:51
jottr joined19:53
causa_sui left19:53
cdown_ joined19:53
dviola joined19:54
cdown left19:56
cdown_cdown19:56
rafasc What is a good idea for tracking changes meant to go into a release-notes.txt? Keeping them in PRs, is not ideal as reverting a branch will revert the changelog. But keeping it separate is kind of a burden to maintain. The best I can come up is storing them as git-notes on the merge commits. But I am wondering how people deal with this.19:56
_ikke_ rafasc: what is wrong with reverthing changes to the changelog when reverting a branch? Doesn't reverting the branch mean the change in the changelog should be undone as well?19:57
nightshift I'm curious how that is handled too19:57
jottr left19:57
rafasc past entries shouldn't change. If I add a feature on 1.0, but revert it on 2.0, the revert should not remove the 'added feature from 1.0'19:58
orbyt_ joined19:59
_ikke_ I usually tend to create the release notes seperately20:01
I think jch has a system for that as well20:01
causa_sui joined20:01
nightshift _ikke_ I think that's what rafasc is asking about, what is your process for creating the release notes?20:01
apoos_maximus left20:02
Revan- joined20:02
_ikke_ nightshift: I just create the right before creating a release20:02
but my releases are usually not that big20:02
rafasc but what do you use to keep track of all of it? Just git log --merges?20:02
_ikke_ yes20:03
nightshift that was the missing part, the git log --merges part20:03
orbyt_ left20:03
rafasc That requires neat history.. Which sometimes doesn't exist.20:04
I've been thinking about suggesting writting them as git notes... That I could compile when a release were to be made.20:05
libertyprime joined20:06
rafasc _ikke_: So you compile it with git log --merges, and add it on the commit the version bump is made?20:06
_ikke_ usually in a release branch20:06
rafasc I still would like to have release-notes decoupled from commit messages. More often than not, commit messages are more relevant to other developers than for final users.20:08
But I still didn't find a robust way to keep track of them.20:08
Dirak left20:09
bket left20:11
bket joined20:14
meLon left20:15
m0viefreak joined20:15
Dirak joined20:15
Hello71 tor uses a series of separate changes files, then merges them together at release time with a script20:15
meejah twisted split off their tool, called "towncrier" now (individual file for each bug/feature/etc) merged into changelog at release time (similar to Tor)20:16
rafasc: so, "use towncrier" might be a solution (it's a python tool, and still somewhat tied to "whatever twisted's workflow was")20:17
nic-hartley left20:17
Hello71 I don't see anything wrong with the system, but it's a little bit complex20:17
meejah on the plus side, you get "definitely a changelog note" on each branch, but don't pay the price with "definitely a conflict in ChangeLog"20:19
PettanShoutaKun joined20:21
PettanShoutaKun if I delete my index.lock would that ruin my merges being able to see that they had related histories?20:21
sydbarret joined20:22
courrier joined20:23
duncan1 left20:23
Essadon joined20:25
[rg] joined20:25
PettanShoutaKun right now I'm trying to merge with origin master after doing a jenkins checkout. We delete the lock file and I'm trying to figure out if that's why this is failing the merge because of unrelated histories or if it's totally unrelated20:25
causa_sui left20:25
kerframil joined20:26
mescalin_ left20:26
rafasc meejah: I've actually stumbled over that tool when looking around what people might be doing. Seems similar to my approach with git-notes, the only difference being the place the "news" fragments are stored. (working tree vs notes)20:27
nightshift PettanShoutaKun: I don't have an index.lock in any of my repositories20:27
rafasc PettanShoutaKun: the index.lock is there to make you don't have multiple things interacting with the index.20:28
PettanShoutaKun So it probably wouldn't mess with merging at all?20:28
mescalinum joined20:28
rafasc if you hava a index.lock, probably means git crashed. In which case, the index state might be corrupted.20:28
gxt joined20:29
jungsubk left20:31
PettanShoutaKun left20:33
_gracecr_ left20:35
orbyt_ joined20:35
toothlessg left20:35
meLon joined20:38
jelmer left20:39
courrier left20:39
nightshift left20:39
jelmer joined20:40
opalepatrick left20:41
n3wborn joined20:42
YuGiOhJCJ joined20:46
gambl0r3 left20:46
gambl0r3 joined20:47
causa_sui joined20:47
YuGiOhJCJ left20:49
blackandblue left20:52
meLon left20:52
gambl0r3 left20:53
gambl0r3 joined20:54
minimal_life joined20:58
meLon joined21:00
orbyt_ left21:00
tarkus left21:00
mescalinum left21:00
minimal_life left21:01
meLon left21:04
tarkus joined21:04
[rg] left21:05
meLon joined21:05
yyy left21:05
kerframil left21:06
limarfrek joined21:06
meLon left21:06
limarfrekkerframil21:06
orbyt_ joined21:09
nic-hartley joined21:11
gxt left21:19
learningc joined21:19
acercle left21:19
gxt joined21:19
greatgatsby joined21:21
cd joined21:21
subopt joined21:24
justanotheruser joined21:28
threenuc left21:29
User_ joined21:31
User__ joined21:32
DisruptiveNL left21:32
finalbeta left21:33
finalbeta joined21:33
learningc left21:33
User_ left21:35
sydbarret left21:37
kjartan left21:37
xcm left21:39
exorades joined21:39
kjartan joined21:39
exorades left21:41
voidSurfr left21:42
xcm joined21:42
exorades joined21:43
yyy joined21:44
howell left21:46
orbyt_ left21:46
lightstalker left21:47
rocketmagnet left21:48
sydbarret joined21:54
dviola left21:55
meLon joined21:56
Makaveli7 left21:58
b7219264 left21:59
bambams With git-filter-branch, does it not support multiple index-filter options at once? Or would I need to execute say 10 commands to remove 10 files completely from history?21:59
b7219264 joined21:59
hofmann3900 left22:00
canton7 bambams, many of the things you can pass to index-filter will work on multiple files in the same command22:00
rafasc bambams: git rm can use multiple arguments.22:00
so wherever you have git rm file; you can use git rm fileA fileB in/directory/fileC ; etc...22:01
dviola joined22:01
esotericnonsense left22:03
borkr left22:04
bambams Hmmm, yeah. I think I tried that, but was confused when it didn't do as I expected. I'll keep wrestling it some.22:06
colwem left22:08
exorades left22:08
sentriz joined22:10
osse bambams: --index-filter 'cmd1 && cmd2' maybe?22:13
or --index-filter myscript22:13
sharkboy joined22:17
subopt_subopt_in_repos22:18
Muzer left22:18
sharkboy left22:18
sharkboy joined22:21
User__ left22:21
plexigras left22:22
Regon left22:22
dviola left22:23
sozuba left22:24
lightstalker joined22:27
wootehfoot left22:29
bashfulshell joined22:29
gambl0r3 left22:35
cbreak left22:36
assemblyman joined22:36
cbreak joined22:37
PtxDK joined22:41
veegee joined22:42
Muzer joined22:45
oojacoboo left22:46
thiago left22:58
tarkus left22:58
thiago joined23:01
Celelibi left23:09
spacesuitdiver joined23:10
jelmer left23:16
gusnan left23:16
jelmer joined23:17
kreyren left23:17
kreyren joined23:23
violentE joined23:25
sharkboy left23:27
AtumT left23:29
ewitz left23:33
Celelibi joined23:34
Phylock left23:36
spacesuitdiver left23:36
spacesuitdiver joined23:37
mikecmpbll joined23:39
TomyLobo left23:42
thiago left23:42
gambl0r3 joined23:43
spacesuitdiver left23:44
tang^ left23:45
m0viefreak left23:48
markus-k left23:48
SkarmoutsosV left23:50
egovirus left23:56

Logs Search ←Prev date Next date→ Channels Documentation