Welcome to Software Development on Codidact!
Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.
Activity for Michaelâ€
Type | On... | Excerpt | Status | Date |
---|---|---|---|---|
Comment | Post #293516 |
@#53937 I've been liking `--date=auto:human` for my casual log:
```ini
[alias]
# Pretty logs
## Casual
lg1 = log --graph --date=auto:human --format=tformat:'%C(bold yellow)%h%C(reset) %C(green)%ad%C(reset) %s %C(dim white)%aN%C(reset) %w(0,0,9)%C(auto)%+d%C(reset)'
## Details
lg2 = log ... (more) |
— | 5 days ago |
Comment | Post #293516 |
I have a couple shortcuts (`fa = fetch --all`, `cob = checkout --branch`, ...), some pretty formatted log variants bound to `lg` and `lg2`, and a couple long gnarly ones. One resyncs an integration branch in another worktree. One performed a status summary on 100+ other repositories. One managed patc... (more) |
— | 7 days ago |
Comment | Post #293564 |
Not exactly a well-received question, but thanks for linking it. =) (more) |
— | 14 days ago |
Edit | Post #293564 |
Post edited: Escape asterisks not to make italics |
— | 15 days ago |
Edit | Post #293564 |
Post edited: Link a list page, just to be explicit |
— | 15 days ago |
Edit | Post #293564 | Initial revision | — | 15 days ago |
Answer | — |
A: Do we want MathJax? There is a small oddity wherein this post shows up strangely in list pages: > ### Regex to get text outside brackets > > I am trying to capture the content outside square brackets in groups, using this regex: (.\)\.?\ And it works perfectly for a simple string like this: testing\[\is\]\done Th... (more) |
— | 15 days ago |
Edit | Post #293557 | Initial revision | — | 15 days ago |
Answer | — |
A: Why force designation of a remote main branch? These are my theories, but I'm not particularly excited about either of them. Something to see They need something to show when you visit the website's index. Otherwise, `https://www.github.com/you/your-fork` is a really boring page. On the other hand, maybe it should be a boring page. ... (more) |
— | 15 days ago |
Edit | Post #293552 | Initial revision | — | 16 days ago |
Question | — |
Why force designation of a remote main branch? GitHub seems to require that one of the branches on it be marked as the "primary" branch. I understand this (perhaps mistakenly) to be the `origin/HEAD`. Why would they make it compulsory? On forked repositories, I'm usually making branches and submitting pull requests. There's not really a "main"... (more) |
— | 16 days ago |
Edit | Post #293531 | Initial revision | — | 22 days ago |
Answer | — |
A: How to handle correct answers that also include spam? I think this is a judgment call. - If the answerer appears to be a human, you can caution them with How We Do Things Around Here and edit the answer. - If they do it again (and this user has), nuke 'em. Maybe it's feasible to dissociate the post to the Community user or something. Maybe it's no... (more) |
— | 22 days ago |
Edit | Post #293515 |
Post edited: Supported prettyprint language. Link docs. |
— | 23 days ago |
Suggested Edit | Post #293515 |
Suggested edit: Supported prettyprint language. Link docs. (more) |
helpful | 24 days ago |
Edit | Post #293516 |
Post edited: Fix typo. Add sample |
— | 25 days ago |
Edit | Post #293516 | Initial revision | — | 25 days ago |
Answer | — |
A: Get the name of the remote tracked branch of my local branch for use in script I'm not exactly sure what you want with the whole of `rd`, but > …programmatically get the name of the remote branch which my local branch is tracking… sounds very much like the `@{upstream}`/`@{u}` shortcut. You can provide a branch before it to refer to the tracked remote of th... (more) |
— | 25 days ago |
Comment | Post #293410 |
Good thought, but it turns out I don't need both. Thanks for flagging! (more) |
— | about 1 month ago |
Comment | Post #293422 |
Thanks! I kept searching for the `advice.*` variables to turn off the hint, but I didn't think to check the output stream itself.
I think I'm going to use this but move the editor assignment in the CLI config override like I have it in OP.
```bash
git -c 'core.editor=echo' config --global --e... (more) |
— | about 1 month ago |
Edit | Post #293410 | Initial revision | — | about 1 month ago |
Answer | — |
A: Get global gitconfig path With help from hkotsubo in the comments, it seems you can follow the behavior described by Git's documentation. This will work until they change it, at least for your \Nixes and \BSDs: ```bash path="${XDGCONFIGHOME:-$HOME/.config}/git/config" [[ -f "$path" ]] && echo "$path" || echo "$HOME/.gitc... (more) |
— | about 1 month ago |
Comment | Post #293406 |
Ah, so I could do something like
```bash
path="${XDG_CONFIG_HOME:-$HOME/.config}/git/config"
[[ -f "$path" ]] && echo "$path" || echo "~/.gitconfig"
``` (more) |
— | about 1 month ago |
Edit | Post #293406 |
Post edited: system -> user |
— | about 1 month ago |
Comment | Post #293406 |
I want global, not system. You are right, that is not clear. (more) |
— | about 1 month ago |
Edit | Post #293406 | Initial revision | — | about 2 months ago |
Question | — |
Get global gitconfig path Is there a command I can run to get the path of global `gitconfig` for a user? Like `git config --global --edit`, but I want the path, not an editor window. I want the right path whether or not this file already exists. i.e. I want the path that Git will use, even if this is a brand new system. Th... (more) |
— | about 2 months ago |
Comment | Post #292140 |
Haha. And I forgot that if you omit the branch name, it just assumes you mean your `HEAD`. Good reminder! (more) |
— | 3 months ago |
Comment | Post #292140 |
I would 100% use the syntax from the top of this answer, but it *is* possible to generalize it.
```sh
git merge branch_name@{u}
``` (more) |
— | 3 months ago |
Edit | Post #292979 |
Post edited: Markdown formatting |
— | 4 months ago |
Suggested Edit | Post #292979 |
Suggested edit: Markdown formatting (more) |
helpful | 4 months ago |
Edit | Post #292900 |
Post edited: JetBrains has different tools than I remember |
— | 5 months ago |
Edit | Post #292900 | Initial revision | — | 5 months ago |
Answer | — |
A: C#: Performance hit from using calculated property instead of get-only property with initializer? You're right about the recalculation, as you can see from some easy experimentation by rigging two (dynamic) properties and logging what each one gives you. ```csharp public long TimeStamp1 { get; } = DateTime.Now.Ticks; public long TimeStamp2 => DateTime.Now.Ticks; Console.Log(Foo.TimeStamp1... (more) |
— | 5 months ago |
Comment | Post #291131 |
I ran across [this blog post](https://shazow.net/posts/how-to-maintain-a-successful-open-source-project/) from the maintainer of Python's `urllib3`. I may summarize it into an answer at some point, but you can read the original post in the meantime. (more) |
— | 5 months ago |
Comment | Post #292814 |
As of this writing, Spacy doesn't have [a pip package](https://pypi.org/project/spacy/) for Python 3.13. (more) |
— | 5 months ago |
Comment | Post #292707 |
My personal suspicion is that ReSharper thinks most people _meant_ to have dynamic resolution of the property getter. ReSharper would then expect people to be _surprised_ to discover that the initial value is never changed. (I can submit this as an answer if that's useful.) (more) |
— | 6 months ago |
Comment | Post #292707 |
Try it with dynamic values and see what happens. Then you can answer your own question.
```csharp
public long TimeStamp1 { get; } = DateTime.Now.Ticks;
public long TimeStamp2 => DateTime.Now.Ticks;
Console.Log(Foo.TimeStamp1);
Console.Log(Foo.TimeStamp2);
Thread.Sleep(3000);
Console.Log(Fo... (more) |
— | 6 months ago |
Edit | Post #292619 |
Post edited: Markdown formatting. Minor grammar help. |
— | 6 months ago |
Suggested Edit | Post #292619 |
Suggested edit: Markdown formatting. Minor grammar help. (more) |
helpful | 6 months ago |
Edit | Post #291977 |
Post edited: Fix broken image |
— | 6 months ago |
Edit | Post #291211 |
Post edited: Quote the doc directly, for clarity |
— | 6 months ago |
Edit | Post #292472 |
Post edited: Clarifications. |
— | 7 months ago |
Suggested Edit | Post #292472 |
Suggested edit: Clarifications. (more) |
helpful | 7 months ago |
Edit | Post #292393 | Initial revision | — | 7 months ago |
Answer | — |
A: Turn all changes after latest origin/main into a branch First you want to make your new branch at `HEAD` (current `main`). Then you want to point `main` back to `origin/main`. ```sh Create new branch git branch newbranchname Point main back at origin git reset --hard origin/main ``` (more) |
— | 7 months ago |
Edit | Post #292163 |
Post edited: Inline links. |
— | 8 months ago |
Edit | Post #292170 |
Post edited: Link more configuration. Add some more explainer in a footnote. |
— | 8 months ago |
Comment | Post #292170 |
The `ini` prettyprint language should have a `\b` marker in whatever they're doing at the end of `on` so `only` doesn't match. (more) |
— | 8 months ago |
Edit | Post #292170 | Initial revision | — | 8 months ago |