Quantcast
Channel: User Schwern - Stack Overflow
Browsing all 581 articles
Browse latest View live
↧

Comment by Schwern on Prevent pushing a merge of the remote main branch into...

Try one of the commit ordering options to git-log.

View Article


Comment by Schwern on How to merge multiline grep output to a single line in...

@Raj87 Reference the Code and Preformatted Text" section of Markdown Help. Expand it to show more and use "code fences" around your grep output.

View Article


Answer by Schwern for Prevent pushing a merge of the remote main branch into...

You have two problems.fetch + merge creates an "update merge" that clutters history.You're not using merge requests so you have little control over what gets merged.The solution is...Encourage fetch +...

View Article

Comment by Schwern on How to find which PR lastly touched a file on GitHub?

#3 could be made more performant by adding caching. You only need to download info about a merged PR once.

View Article

Comment by Schwern on Get a list of all git pulls including dates and times

What branch do you currently have checked out?

View Article


Answer by Schwern for Get a list of all git pulls including dates and times

Like git log, git reflog will only show you changes reachable from the current commit by default.If you want to see the reflog for the whole repository, use git reflog --all.

View Article

Comment by Schwern on Strategies for spotting changes inside moved or renamed...

I would add a third argument to doing the rename and modification separately: simplicity and ease of review. Since class names and the like are often tied to file names, renaming a file means renaming...

View Article

Comment by Schwern on Adding column in upsert using on_conflict_do_update

And what is the error? Please [edit] it into your question.

View Article


Comment by Schwern on Show directories added in a commit

It's simpler with -d. d for <strike>directory</strike> tree. 😅git ls-tree -d -r --name-only COMMIT. No sed required.

View Article


Comment by Schwern on Interacting with C arrays without knowing the size

I would suggest looking at a production implementation such as GPtrArray.

View Article

Comment by Schwern on How to create a trait that requires Drop to be overridden?

You want to check if a trait has been implemented and that their implementation calls a particular method? Sounds fragile. I suppose you could add a new trait which promises they provide the specified...

View Article

Comment by Schwern on Undo git fetch --prune with explicit refs (undo...

@idbrii Wow,I stand corrected. It's even mentioned in the docs. "So be careful when using this with a refspec like refs/tags/:refs/tags/*, or any other refspec which might map references from multiple...

View Article

Comment by Schwern on Postgres returning json with two level of nesting from...

Welcome to StackOverflow. Would you please show us what queries you've tried?

View Article


Comment by Schwern on How to separate key=value pair using regular expression

This is better done with a split function.

View Article

Answer by Schwern for GitHub doesn't list latest release as "latest"

Unless you tell it otherwise, Github does not pick the latest release by date, it picks it by semantic versioning. From Creating A Release...Optionally, select Set as latest release. If you do not...

View Article


Comment by Schwern on How to store github settings as code instead of in a UI

It would be nice if you could put a file in .github/, but I don't believe there's anything like that. Many settings can be queried and set with the Github API. You could write those as a configuration...

View Article

Answer by Schwern for Node.js - Git - how to handle package-lock.json...

Resolve any conflicts in the package.json and ensure the merge went well.Rebuild package-lock.json as normal.npm will rewrite the whole lock file from package.json making the conflicts irrelevant and...

View Article


Answer by Schwern for Git merge does not take all files from source branch

I can't say for sure without the full history, git log --graph --decorate --oneline --stat develop master, but here's what is plausible.develop branches from mastermaster added...

View Article

Comment by Schwern on Ruby undefined method `each' for 0:Integer

@party contains 0 (which is an Integer object), not an array.

View Article

Comment by Schwern on Max QTY with price

Please show us what you've tried. You can do this with a running total.

View Article
Browsing all 581 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>