Skip to content

Instantly share code, notes, and snippets.

@tmiller
tmiller / merge
Last active November 14, 2021 11:16
Bash script to merge master into all branches
#!/bin/bash
# Merges the master branch into all other branches
#
# Process:
#
# - Save the name of the current branch
# - If the current branch is not master then checkout master.
# - Pull the latest changes for master from its upstream branch.
# - Loop over each local branch.
@tmiller
tmiller / trailing_spaces.json
Created April 3, 2013 22:51
Trailing spaces settings
{
"trailing_spaces_highlight_color": "invalid",
"trailing_spaces_modified_lines_only": true,
"trailing_spaces_include_current_line": false,
"trailing_spaces_trim_on_save": true
}
# lib/cryptography_adapter.rb
# Parent adapter class
class CryptographyAdapter
def encrypted?(data)
raise "Method not implmented"
end
def decrypt(data)
@tmiller
tmiller / pivotal_tracker_cli.go
Last active December 16, 2015 13:19
Pivotal tracker CLI example
package main
import (
"fmt"
"github.com/tmiller/pt"
"os/exec"
)
func main() {
pivotalTracker := pt.PivotalTracker{"API Key"}
@tmiller
tmiller / ruby-syntax-settings.json
Last active December 16, 2015 22:49
A temporary place for my package settings for sublime
{
"tab_size": 2,
"translate_tabs_to_spaces": true,
"draw_white_space": "all"
}
@tmiller
tmiller / README.md
Last active August 30, 2024 01:22
A very simple example of using a map of channels for pub/sub in go.
require 'action_mailer'
require 'mail'
module ActionMailer
class TestCase
def set_expected_mail
@expected = Mail.new
@expected.content_type = "text/plain; charset=#{charset}"
@expected.mime_version = '1.0'
require File.dirname(__FILE__) + '/../test_helper'
class RangeTest < Test::Unit::TestCase
test <<-TEST do
Range#coinsides_with?
|
|
TEST
range = Time.zone.now..Time.zone.now
@tmiller
tmiller / tokenizer.rb
Created August 25, 2013 02:59
Hand written CSV tokenizer
class Tokenizer
class Buffer # :nodoc:
def initialize io
@io = io
@buffer = []
end
def peek len = 1
(len - @buffer.length).times {
diff --git a/builtin/fetch.c b/builtin/fetch.c
index 5647055..b67a350 100644
--- a/builtin/fetch.c
+++ b/builtin/fetch.c
@@ -810,11 +810,6 @@ static int do_fetch(struct transport *transport,
if (tags == TAGS_DEFAULT && autotags)
transport_set_option(transport, TRANS_OPT_FOLLOWTAGS, "1");
- if (fetch_refs(transport, ref_map)) {
- free_refs(ref_map);