IRCloggy #git 2021-09-01

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.

2021-09-01

zopsi left00:00
zopsi joined00:00
arcatech joined00:10
arcatech left00:14
hubble29 left00:15
christall left00:16
molt joined00:26
odoood joined00:27
qpdb joined00:32
ferdna joined00:39
travaldo left00:44
jkl joined00:48
pizdets left00:51
pizdets_ joined00:52
masoudd_ joined00:52
masoudd left00:54
durham left00:56
durham joined00:57
masoudd_ left00:58
onizu left01:15
jwillikers left01:16
AnAverageHuman left01:21
pulse joined01:22
AnAverageHuman joined01:27
tristan__ joined01:27
tristan__ left01:33
ormaajormaaj201:42
dsrt^ left01:44
rewrit3 left01:55
christall joined02:01
nyah left02:03
bn_work joined02:05
pyeverything left02:07
xx left02:07
pyeveryt_ joined02:10
gnoo joined02:11
FinnElija left02:13
BUSY left02:15
FinnElija joined02:15
shokohsc8 joined02:16
shokohsc8shokohsc02:18
jazzy joined02:18
cluelessperson joined02:29
christall left02:29
cluelessperson I'm trying to do: git config --global advice.* false in a docker build but I get an error02:29
error: invalid key: advice.*02:29
maybe it's the use of sh instead of bash02:32
nope, same error02:33
pretty_dumm_guy left02:33
rewt maybe * is invalid02:34
cluelessperson So in an automation script I'm supposed to list out 15 lines to disable git hints?02:35
twb Dumb question: does that mean a "ln -s fartplan timetable" and "printf fartplan >timetable.txt" will both be stored as the same blob?02:35
cluelessperson twb, it'll double up the contents of timetable, which fartplan symbolically links to, not sure if it'll run endlessly though02:37
don't think it will.02:37
rewt I count 29 advice.* variables in man git config02:37
gitinfo the git-config manpage is available at https://gitirc.eu/git-config.html02:37
twb cluelessperson: er, I think you misunderstood the question02:38
pyeveryt_ does anyone have a bit time help me figure why the git push doesn't change anything in remote repository? thanks02:39
twb I'm asking if a symlink target and a regular file's contents, when identical, will be stored as a single blob object (shared by both tree objects) in .git02:39
cluelessperson twb, they'll both be symbolic links to timetable02:40
ugh, I misspoke02:40
lgc joined02:41
cluelessperson no, fartplan will be a symbolic link and timetable.txt will be another file entirely.02:41
So how do I shut git up?02:41
I don't want verbose stderr output in automation02:42
pyeveryt_ could you please have a look? https://pastebin.com/raw/BNs8DjnZ git push keeps telling Everything up-to-date02:43
rewt twb, should be easy to check; add both, then git cat-file the tree and see if the hashes are the same02:44
odoood left02:45
pyeveryt_ so how do I merge the master and main? https://pasteboard.co/KiwvlNM.png02:49
cluelessperson init.defaultBranch master isn't even a hint02:50
wtf02:50
Samian left02:50
twb pyeveryt_: is one just the other with a few more commits?02:50
pyeveryt_ master is what I want to be seen on my repo02:51
but shows as a pull request twb02:51
twb pyeveryt_: so you basically want to end up with one branch, "master", and get rid of "main" entirely?02:51
cluelessperson why is git outputting stuff to stderr that ISN'T an error02:53
twb pyeveryt_: "git branch -a", make sure locally you have "master" and it has the commits you want ("git log master"). Then delete main locally "git branch -d main", push master upstream "git push -u origin master", then delete main upstream "git push --delete origin main"02:53
pyeveryt_: you might also have to do something in the github UI to make master the default in the web UI02:53
pyeveryt_: personally I would do all that the other way around, so only "main" remains, because that's the current default. But whatever.02:54
pyeveryt_ yes one branch twb02:55
twb shows remotes/origin/master besides *master02:56
remote: Create a pull request for 'master' on GitHub by visiting:02:56
remote: https://github.com/monajalal/fashion_compatibility/pull/new/master02:56
how?02:56
error: branch 'main' not found. twb02:57
Branch master set up to track remote branch master from origin. for git push -u origin master twb02:57
so what can I do now?02:57
main doesn't even show as branch02:57
twb pyeveryt_: did you make a local git repo, and then separately make a github repo?02:59
pyeveryt_ I don't think so twb03:00
twb pyeveryt_: what's "git branch -a" say now03:01
pyeveryt_ $ git branch -a03:01
* master03:01
remotes/origin/master03:01
^twb03:01
main was never shown03:01
FH_thecat joined03:04
arcatech joined03:05
twb pyeveryt_: do a "git fetch --all --tags" and check again.03:06
pyeveryt_: it looks to me like main is gone, and you're done03:07
pyeveryt_ twb Fetching origin03:08
arcatech left03:10
XV8 left03:12
ChmEarl left03:12
arcatech joined03:13
XV8 joined03:13
pyeveryt_ twb any final thoughts?03:15
twb nope03:17
sgn left03:20
sgn joined03:21
Gustavo6046 left03:21
Gustavo6046 joined03:22
fjmorazan left03:24
fjmorazan joined03:25
jinsun left03:32
XV8 left03:33
filePeter left03:38
devslash joined03:38
filePeter joined03:38
devslash i have made changes but forgot to switch branches03:38
Even though I made the changes, I have not committed anything yet.03:38
if i switch branches, will I lose my changes ?03:39
Guest4294 joined03:39
ikke no03:40
odoood joined03:41
devslash i just lost everything03:45
after i switched to the new branch03:45
Samian joined03:45
Pseudocrat joined03:49
aniruddha joined03:49
Murr left03:50
Murr joined03:51
arcatech left03:53
ikke how did you switch to a new branch?03:53
ferdna left04:04
christall joined04:05
jazzy2 joined04:06
pyeveryt_ left04:06
AnAverageHuman left04:07
jazzy left04:09
christall left04:09
realies joined04:09
zebrag left04:12
NeoCron joined04:15
odoood left04:17
austin987 left04:23
jinsun joined04:25
NeoCron left04:28
saroy joined04:30
odoood joined04:31
austin987 joined04:36
circuitbone `git branch -a`04:45
Xaldafax left04:50
odoood left04:52
betelgeuse joined04:56
dhch left04:56
dhch joined04:57
madewokherd` joined04:59
vishal left04:59
vishal joined05:01
madewokherd left05:01
Wulf joined05:01
dpflick left05:12
dpflick_ left05:12
dpflick_ joined05:13
dflick_ joined05:13
dpflick joined05:13
dflick left05:16
hbautista_ left05:18
Guest4294 left05:24
vysn joined05:26
skapata left05:26
Samian left05:27
sudoforge left05:33
Pseudocrat left05:34
troyt joined05:38
devslash left05:43
baltazar joined05:47
jazzy2jazzy05:56
EvilDMP joined06:01
thiago left06:02
christall joined06:08
jazzy left06:09
jazzy joined06:10
jstein joined06:20
jstein left06:20
tristan__ joined06:21
euouae joined06:26
euouae Hello, is anyone familiar with the git source code?06:26
Gurkenglas joined06:28
twb euouae: what's the real question?06:30
R2robot left06:31
jazzy2 joined06:31
euouae I'm trying to hunt down the mechanism by which `gpg` is invoked to sign commits. I think `sign_buffer()` is the culprit but I can't spot the external program invocation06:32
I would appreciate some help with that06:32
twb git commit --gpg-sign ?06:33
christall left06:34
euouae I'm talking about the source code of `git`, where does it happen06:34
theoceaniscool joined06:34
dpflick left06:34
dpflick_ left06:34
dflick_ left06:35
twb I'm just making sure I understand which signature you're talking about06:35
jazzy left06:36
euouae I think that's the one twb06:36
twb commit.c:sign_with_header appears to be straightforward06:37
That then goes to gpg-interface.c06:38
euouae the sign_with_header() function seems to point at sign_buffer(). I've followed through until I was lost06:38
twb But I don't see a fork and I don't see gpgme06:38
Ah well strvec_pushl has what looks like exec args06:38
euouae oh wait is that where it happens?06:40
I didn't check the tone06:40
that one*06:40
twb " * A new run-command API function pipe_command() is introduced to sanely feed data to the standard input while capturing data from the standard output and the standard error of an external process, which is cumbersome to hand-roll correctly without deadlocking."06:40
euouae: strvec is creating a vector, representing the exec args that gpg will get06:40
Then pipe_command set up the pipeline (i.e. actually runs gpg, somewhere)06:40
euouae I can't spot it, I wen through pipe_command()06:41
twb euouae: I'm looking at this cold, i.e. ICBW, but it looks pretty clear to me.06:41
OK06:41
jazzy2jazzy06:42
euouae It should be around `start_command()` but the only substantial functions it calls are `trace2_child_start(cmd);` and `trace_run_command(cmd);`, the first documented to just print stuff, and the second having no exec statements that I see06:44
twb start_command calls execve aronud :85206:44
inside #ifndef GIT_WINDOWS_NATIVE06:45
euouae Oh YEAH! I didn't realize start_command continues past line 80006:45
twb Otherwise it does mingw_spawnvpe06:45
euouae I mean, line 74106:45
twb euouae: yeah it's not obvious because of how that { is indented06:45
or NOT indented06:45
euouae thank you, that helped06:46
twb good little forensic exercise06:46
You could also have gone at it via strace or dtrace or that new systemd thing06:46
furrymcgee joined06:46
euouae yeah or a debugger maybe together with the source code will give you the exact line06:47
or so I'm told because I don't use gdb06:48
dpflick joined06:49
dflick joined06:49
dpflick_ joined06:49
osse euouae: see if this will show it: GIT_TRACE=1 git commit06:49
You already have your answer I suppose, but for next time :-)06:50
R2robot joined06:52
euouae osse, that is awesome, thank you06:52
it displayed the exact gpg command being executed06:52
mei joined06:53
TomyWork joined06:58
palasso joined07:02
unluckyshrubbery left07:09
braxas I have a git repository (old-origin/master) some history, and I want to rebase that history onto an "empty" AZDO repo so AZDO does not whine when I submit it via PR. The old repo basically just has one commit to readme.md. So what I do is { git checkout -b mypr old-origin/master; }, then { git rebase origin/master; }. But this creates a lot of conflicts which I don't expect at all, any ideas why?07:09
is there maybe a better approach?07:09
twb osse: neato07:09
blaisebool joined07:11
braxas one of the strange errors I get is: https://bpa.st/PEFA07:12
indy joined07:21
braxas tried also with rebase-onto07:22
jazzy left07:27
osse euouae: and the source file and line, right?07:28
run_command.c:567 or whatever07:28
braxas like really all I want is the exact same commit history, but with a fake first commit that is basically discarded07:28
euouae osse: hard to say, the source code does not correspond to git main so I have to dig into ... I don't want to do that, but probably yeah :P more importantly I was looking for the gpg invocation07:29
osse braxas: that conflict looks to me like the history you rebase expect those files to already be there, but they aren't07:30
euouae left07:32
gabin maybe --root will help?07:34
jazzy joined07:34
gabin iiuc, they want to bump the first commit to be a second commit, with a new empty first commit07:35
i.e., bump 1, 2, 3, ..., {n - 1}, n to 2, 3, 4, ..., n, {n + 1}07:36
where the new commit 1 is empty07:36
Murr left07:50
Murr joined07:50
john_johnk joined07:51
opzeul joined07:52
euouae joined07:58
tristan__ left08:02
tristan__ joined08:02
dsrt^ joined08:03
Guest25 joined08:05
Guest25 Hi all, I have a branch named 3882 in the remote-origin and a commit in my local repo with it's hash starting 3882........, When I try `git switch 3882` it complains that it expects a branch not a commit08:07
ttree left08:09
enoq joined08:09
euouae use --no-guess?08:09
ikke I don't think this has to do with guess08:10
oxymoron93 joined08:17
Guest25 ```git switch 3882 --no-guess08:27
fatal: a branch is expected, got commit '3882'```08:27
ikke Guest25: does git switch refs/heads/3882 work? (not sure if git switch accepts that notation)08:29
christall joined08:31
opzeul left08:34
nobody_ joined08:35
SirRippovMaple joined08:37
hnOsmium0001 left08:40
palasso left08:48
EvilDMP left08:49
palasso joined08:49
EvilDMP joined08:50
momomo joined08:53
EvilDMP left08:53
FH_thecat left08:56
EvilDMP joined08:56
Betal left08:56
christall left08:59
nobody_ left09:00
euouae left09:03
xx joined09:05
unluckyshrubbery joined09:06
YuGiOhJCJ joined09:12
Guest25 iike: let me try09:14
ikke: let me try09:14
mx08 joined09:18
computeiro joined09:19
audiocat left09:22
AbleBacon left09:31
elf_fortrez joined09:42
bodiccea joined09:44
humanface joined09:48
Murr left09:50
Murr joined09:50
AnapodoPsalidaki joined09:59
pretty_dumm_guy joined10:01
tristan__ left10:13
EvilDMP left10:25
FH_thecat joined10:34
braxas can I somehow do cherry-pick to get to exact state, instead of getting to commit?10:36
Guest25 ikke: `git switch refs/heads/3882 work` throws invalid reference10:36
braxas or instead of getting the diff I mean10:36
ikke braxas: you could checkout the contents of that commit10:37
braxas but I want to get the same commit message actually alsop10:37
I guess I can fake it10:37
ikke Guest25: what does `git show-ref 3882` return?10:38
Gurkenglas left10:41
Tobbi_ left10:44
ExeciN joined10:45
Tobbi_ joined10:46
ExeciN hi people. I'm trying to perform a git command such as `git push --delete origin 1.0.0` but the wrong user used to authenticate over ssh. I have multiple identities (work and personal) so I'm wondering if there is a way to specify which username to use10:47
osse ExeciN: several ways.10:47
ExeciN: You can for example change the URL of origin to use a host alias and then configure it in ~/.ssh/config10:48
You can also specify a one-off custom ssh command with GIT_SSH_COMMAND='ssh -oFoo -i bar etc.' git push10:48
rewrit3 joined10:49
ExeciN osse: the remote doesn't have any mention of a username (except from the git part)10:50
osse That's normal10:51
If you literally mean use a different OS-level username than 'git' you can push directly to the correct URL10:51
But usually everone uses the 'git' user, and the key determines which human is doing it.10:51
ExeciN I have set git.user but it still uses the other identity10:52
*I mean user.name10:53
elf_fortrez left10:53
ExeciN could this be because of ssh-agent?10:53
osse The stuff in .gitconfig is irrelevant for authentication10:53
That only affect the commit info (author etc)10:54
Guest25 ExeciN: I'd add a ssh config in ~/.ssh/config and use that `Host` in the remote url10:54
FFY00_ left10:54
christall joined10:57
Tobbi_ left10:59
rewrit3 left11:00
ExeciN I can't get it to work. I have set the User in ~/.ssh/config but it still tries to authenticate with my other username https://hastebin.com/raw/usarinawoq11:00
Tobbi_ joined11:00
Guest25 left11:01
Guest25 joined11:01
Guest25 ikke:`git show-ref 388211:01
a45d7f259b6480482fa04a9d0a836c983cd5898d refs/heads/388211:01
a45d7f259b6480482fa04a9d0a836c983cd5898d refs/remotes/origin/3882`11:01
reset joined11:01
osse ExeciN: for that to work you must edit the URL to remove the git@ part11:02
or you can git push --delete github.com/projectname 1.0.011:02
ikke Guest25: For me, I can checkout the branch, even though a commit with the same prefix exists11:04
Guest25: it at most warns that it's ambiguous11:04
osse ExeciN: But since this is github.com we're talking about, I seriously doubt you're supposed to use a different user than 'git', unless you work there or something11:04
ikke Guest25: both with git switch as with git chekcout11:04
Guest25 ikke: for me `git checkout 3882` detaches my HEAD11:06
ExeciN osse: yeah it should be git but I'm somehow getting a permission error when trying to do anything involving the remote. I don't know why my username is used11:06
Guest25 ExeciN: Can we see your `git remote -v`?11:08
osse ExeciN: because github identifies you with the key you're using.11:08
use a different key11:08
ExeciN Guest3738: https://hastebin.com/raw/rufixokoko (upstream is unrelated in this case)11:10
osse: I have multiple keys, how should I specify which one to use?11:10
osse ExeciN: .ssh/config11:10
or GIT_SSH_COMMAND11:10
in .ssh/config, insteady of User, specify IdentityFile11:11
ExeciN if I go with the .ssh/config way, can I specify the key to use per repo or per directory? because I don't want to set the key for everything github11:11
Bayes joined11:18
Bayes left11:18
Bayes joined11:18
osse Yes, but using aliases11:20
Hostname foobar11:20
Host github.com11:20
IdentityFile ~/rofl11:20
git remote set-url origin foobar/projectname/reponame.git11:21
natrys joined11:22
ExeciN osse: Perfect. Many thanks11:23
christall left11:24
jwillikers joined11:28
teut joined11:28
teut Uploaded file: https://uploads.kiwiirc.com/files/3a3c3e3c83d54d187a8a291fbe845b3e/pasted.txt11:29
I was in detached head state and made some commits. I had forgotten that I was in detached head11:29
how do I cherry pick the commits I made to the front from wherever they are?11:29
osse git cherry-pick HEAD@{3} HEAD@{2} HEAD{1}11:30
weird that the reflog didn't mention the detaching11:31
teut HEAD is currently at master11:31
so head was previously on some commit11:32
osse yep11:32
teut so the commands translates to , cherry pick , Master -1, master - 2, master - 3?11:32
osse no11:33
HEAD@{3} is not the same has HEAD~311:33
HEAD@{3} is the third previous value of HEAD11:33
they are listed in the paste11:33
teut @{} let me check more on that11:33
oh so they are to be copied11:33
osse or you can take the hashes directly11:33
teut yes11:34
thanks for the help11:34
Uploaded file: https://uploads.kiwiirc.com/files/0b9dbccc6e7c46bda6f8cb4592771520/image.png11:36
why is the last one green?11:36
jwillikers left11:36
john_johnk left11:36
teut Uploaded file: https://uploads.kiwiirc.com/files/2746664495c772dd6fdeddb5ee23cc4c/pasted.txt11:36
speckz joined11:36
teut I think it didnt do anything because there was @ missed in HEAD{1}11:37
osse You'll have to ask some powershell experts about that11:38
I think perhaps it conflicts with PS's handling of hashes or maps or dicts or whatever it calls them11:39
teut ok I can switch to git shell11:39
ah nice11:40
switching to git shell did it11:40
how did you know it was the shell problem?11:40
osse Git has no way of affecting the color of the text you type in.11:41
And I saw you were in PS, and I recall there exists some @foo{bar} syntax11:41
jwillikers joined11:43
teut oh , thats nice observation , I ll keep it in mind11:44
Ecophobia joined11:53
EvilDMP joined11:53
EvilDMP left11:57
AnAverageHuman joined11:59
zer0bitz joined12:02
roadie left12:02
skapata joined12:06
skapata left12:06
skapata joined12:06
roadie joined12:09
bin101 left12:10
FFY00 joined12:11
meator joined12:13
EvilDMP joined12:13
FH_thecat left12:14
bin101 joined12:14
JanC joined12:17
Anticom joined12:19
Ecophobia left12:20
roadie left12:22
EvilDMP left12:23
ELFrederich left12:26
christall joined12:31
roadie joined12:33
christall left12:33
christall joined12:33
ecraven joined12:35
ecraven hello ;) is there a simple way to just check whether communication with a remote git server is possible, without actually downloading a lot of data? for something like monitoring whether a git server is running?12:35
ikke git ls-remote perhaps?12:37
tristan__ joined12:37
ikke Or if you are more daring, look at the git protocol and see if you can get a lighter response even12:37
roadie left12:38
teut left12:40
gh34 joined12:41
ecraven ikke: thanks!12:43
speckz left12:45
Guest71 left12:47
oxymoron93 left12:53
john_johnk joined12:58
roadie joined13:03
DevAntoine joined13:09
DevAntoine Hello13:09
I used to exec the following command to delete my local branches which are not on origin:13:09
git fetch --all -p; git branch -vv | grep ": gone]" | awk '{ print $1 }' | xargs -r -n 1 git branch -D13:09
But it doesn't work anymore13:09
Guest25 left13:09
DevAntoine (no error my I still got my local branches)13:09
I'm running MacOS maybe it's related13:10
jazzy left13:10
roadie left13:12
Xatenev joined13:17
Xatenev left13:18
Xatenev joined13:18
Xatenev left13:18
leah2 can i compute the hash of a tree on disk without adding it to an index or something?13:19
DevAntoine So, is there a onliner to remove all local branches not on remote?13:19
oneliner13:19
teddyc DevAntoine: have you tried running parts of the oneliner? Does the awk command print your expected output?13:20
bin101 left13:23
ninjin joined13:23
Xenguy left13:23
bin101 joined13:26
nyah joined13:28
ikke leah2: I don't think there is a built-in command that does it without creating objects in the repository13:29
humanface81 joined13:30
Soni can you delete a remote branch?13:31
ikke git push --delete <remote> <branchname>13:31
gnoo left13:34
humanface left13:34
Soni hmm okay13:35
does that cause post-receive?13:35
leah2 ikke: ok, thx13:36
gnoo joined13:43
roadie joined13:43
john_johnk left13:43
zitter left13:44
subopt joined13:46
john_johnk joined13:46
EvilDMP joined13:46
osse Soni: yes13:48
Soni hmm13:48
how do force pushes and stuff get passed to post-receive?13:48
roadie left13:48
bin101 left13:48
Murr left13:50
Murr joined13:50
osse the old values is given as "000000000000" I think13:51
Ecophobia joined13:51
TimWolla joined13:51
tristan__ left13:52
bin101 joined13:52
ChmEarl joined13:56
AnAverageHuman left13:56
YuGiOhJCJ left13:56
CSWookie joined13:58
sudoforge joined13:58
Anticom left14:01
pizdets_ left14:01
pyeveryt_ joined14:03
EvilDMP left14:08
EvilDMP joined14:09
EvilDMP left14:09
pizdets joined14:10
Soni osse: so one would need to do a 3-way diff (rev-list --left-right --count a...b) to detect force-pushes?14:10
AnAverageHuman joined14:11
osse In post-receive it's presumably too late, because the ref has already been updated14:11
in pre-receive you can check if the ref already has a value if the provided old value is 00000000, and if so, it's a forec push14:12
Soni oh right the objects could be gone already hmm14:12
force pushes look like any other push remote: b'21177a2933b1a9d21d8437159405c5bc68b4d32e 3ea9318f6271ece3c7560f18d0b22f50bd3cefe5 refs/heads/default\n'14:13
osse he only mention of force in githooks is in the new reference-transaction hook I hadn't heard of before14:13
Soni deletes are neat remote: b'21177a2933b1a9d21d8437159405c5bc68b4d32e 0000000000000000000000000000000000000000 refs/heads/default\n'14:13
osse I just assume pre-receive works the sam eway14:13
oh14:13
in that case check if the old value is an ancestor of the new. it it isn't then it's a force14:13
Soni but yeah not sure how to do cleanup on delete/force-push other than rebuilding the whole HTML view of the repo14:14
osse if ! git merge-base --is-ancestor $old $new; then echo do not force push you idiot; fi14:14
Soni (as in, the *whole* thing)14:14
(rather than just cleaning up removed objects)14:14
osse yeah that sounds a bit difficult14:16
Soni (same for --delete... how would one clean up --delete without affecting other branches and without reimplementing git's gc?)14:16
pyevery__ joined14:16
osse git prune has --dry-run: "Do not remove anything; just report what it would remove." I suppose you can read that and do the needful14:17
jellycode joined14:17
Soni does git guarantee not to run a gc until post-receive is done?14:19
pyeveryt_ left14:19
jellycode greetings. question: is there a git command/workflow which lets me generate docs on a feature branch, then, checkout the "gh-pages" branch, and somehow copy and commit the generated docs on top of gh-pages. the tricky part is the branches have unrelated history, and we don't want to merge them.14:21
osse I don't know. But any objects that become "deletable" by a push aren't eligible for cleanup by git gc anyway14:22
vysn left14:22
Soni oh, why's that?14:22
xx I'm trying to solve a situation that I don't see described online: I want to move two commits around, without dropping either of them, but they cause a merge conflict.14:23
So instead of having a merge conflict resolution squash the two commits together, I want the first one to be applied, and then the next commit to be based on the first one14:23
how do I do that?14:23
osse Soni: nvm, I'm not thinking clearly.14:23
jellycode Haha xx ; you and i are having kind of similar questions14:23
xx jellycode: most people are having the same questions, because git is not intuitive at all14:24
Soni rebase --interactive?14:24
jellycode All the strategies i'm trying now end up in conflict, and i think maybe it's impossible because fundamentally, all the GIT commands I can find wants to bring over a "commit" which will ultimately be related to the history of "main". My goal is to take changes in the working directory created while on one branch, and copy/apply to a totally14:24
unrelated branch.14:24
Soni (for both of you?)14:24
hnOsmium0001 joined14:25
Soni maybe cherry-pick also?14:25
xx Soni: yes, I'm doing the interactive rebase, where I switch the order of two commits14:25
jellycode I don't think i've tried cherry-pick , let me look14:25
osse Soni: Git itself runs git gc from time to time. So unless you actively run git gc on the side yourself I would assume nothing interferes with the hooks14:25
Soni osse: yeah but, what are the details of that?14:26
osse xx: if you get conflicts when you reorder them you will have to fix it14:27
Soni: what do you mean14:27
xx osse: yes, I want to fix it... that's why I'm asking :)14:27
braxas how do I get the current state of my working directoy to match that of a specific commit while not changing any history?14:27
xx braxas: git checkout <hash>14:27
osse xx: what you are doing already sounds correct to me14:28
Soni xx: you have to do it manually14:29
osse fix the conflicts, git add the files, git rebase --continue14:29
braxas Maybe I should explain better, I have a branch with N commits, and then I have another with 1 commit. I want to make it look like the branch with 1 commit is on top of the N commits, but merging/rebasing is a bit of a mess, so I want to just change the stuff in working directory to the 1 commit's branch, and then do git commit --reuse-message commit_ref14:29
osse braxas: git checkout commit_1 -- . && git commit -C commit_114:30
if that commit also deletes files it gets a bit trickier, but it's doable14:30
Soni osse: what guarantees does git make about when it runs git gc, does it run gc after post-receive or could post-receive see commit IDs (on stdin) that don't exist anymore, etc etc14:32
also git prune doesn't seem to inspect packfiles, is that correct? so it might not be useful for figuring out stuff to delete...14:33
xx let's see if I understand it correctly: I do an interactive rebase, and git tells me "oh noes, merge conflict". So I edit the conflicting file to look like I want the *first* commit to make it look, then do rebase --continue and git tells me again "oh noes, merge conflict" so I now edit the same file to look like I want the *second* commit to appear14:33
right?14:33
Soni (like an accidental commit of secrets)14:33
osse Short answer: I don't know. The docs just say that Git will invoke git gc --auto at the end of commands that are expected to produce a lot of objects.14:33
vysn joined14:33
gordonfish joined14:33
osse And running git gc --auto in the middle of a chain of hooks to run just sounds so stupid that I expect Git not to do it :p14:34
Soni hmm meh, doing the extremely inefficient thing of just regenerating the whole HTML from scratch every time seems easier14:34
pyevery__ hey does anyone have time to help me? my problem is not yet resolved https://stackoverflow.com/questions/69007440/there-isn-t-anything-to-compare-main-and-master-are-entirely-different-commit-h?noredirect=1#comment121961741_69007440 I have main shown as default branch in github itself but when I do git branch -a it doesn't show as a branch. my code is in master branch but git ui doesn't give me an option to merge the14:35
PR. any help is really appreciated14:35
osse yes14:35
xx: yes14:35
xx osse: that is starting to make sense, let's try it14:35
jetchisel joined14:36
pyevery__ also remotes/origin/master shows as a branch besides default master branch in terminal but I don't remember ever making it14:36
Soni osse: is there any way to get the remote to run under strace when doing `git push`?14:37
osse Soni: git push --receive-pack='strace git-receive-pack' I guess14:38
Never tried it14:38
git receive-pack is the command that git will execute on the remote side by default14:38
pyevery__ osse are you talking to me?14:38
BitsNBytes joined14:39
BitsNBytes left14:39
Soni osse: with --local?14:40
BitsNBytes joined14:40
Gurkenglas joined14:42
Xaldafax joined14:42
TimWolla left14:45
Soni huh, that does work with local clones14:49
TimWolla joined14:49
AbleBacon joined14:50
Soni and yeah looks like it's only called once, after the hooks14:50
<Soni> also git prune doesn't seem to inspect packfiles, is that correct? so it might not be useful for figuring out stuff to delete...14:50
gnoo pyevery__: have you tried to change branch like this? https://github.com/github/renaming#new-repositories-use-main-as-the-default-branch-name14:51
natrys left14:53
junktext joined14:53
thiago joined14:59
Ecophobia left14:59
pyevery__ fixed gnoo15:00
Soni safe to parse output of git fsck --full --dangling --unreachable?15:04
vysn left15:04
natrys joined15:06
Soni (seems more reliable than prune --dry-run)15:08
arcatech joined15:09
ExeciN left15:11
LuxuryMode joined15:16
roadie joined15:16
madewokherd` left15:17
enoq left15:17
francis joined15:18
unluckyshrubbery left15:21
unluckyshrubbery joined15:21
hubble joined15:25
mteo joined15:27
osse pyevery__: No I wasn't15:27
Soni: How does it seem more reliable?15:29
Soni osse: it includes objects in packfiles, which prune --dry-run doesn't15:30
The_Blode_ joined15:31
The_Blode left15:32
Guest25 joined15:35
alkino left15:35
alkino joined15:38
christall left15:38
christall joined15:40
BitsNBytes left15:41
beshr left15:45
osse reliable in the sense that it prints more objects, sure15:46
but I agree, it makes sense to use that15:47
I forgot that gc is essentially a combination of prune and repack, but the latter doesn't seem so keen on --dry-runb15:48
hubble left15:48
madewokherd joined15:50
goldfish joined15:51
nik joined15:52
beshr joined15:52
arcatech left15:56
arcatech joined15:56
jwillikers left15:57
AnAverageHuman left15:58
tejr left15:58
Soni except it doesn't go far enough either15:59
tejr joined16:00
Soni osse: https://bpa.st/23HA16:01
gnoo left16:01
jwillikers joined16:03
DevAntoine left16:04
EvilDMP joined16:07
AnAverageHuman joined16:08
EvilDMP left16:09
gnoo joined16:10
saroy left16:16
osse what is this supposed to show?16:23
davis joined16:23
davis hello, I am trying to test builds of various tags from a git repot. I did a `git checkout tags/sometag -b sometag` and I got an error msg of `the following untracked working tree files would be overwritten by a checkout. Aborting` It gives a whole list of files. I tried to do a `git stash` and it says not local changes to save.16:25
how do i get this particular revision out without removing directory and redoing a git clone first?16:26
cbreak davis: the untracked files would be overwritten16:28
do you want to delete them?16:28
davis i dont care if they are deleted. I am trying to get a working build with any "verfied" tag.16:29
cbreak then git clean -fdx16:29
davis the particular tag I'm using at the moment fails to build16:29
so I am trying to pull another one.16:29
ok let me try that16:29
cbreak that will delete untracked files16:29
that deletion will not be recoverable16:29
davis hmm. git clean -fdx says its deleting somethings16:30
arcatech left16:30
davis however a reissue of $ git checkout tags/sometag -b sometag has same error16:30
untracked files will be deleted by checkout and then aborting16:31
do I simply rm these files by hand?16:31
cbreak you can try16:31
but git clean would do that16:31
Soni osse: the "dangling commit" is the only thing on stdout16:31
but it's useless because everything is dangling but it doesn't show that16:32
cbreak if the files are ignored, you can try to remove the -x16:32
keir joined16:33
davis hmm. rm -rf lib/nrf lib/nrfx enabled me to checkout the new tag.16:33
cbreak oh, libs16:33
those might be submodulees16:33
lavos joined16:33
cbreak so they have their own tree16:33
davis yes, its fine. cbreak, I appreciate your expertise. Many thanks.16:33
osse Soni: how do you know that?16:33
cbreak and you'd have to run any clean command inside them16:33
Soni osse: carefully crafted test case16:34
lavos left16:34
davis cbreak: many thanks. FWIW, I'm writing a forum post on my results. When complete I'll post here if you want to examine the git commands.16:35
osse Soni: well, in that case...16:37
is the reflog enabled? that can reference stuff16:38
nickmass joined16:40
Soni osse: do bare repos have reflog?16:44
jellycode left16:46
davis cbreak: https://github.com/pycom/pycom-micropython-sigfox/issues/56316:47
absc joined16:47
Samian joined16:49
Soni osse: it's not enabled, no16:49
EvilDMP joined16:51
theoceaniscool left16:52
arcatech joined16:57
absc left16:57
bn_work left17:00
Betal joined17:01
AnAverageHuman left17:01
AnAverageHuman joined17:01
Bayes left17:04
EvilDMP left17:04
arcatech left17:04
EvilDMP joined17:05
TomyWork left17:07
arcatech joined17:10
theoceaniscool joined17:11
meator left17:14
christall left17:20
christall joined17:23
pulse left17:24
roadie left17:31
osse Soni: by default it's off17:35
gxt joined17:36
jrm joined17:41
humanface81 left17:43
stkrdknmibalz joined17:45
john_johnk left17:51
keypusher joined17:52
EvilDMP left17:55
keypusher left17:58
EvilDMP joined17:59
keypusher joined18:01
davis left18:02
pulse joined18:04
humanface joined18:06
gnoo left18:11
keir left18:12
keir joined18:13
BinarySavior joined18:13
jstein joined18:14
zebrag joined18:16
jellycode joined18:17
jellycode HI all. Jenkins checks out git repo in a sparse way, which I get. But, at the end of the job i'm trying to checkout a branch ("gh-pages") and I get an error on checkout: "fatal: 'origin/gh-pages' is not a commit and a branch 'gh-pages' cannot be created from it" ,18:20
I'm doing "git fetch origin gh-pages" and then "git checkout -t -b gh-pages origin/gh-pages"18:21
imMute jellycode: 'git fetch --unshallow origin'18:21
jellycode How does the unshallow work exactly?18:21
I'm trying it now to get unblocked, but I want to make sure it doesn't have negative implications18:23
imMute it fetches all the pieces that were skipped in the original shallow clone18:23
there's no negative implications other than it's going to use disk space to store those objects (as if you had done a full clone in the first place)18:23
jellycode if i do "git fetch --unshallow origin gh-pages" does that avoid getting all the pieces not related to gh-pages?18:24
imMute I'm not sure about that.18:24
jellycode "-unshallow on a complete repository does not make sense" ... wait what?18:24
imMute I think "complete" means "not shallow"18:25
CSWookie left18:26
jellycode yes i agree, but it doesn't make sense that i have one error saying it doesn't know anything about a branch named gh-pages, which seemed clearly related to the shallow clone, and then another error saying the clone is not shallow18:27
BinarySavior left18:30
BinarySavior joined18:31
theoceaniscool left18:31
jellycode left18:33
ThorMojito joined18:34
ThorMojito left18:35
pmcnabb joined18:36
travaldo joined18:39
Narrat joined18:43
computeiro left18:48
Guest25 left18:50
austin987 left18:50
Samian left18:56
austin987 joined19:03
vysn joined19:04
LuxuryMode left19:06
EvilDMP left19:08
arcatech left19:08
liefer4 joined19:09
BinarySavior left19:11
BinarySavior joined19:11
liefer left19:11
liefer4liefer19:11
dflick left19:16
m0viefreak joined19:26
john_johnk joined19:29
dflick joined19:29
keir left19:30
Samian joined19:30
elf_fortrez joined19:31
austin987 left19:32
christall left19:32
elf_fortrez left19:33
Samian left19:34
lgc left19:43
austin987 joined19:45
Darkfoe1 joined19:47
absc joined19:47
Helmholtz left19:51
Helmholtz joined19:51
XV8 joined19:54
keir joined20:00
jazzy joined20:06
rahl left20:10
rahl joined20:11
austin987 left20:11
christall joined20:14
christall left20:17
christall joined20:17
john_johnk left20:23
austin987 joined20:25
elastic_dog left20:29
pulse left20:31
EvilDMP joined20:35
theoceaniscool joined20:42
hqdruxn08 left20:44
elastic_dog joined20:45
oriba joined20:47
subopt left20:48
subopt joined20:48
austin987 left20:49
Lord_of_Life_ joined20:49
humanface left20:51
Lord_of_Life left20:51
Lord_of_Life_Lord_of_Life20:51
EvilDMP left20:54
EvilDMP joined20:57
tmz joined20:57
keir left20:59
austin987 joined21:02
travaldo left21:03
humanface joined21:08
christall left21:08
Bayes joined21:08
Bayes left21:09
Bayes joined21:09
christall joined21:09
madewokherd left21:11
srinidhi left21:15
aniruddha left21:19
jazzy2 joined21:22
jazzyGuest980321:22
jazzy2jazzy21:22
jazzy left21:23
jazzy joined21:24
Guest9803 left21:25
austin987 left21:29
absc left21:33
gh34 left21:35
EvilDMP left21:35
nik left21:35
theoceaniscool left21:37
shokohsc left21:39
theoceaniscool joined21:40
Gustavo6046_ joined21:40
Gustavo6046 left21:41
junktext left21:42
austin987 joined21:42
Gustavo6046_Gustavo604621:43
humanface left21:45
humanface joined21:45
oriba left21:46
christall left21:47
christall joined21:48
jwillikers left21:49
Gustavo6046 left21:50
Gustavo6046 joined21:51
vdamewood left21:51
madewokherd joined21:54
shokohsc8 joined21:56
Bayes left21:57
cliluw joined21:58
furrymcgee left22:04
Lunatrius joined22:07
christall left22:08
christall joined22:08
odoood joined22:08
theoceaniscool left22:08
humanface56 joined22:09
humanface left22:11
christall left22:12
arktnld_ joined22:13
arktnld_arktnld22:14
arktnld left22:15
arktnld joined22:15
arcatech joined22:20
Gustavo6046 left22:21
Gustavo6046 joined22:21
hbautista_ joined22:24
tang^DoofusCanadensis22:25
BitsNBytes joined22:32
Narrat left22:32
jwillikers joined22:37
odoood left22:38
christall joined22:39
arcatech left22:40
arcatech joined22:48
hubble joined22:49
BlessJah joined22:50
m0viefreak left22:51
christall left22:53
jiffe left23:03
pizdets_ joined23:03
pizdets left23:03
jiffe joined23:06
hubble left23:09
hubble joined23:10
xx left23:18
christall joined23:19
jazzy2 joined23:20
jazzy left23:20
hubble left23:21
jazzy2jazzy23:25
sh4 joined23:26
sh4 when trying to checkout master i get: fatal: 'master' matched multiple (2) remote tracking branches23:27
where can i change that to remove whatever the second master is ?23:27
arcatech left23:28
christall left23:30
DoofusCanadensis you have more than one remote23:31
so you have to be specific about which remote your master is tracking23:31
hubble joined23:31
sh4 can i just tell it "use origin/master whenever i say master"23:31
DoofusCanadensis yes23:32
man git checkout23:32
gitinfo the git-checkout manpage is available at https://gitirc.eu/git-checkout.html23:32
DoofusCanadensis with specifics on --track23:32
BitsNBytes left23:33
sh4 aha, that's what git suggested - hint: git checkout --track origin/<name>23:34
though it didn't tell me that "from then on origin/master will be master"23:34
christall joined23:34
arcatech joined23:36
DoofusCanadensis unless you delete your local master branch23:36
then you have to tell it to track all over again23:36
neat trick? your local branch name does not have to match the remote branch name23:37
I have a master that tracks origin/master and a staging-master that tracks staging/master in one of my repos23:37
Wulf left23:38
Wulf joined23:39
sh4 having multiple masters sounds like a recipe for confusion23:39
christall left23:39
DoofusCanadensis both origin and staging and upstream (all, not both) have a master branch23:40
would you normally check all of them out into different branches normally? probably not23:40
sh4 well, i'd ask contributors to use feature branches for work, but if one of them would push to his master regardless, i'd use git merge foobar/master23:41
humanface56 left23:41
Gurkenglas left23:42
dob1 left23:44
hubble88 joined23:45
igemnace left23:45
dob1 joined23:48
hubble left23:49
Murr left23:49
Murr joined23:50
goldfish left23:52
pyevery__ left23:53
cbreak joined23:53
pyeveryt_ joined23:54
travaldo joined23:55
natrys left23:56
arcatech left23:57
AsenMx joined23:58
pyeveryt_ left23:58
arcatech joined23:59

Logs Search ←Prev date Next date→ Channels Documentation