Skip to content

Instantly share code, notes, and snippets.

View jennings's full-sized avatar
🦄
What a mess I've made

Stephen Jennings jennings

🦄
What a mess I've made
View GitHub Profile

General idea

Jujutsu should treat the change-id header as an opaque string. However, if the value happens to be formatted like a Jujutsu change ID (40 character reverse hex), then try to use it as the Jujutsu change ID as well.

If the community agrees to use jj's format, then everyone sees jj-style change IDs, and Jujutsu behaves as though they really are change IDs. If a competing format appears, jj can still use it to track amended commits but doesn't get confused and try to use it as the actual change ID.

// <PackageReference Include="Microsoft.TeamFoundationServer.Client" Version="19.239.0-preview" />
// <PackageReference Include="Microsoft.VisualStudio.Services.InteractiveClient" Version="19.239.0-preview" />
public class RetargetPullRequests
{
private readonly ILogger _log;
private readonly AzureDevOpsConfiguration _config;
private readonly GitHttpClient _gitClient;
public RetargetPullRequests(ILogger<RetargetPullRequests> log, IOptions<AzureDevOpsConfiguration> config, VssConnection connection)
@jennings
jennings / gist:9fe1432f394fc18a7eb0c2b2eab8dad3
Created August 23, 2024 20:55
Code reviews should have a single commit
When reviewing code, you should strive to review a single commit per review.
# How do I review a single commit?
If you are using pull requests, the branch you're reviewing should only have one commit to merge into the target branch.
# How do I address review feedback if I can only have one commit in my branch?
Make your changes and _amend_ the commit, then force push with `git push -f`.
@jennings
jennings / FirefoxColorSettings.md
Last active August 13, 2024 15:40
Firefox Color settings

Switching to Jujutsu workflows

When coming to Jujutsu, one may try to emulate their Git workflows directly. This is possible, but can cause a lot of difficulty.

This guide shows how to translate Git workflows to Jujutsu.

Getting started

Cloning an existing repository

@jennings
jennings / Makefile
Last active January 10, 2023 17:40
Run Azurite over HTTPS with a trusted certificate
# Makefile for running Azurite with or without HTTPS. Requires the
# mkcert and azurite commands to be available.
#
# Usage:
# make - Run Azurite with HTTPS
# make https - Run Azurite with HTTPS
# make http - Run Azurite with HTTP
# make install - Create certificates using mkcert (runs automatically)
# make reset - Clear the Azurite database
var ParseError = from _ in Parse.String("error") select Level.Error;
var ParseWarning = from _ in Parse.String("warning") select Level.Warning;
var ParseLevel = ParseError.Or(ParseWarning);
var ParsePosition =
from lp in Parse.String("(")
from line in Parse.Number
from comma in Parse.String(", ")
from column in Parse.Number
from rp in Parse.String(")")
select new Position
@jennings
jennings / README.md
Created June 16, 2022 15:58
Kdiff3 line ending bug
@jennings
jennings / ForeignKey_Option1.cs
Last active December 2, 2021 22:00
ForeignKey and InverseProperty placements for Entity Framework Core
public class Person
{
public int Id { get; set; }
public List<Book> AuthoredBooks { get; set; }
public List<Book> EditedBooks { get; set; }
}
public class Book
{
public int Id { get; set; }
@jennings
jennings / Makefile
Created May 14, 2021 16:55
Makefile syntax to run different commands on Windows. Works with GNU Make, not NMake
target:
ifeq ($(OS),Windows_NT)
powershell -NoProfile -Command "Get-Date"
else
date
endif