{"thread":{"id":"35018","subject":"[Bug] git show crashes with deepened shallow clone","startedAt":"2013-09-25T14:47:40Z","lastAt":"2013-09-25T18:48:51Z","messageCount":5,"participants":["Stefan Näwe","Jonathan Nieder"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"228208","messageId":"5242F78C.5060607@atlas-elektronik.com","threadId":"35018","inReplyTo":null,"subject":"[Bug] git show crashes with deepened shallow clone","fromName":"Stefan Näwe","fromEmail":"stefan.naewe@atlas-elektronik.com","sentAt":"2013-09-25T14:47:40Z","receivedAt":"2013-09-25T14:47:40Z","isPatch":false,"sender":{"key":"stefan.naewe@gmail.com","avatar":"https://avatars.githubusercontent.com/u/4468?v=4"},"body":"Just a quick report since I don't have time to bisect now (will do later\nif no other gitster is faster...)\n\nWhen I execute the below script 'git show' crashes. 'git log --oneline -2' gives\nfor example:\n\n  3808bade5b76c4663ac4a3f751dc9f1ed0b08f2e three\n  error: Could not read 1e8777edeb2b7e757f74c789e679fc6c71073897\n  fatal: Failed to traverse parents of commit 0aa4ef86004f5bb29f67e971d7963f5cf430c668\n\ngdb backtrace of one run is attached.\nIt happens on 32-bit Debian (5.0.10), 64-bit openSUSE (12.2), and Windows XP with git 1.8.4\non all systems.\n\nThe help of 'git fetch' says:\n\n  --depth=<depth>\n\n      Deepen or shorten the history of a shallow repository created by git clone with\n      --depth=<depth> option (see git-clone(1)) to the specified number of commits from\n      the tip of each remote branch history. Tags for the deepened commits are not fetched.\n-------------------------------------------------------------------------------^^^^^^^^^\n\nBut that's not true. The tag 'two' (from the script below) gets fetched when\ndeepening the repository.\n\n\n\n---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<\ngit init shallow-test &&\n(cd shallow-test &&\necho foo > file &&\ngit add file &&\ngit commit -m\"one\"\ngit tag -m\"one\" one &&\necho bar >> file &&\ngit commit -m\"two\" file\ngit tag -m\"two\" two &&\necho baz >> file &&\ngit commit -m\"three\" file\ngit tag -m\"three\" three ) &&\ngit clone --depth=1 -b three file://`pwd`/shallow-test shallow-test-clone &&\n(cd shallow-test-clone &&\ngit fetch --depth=2 &&\ngit log --oneline -2 ;\ngit show two)\n---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<\n\n\nStefan\n-- \n----------------------------------------------------------------\n/dev/random says: The cost of feathers has risen... Now even DOWN is up!\npython -c \"print '73746566616e2e6e616577654061746c61732d656c656b74726f6e696b2e636f6d'.decode('hex')\"\n\n\nCore was generated by `/home/naewe/src/git/git show two'.\nProgram terminated with signal 11, Segmentation fault.\n[New process 13783]\n#0  read_object_with_reference (sha1=0x4 <Address 0x4 out of bounds>, required_type_name=0x817ca97 \"tree\", size=0xbfdfe3d8, actual_sha1_return=0x0)\n    at cache.h:697\n697\t\tmemcpy(sha_dst, sha_src, 20);\n#0  read_object_with_reference (sha1=0x4 <Address 0x4 out of bounds>, required_type_name=0x817ca97 \"tree\", size=0xbfdfe3d8, actual_sha1_return=0x0)\n    at cache.h:697\n\ttype = -1075846344\n\trequired_type = OBJ_TREE\n\tbuffer = (void *) 0x0\n\tisize = <value optimized out>\n\tactual_sha1 = \"\\fãß¿\\000\\000\\000\\000¸âß¿±n\\022\\b¼`S\\t\"\n#1  0x081392bf in diff_tree_sha1 (old=0x4 <Address 0x4 out of bounds>, new=0x95429cc \"A1þM3Í\\205Ú\\200ZÉ¦i|\\\"QÉ\\023\\210\\034\", base=0x8155ab9 \"\", \n    opt=0xbfdfe7e4) at tree-diff.c:277\n\ttree1 = (void *) 0x954a9d0\n\ttree2 = <value optimized out>\n\tt1 = {\n  buffer = 0x1, \n  entry = {\n    sha1 = 0x0, \n    path = 0x0, \n    mode = 3219121144\n  }, \n  size = 135386226\n}\n\tt2 = {\n  buffer = 0xbfdfe3e8, \n  entry = {\n    sha1 = 0x80c44cc \"é1ÿÿÿë\\r\", '\\220' <repeats 13 times>, \"U\\211åW\\211×V\\211ÎS\\203ì\\034ÇEð\", \n    path = 0x816d329 \"Could not read %s\", \n    mode = 135991090\n  }, \n  size = 3219121108\n}\n\tsize1 = <value optimized out>\n\tsize2 = <value optimized out>\n\tretval = <value optimized out>\n#2  0x080f12d9 in log_tree_commit (opt=0xbfdfe530, commit=0x9536088) at log-tree.c:778\n\tlog = {\n  commit = 0x9536088, \n  parent = 0x0\n}\n\tshown = 0\n#3  0x08082dea in cmd_log_walk (rev=0xbfdfe530) at builtin/log.c:342\n\tcommit = (struct commit *) 0x9536088\n\tsaved_nrl = 0\n\tsaved_dcctc = 0\n#4  0x080835cd in cmd_show (argc=2, argv=0xbfdfec28, prefix=0x0) at builtin/log.c:566\n\to = (struct object *) 0x9536088\n\tname = 0x952c390 \"two\"\n\trev = {\n  commits = 0x0, \n  pending = {\n    nr = 0, \n    alloc = 0, \n    objects = 0x0\n  }, \n  boundary_commits = {\n    nr = 0, \n    alloc = 0, \n    objects = 0x0\n  }, \n  cmdline = {\n    nr = 1, \n    alloc = 24, \n    rev = 0x952c9f8\n  }, \n  prefix = 0x0, \n  def = 0x815364c \"HEAD\", \n  prune_data = {\n    raw = 0x0, \n    nr = 0, \n    has_wildcard = 0, \n    recursive = 0, \n    max_depth = 0, \n    items = 0x0\n  }, \n  sort_order = REV_SORT_IN_GRAPH_ORDER, \n  early_output = 0, \n  ignore_missing = 0, \n  dense = 1, \n  prune = 0, \n  no_walk = 1, \n  show_all = 0, \n  remove_empty_trees = 0, \n  simplify_history = 1, \n  topo_order = 0, \n  simplify_merges = 0, \n  simplify_by_decoration = 0, \n  tag_objects = 0, \n  tree_objects = 0, \n  blob_objects = 0, \n  verify_objects = 0, \n  edge_hint = 0, \n  limited = 0, \n  unpacked = 0, \n  boundary = 0, \n  count = 0, \n  left_right = 0, \n  left_only = 0, \n  right_only = 0, \n  rewrite_parents = 0, \n  print_parents = 0, \n  show_source = 0, \n  show_decorations = 0, \n  reverse = 0, \n  reverse_output_stage = 0, \n  cherry_pick = 0, \n  cherry_mark = 0, \n  bisect = 0, \n  ancestry_path = 0, \n  first_parent_only = 0, \n  line_level_traverse = 0, \n  diff = 1, \n  full_diff = 0, \n  show_root_diff = 1, \n  no_commit_id = 0, \n  verbose_header = 1, \n  ignore_merges = 0, \n  combine_merges = 1, \n  dense_combined_merges = 1, \n  always_show_header = 1, \n  shown_one = 1, \n  shown_dashes = 0, \n  show_merge = 0, \n  show_notes = 1, \n  show_notes_given = 0, \n  show_signature = 0, \n  pretty_given = 0, \n  abbrev_commit = 0, \n  abbrev_commit_given = 0, \n  use_terminator = 0, \n  missing_newline = 0, \n  date_mode_explicit = 0, \n  preserve_subject = 0, \n  disable_stdin = 0, \n  leak_pending = 0, \n  date_mode = DATE_NORMAL, \n  abbrev = 7, \n  commit_format = CMIT_FMT_MEDIUM, \n  loginfo = 0xbfdfe414, \n  nr = 0, \n  total = 0, \n  mime_boundary = 0x0, \n  patch_suffix = 0x0, \n  numbered_files = 0, \n  reroll_count = 0, \n  message_id = 0x0, \n  from_ident = {\n    name_begin = 0x0, \n    name_end = 0x0, \n    mail_begin = 0x0, \n    mail_end = 0x0, \n    date_begin = 0x0, \n    date_end = 0x0, \n    tz_begin = 0x0, \n    tz_end = 0x0\n  }, \n  ref_message_ids = 0x0, \n  add_signoff = 0, \n  extra_headers = 0x0, \n  log_reencode = 0x0, \n  subject_prefix = 0x8168e0e \"PATCH\", \n  no_inline = 0, \n  show_log_size = 0, \n  mailmap = 0x0, \n  grep_filter = {\n    pattern_list = 0x0, \n    pattern_tail = 0xbfdfe5ec, \n    header_list = 0x0, \n    header_tail = 0xbfdfe5f4, \n    pattern_expression = 0x0, \n    prefix = 0x0, \n    prefix_length = 0, \n    regexp = {\n      buffer = 0x0, \n      allocated = 0, \n      used = 0, \n      syntax = 0, \n      fastmap = 0x0, \n      translate = 0x0, \n      re_nsub = 0, \n      can_be_null = 0, \n      regs_allocated = 0, \n      fastmap_accurate = 0, \n      no_sub = 0, \n      not_bol = 0, \n      not_eol = 0, \n      newline_anchor = 0\n    }, \n    linenum = 0, \n    invert = 0, \n    ignore_case = 0, \n    status_only = 1, \n    name_only = 0, \n    unmatch_name_only = 0, \n    count = 0, \n    word_regexp = 0, \n    fixed = 0, \n    all_match = 0, \n    debug = 0, \n    binary = 0, \n    extended = 0, \n    use_reflog_filter = 0, \n    pcre = 0, \n    relative = 1, \n    pathname = 1, \n    null_following_name = 0, \n    color = -1, \n    max_depth = -1, \n    funcname = 0, \n    funcbody = 0, \n    extended_regexp_option = 0, \n    pattern_type_option = 0, \n    color_context = '\\0' <repeats 39 times>, \n    color_filename = '\\0' <repeats 39 times>, \n    color_function = '\\0' <repeats 39 times>, \n    color_lineno = '\\0' <repeats 39 times>, \n    color_match = \"\\033[1;31m\", '\\0' <repeats 32 times>, \n    color_selected = '\\0' <repeats 39 times>, \n    color_sep = \"\\033[36m\", '\\0' <repeats 34 times>, \n    regflags = 4, \n    pre_context = 0, \n    post_context = 0, \n    last_shown = 0, \n    show_hunk_mark = 0, \n    file_break = 0, \n    heading = 0, \n    priv = 0x0, \n    output = 0, \n    output_priv = 0x0\n  }, \n  graph = 0x0, \n  skip_count = -1, \n  max_count = -1, \n  max_age = 4294967295, \n  min_age = 4294967295, \n  min_parents = 0, \n  max_parents = -1, \n  diffopt = {\n    filter = 0x0, \n    orderfile = 0x0, \n    pickaxe = 0x0, \n    single_follow = 0x0, \n    a_prefix = 0x816d167 \"a/\", \n    b_prefix = 0x816d16a \"b/\", \n    flags = 52429057, \n    use_color = 2, \n    context = 3, \n    interhunkcontext = 0, \n    break_opt = -1, \n    detect_rename = 2, \n    irreversible_delete = 0, \n    skip_stat_unmatch = 0, \n    line_termination = 10, \n    output_format = 16, \n    pickaxe_opts = 0, \n    rename_score = 0, \n    rename_limit = 400, \n    needed_rename_limit = 0, \n    degraded_cc_to_c = 0, \n    show_rename_progress = 0, \n    dirstat_permille = 30, \n    setup = 0, \n    abbrev = 7, \n    prefix = 0x0, \n    prefix_length = 0, \n    stat_sep = 0x0, \n    xdl_opts = 0, \n    stat_width = -1, \n    stat_name_width = 0, \n    stat_graph_width = -1, \n    stat_count = 0, \n    word_regex = 0x0, \n    word_diff = DIFF_WORDS_NONE, \n    found_changes = 0, \n    found_follow = 0, \n    file = 0xb75574e0, \n    close_file = 0, \n    pathspec = {\n      raw = 0x0, \n      nr = 0, \n      has_wildcard = 0, \n      recursive = 0, \n      max_depth = 0, \n      items = 0x0\n    }, \n    change = 0x80d3330 <diff_change>, \n    add_remove = 0x80d34e0 <diff_addremove>, \n    format_callback = 0, \n    format_callback_data = 0x0, \n    output_prefix = 0, \n    output_prefix_length = 0, \n    output_prefix_data = 0x0\n  }, \n  pruning = {\n    filter = 0x0, \n    orderfile = 0x0, \n    pickaxe = 0x0, \n    single_follow = 0x0, \n    a_prefix = 0x0, \n    b_prefix = 0x0, \n    flags = 2049, \n    use_color = 0, \n    context = 0, \n    interhunkcontext = 0, \n    break_opt = 0, \n    detect_rename = 0, \n    irreversible_delete = 0, \n    skip_stat_unmatch = 0, \n    line_termination = 0, \n    output_format = 0, \n    pickaxe_opts = 0, \n    rename_score = 0, \n    rename_limit = 0, \n    needed_rename_limit = 0, \n    degraded_cc_to_c = 0, \n    show_rename_progress = 0, \n    dirstat_permille = 0, \n    setup = 0, \n    abbrev = 0, \n    prefix = 0x0, \n    prefix_length = 0, \n    stat_sep = 0x0, \n    xdl_opts = 0, \n    stat_width = 0, \n    stat_name_width = 0, \n    stat_graph_width = 0, \n    stat_count = 0, \n    word_regex = 0x0, \n    word_diff = DIFF_WORDS_NONE, \n    found_changes = 0, \n    found_follow = 0, \n    file = 0x0, \n    close_file = 0, \n    pathspec = {\n      raw = 0x0, \n      nr = 0, \n      has_wildcard = 0, \n      recursive = 0, \n      max_depth = 0, \n      items = 0x0\n    }, \n    change = 0x8117d80 <file_change>, \n    add_remove = 0x8117d40 <file_add_remove>, \n    format_callback = 0, \n    format_callback_data = 0x0, \n    output_prefix = 0, \n    output_prefix_length = 0, \n    output_prefix_data = 0x0\n  }, \n  reflog_info = 0x0, \n  children = {\n    name = 0x0, \n    size = 0, \n    nr = 0, \n    hash = 0x0\n  }, \n  merge_simplification = {\n    name = 0x0, \n    size = 0, \n    nr = 0, \n    hash = 0x0\n  }, \n  treesame = {\n    name = 0x0, \n    size = 0, \n    nr = 0, \n    hash = 0x0\n  }, \n  notes_opt = {\n    use_default_notes = -1, \n    extra_notes_refs = {\n      items = 0x0, \n      nr = 0, \n      alloc = 0, \n      strdup_strings = 0, \n      cmp = 0\n    }\n  }, \n  count_left = 0, \n  count_right = 0, \n  count_same = 0, \n  line_log_data = {\n    name = 0x0, \n    size = 0, \n    nr = 0, \n    hash = 0x0\n  }\n}\n\tobjects = (struct object_array_entry *) 0x9542090\n\topt = {\n  def = 0x815364c \"HEAD\", \n  tweak = 0x80819c0 <show_rev_tweak_rev>, \n  submodule = 0x0, \n  assume_dashdash = 0, \n  revarg_opt = 0\n}\n\tmatch_all = {\n  raw = 0x0, \n  nr = 0, \n  has_wildcard = 0, \n  recursive = 0, \n  max_depth = 0, \n  items = 0x0\n}\n\ti = 0\n\tcount = 1\n\tret = 0\n#5  0x0804bb89 in handle_internal_command (argc=2, argv=0xbfdfec28) at git.c:291\n\tp = (struct cmd_struct *) 0x8181870\n\tcmd = <value optimized out>\n\ti = 1\n\tcommands = {{\n    cmd = 0x8166829 \"add\", \n    fn = 0x804c7b0 <cmd_add>, \n    option = 9\n  }, {\n    cmd = 0x815039e \"annotate\", \n    fn = 0x804d300 <cmd_annotate>, \n    option = 1\n  }, {\n    cmd = 0x8150c6a \"apply\", \n    fn = 0x8054de0 <cmd_apply>, \n    option = 2\n  }, {\n    cmd = 0x8152cd2 \"archive\", \n    fn = 0x8055a10 <cmd_archive>, \n    option = 0\n  }, {\n    cmd = 0x81503a7 \"bisect--helper\", \n    fn = 0x8055db0 <cmd_bisect__helper>, \n    option = 1\n  }, {\n    cmd = 0x81503b6 \"blame\", \n    fn = 0x8058710 <cmd_blame>, \n    option = 1\n  }, {\n    cmd = 0x8166943 \"branch\", \n    fn = 0x805b2b0 <cmd_branch>, \n    option = 1\n  }, {\n    cmd = 0x81572d5 \"bundle\", \n    fn = 0x805cee0 <cmd_bundle>, \n    option = 2\n  }, {\n    cmd = 0x81503bc \"cat-file\", \n    fn = 0x805d390 <cmd_cat_file>, \n    option = 1\n  }, {\n    cmd = 0x81503c5 \"check-attr\", \n    fn = 0x805df80 <cmd_check_attr>, \n    option = 1\n  }, {\n    cmd = 0x81503d0 \"check-ignore\", \n    fn = 0x805e6a0 <cmd_check_ignore>, \n    option = 9\n  }, {\n    cmd = 0x81503dd \"check-mailmap\", \n    fn = 0x805ea20 <cmd_check_mailmap>, \n    option = 1\n  }, {\n    cmd = 0x81503eb \"check-ref-format\", \n    fn = 0x805eba0 <cmd_check_ref_format>, \n    option = 0\n  }, {\n    cmd = 0x81573fb \"checkout\", \n    fn = 0x8060cb0 <cmd_checkout>, \n    option = 9\n  }, {\n    cmd = 0x81503fc \"checkout-index\", \n    fn = 0x805f1f0 <cmd_checkout_index>, \n    option = 9\n  }, {\n    cmd = 0x81784be \"cherry\", \n    fn = 0x8083760 <cmd_cherry>, \n    option = 1\n  }, {\n    cmd = 0x81784dd \"cherry-pick\", \n    fn = 0x80a96a0 <cmd_cherry_pick>, \n    option = 9\n  }, {\n    cmd = 0x815040b \"clean\", \n    fn = 0x8063f90 <cmd_clean>, \n    option = 9\n  }, {\n    cmd = 0x8150411 \"clone\", \n    fn = 0x8065230 <cmd_clone>, \n    option = 0\n  }, {\n    cmd = 0x8171698 \"column\", \n    fn = 0x8066d60 <cmd_column>, \n    option = 2\n  }, {\n    cmd = 0x81586f8 \"commit\", \n    fn = 0x8069c90 <cmd_commit>, \n    option = 9\n  }, {\n    cmd = 0x8150417 \"commit-tree\", \n    fn = 0x80670c0 <cmd_commit_tree>, \n    option = 1\n  }, {\n    cmd = 0x815060e \"config\", \n    fn = 0x806b8a0 <cmd_config>, \n    option = 2\n  }, {\n    cmd = 0x8150423 \"count-objects\", \n    fn = 0x806c380 <cmd_count_objects>, \n    option = 1\n  }, {\n    cmd = 0x8150431 \"credential\", \n    fn = 0x806cc50 <cmd_credential>, \n    option = 2\n  }, {\n    cmd = 0x815043c \"describe\", \n    fn = 0x806d600 <cmd_describe>, \n    option = 1\n  }, {\n    cmd = 0x816f7b4 \"diff\", \n    fn = 0x806e9c0 <cmd_diff>, \n    option = 0\n  }, {\n    cmd = 0x8150445 \"diff-files\", \n    fn = 0x806de80 <cmd_diff_files>, \n    option = 9\n  }, {\n    cmd = 0x8150450 \"diff-index\", \n    fn = 0x806e0d0 <cmd_diff_index>, \n    option = 1\n  }, {\n    cmd = 0x815045b \"diff-tree\", \n    fn = 0x806e290 <cmd_diff_tree>, \n    option = 1\n  }, {\n    cmd = 0x817c5a2 \"fast-export\", \n    fn = 0x806fab0 <cmd_fast_export>, \n    option = 1\n  }, {\n    cmd = 0x815737e \"fetch\", \n    fn = 0x80735c0 <cmd_fetch>, \n    option = 1\n  }, {\n    cmd = 0x8150465 \"fetch-pack\", \n    fn = 0x8070da0 <cmd_fetch_pack>, \n    option = 1\n  }, {\n    cmd = 0x8150470 \"fmt-merge-msg\", \n    fn = 0x8075360 <cmd_fmt_merge_msg>, \n    option = 1\n  }, {\n    cmd = 0x815047e \"for-each-ref\", \n    fn = 0x8076ec0 <cmd_for_each_ref>, \n    option = 1\n  }, {\n    cmd = 0x815048b \"format-patch\", \n    fn = 0x8083cd0 <cmd_format_patch>, \n    option = 1\n  }, {\n    cmd = 0x817112d \"fsck\", \n    fn = 0x80780f0 <cmd_fsck>, \n    option = 1\n  }, {\n    cmd = 0x8150498 \"fsck-objects\", \n    fn = 0x80780f0 <cmd_fsck>, \n    option = 1\n  }, {\n    cmd = 0x815cb72 \"gc\", \n    fn = 0x8078de0 <cmd_gc>, \n    option = 1\n  }, {\n    cmd = 0x81504a5 \"get-tar-commit-id\", \n    fn = 0x80afab0 <cmd_get_tar_commit_id>, \n    option = 0\n  }, {\n    cmd = 0x815ced2 \"grep\", \n    fn = 0x8079c90 <cmd_grep>, \n    option = 2\n  }, {\n    cmd = 0x81504b7 \"hash-object\", \n    fn = 0x807b980 <cmd_hash_object>, \n    option = 0\n  }, {\n    cmd = 0x815012a \"help\", \n    fn = 0x807c2a0 <cmd_help>, \n    option = 0\n  }, {\n    cmd = 0x81504c3 \"index-pack\", \n    fn = 0x807ec50 <cmd_index_pack>, \n    option = 2\n  }, {\n    cmd = 0x81574bf \"init\", \n    fn = 0x8081510 <cmd_init_db>, \n    option = 0\n  }, {\n    cmd = 0x81504ce \"init-db\", \n    fn = 0x8081510 <cmd_init_db>, \n    option = 0\n  }, {\n    cmd = 0x8177240 \"log\", \n    fn = 0x8082fd0 <cmd_log>, \n    option = 1\n  }, {\n    cmd = 0x81504d6 \"ls-files\", \n    fn = 0x8085d90 <cmd_ls_files>, \n    option = 1\n  }, {\n    cmd = 0x81504df \"ls-remote\", \n    fn = 0x8086e50 <cmd_ls_remote>, \n    option = 2\n  }, {\n    cmd = 0x81504e9 \"ls-tree\", \n    fn = 0x8087310 <cmd_ls_tree>, \n    option = 1\n  }, {\n    cmd = 0x81504f1 \"mailinfo\", \n    fn = 0x8088db0 <cmd_mailinfo>, \n    option = 0\n  }, {\n    cmd = 0x81504fa \"mailsplit\", \n    fn = 0x808a140 <cmd_mailsplit>, \n    option = 0\n  }, {\n    cmd = 0x8161763 \"merge\", \n    fn = 0x808bd20 <cmd_merge>, \n    option = 9\n  }, {\n    cmd = 0x8150504 \"merge-base\", \n    fn = 0x808dce0 <cmd_merge_base>, \n    option = 1\n  }, {\n    cmd = 0x815050f \"merge-file\", \n    fn = 0x808e0f0 <cmd_merge_file>, \n    option = 2\n  }, {\n    cmd = 0x815051a \"merge-index\", \n    fn = 0x808e7e0 <cmd_merge_index>, \n    option = 1\n  }, {\n    cmd = 0x8150526 \"merge-ours\", \n    fn = 0x808e9b0 <cmd_merge_ours>, \n    option = 1\n  }, {\n    cmd = 0x8150531 \"merge-recursive\", \n    fn = 0x808ea80 <cmd_merge_recursive>, \n    option = 9\n  }, {\n    cmd = 0x8150541 \"merge-recursive-ours\", \n    fn = 0x808ea80 <cmd_merge_recursive>, \n    option = 9\n  }, {\n    cmd = 0x8150556 \"merge-recursive-theirs\", \n    fn = 0x808ea80 <cmd_merge_recursive>, \n    option = 9\n  }, {\n    cmd = 0x815056d \"merge-subtree\", \n    fn = 0x808ea80 <cmd_merge_recursive>, \n    option = 9\n  }, {\n    cmd = 0x815057b \"merge-tree\", \n    fn = 0x808f310 <cmd_merge_tree>, \n    option = 1\n  }, {\n    cmd = 0x8150586 \"mktag\", \n    fn = 0x808f6c0 <cmd_mktag>, \n    option = 1\n  }, {\n    cmd = 0x815058c \"mktree\", \n    fn = 0x808fc80 <cmd_mktree>, \n    option = 1\n  }, {\n    cmd = 0x8150593 \"mv\", \n    fn = 0x8090440 <cmd_mv>, \n    option = 9\n  }, {\n    cmd = 0x8150596 \"name-rev\", \n    fn = 0x8090fc0 <cmd_name_rev>, \n    option = 1\n  }, {\n    cmd = 0x81625e1 \"notes\", \n    fn = 0x8092c50 <cmd_notes>, \n    option = 1\n  }, {\n    cmd = 0x816cc19 \"pack-objects\", \n    fn = 0x8097060 <cmd_pack_objects>, \n    option = 1\n  }, {\n    cmd = 0x815059f \"pack-redundant\", \n    fn = 0x80996d0 <cmd_pack_redundant>, \n    option = 1\n  }, {\n    cmd = 0x81505ae \"pack-refs\", \n    fn = 0x809a8c0 <cmd_pack_refs>, \n    option = 1\n  }, {\n    cmd = 0x81505b8 \"patch-id\", \n    fn = 0x809a990 <cmd_patch_id>, \n    option = 0\n  }, {\n    cmd = 0x81505c1 \"peek-remote\", \n    fn = 0x8086e50 <cmd_ls_remote>, \n    option = 2\n  }, {\n    cmd = 0x81505cd \"pickaxe\", \n    fn = 0x8058710 <cmd_blame>, \n    option = 1\n  }, {\n    cmd = 0x815b54e \"prune\", \n    fn = 0x809b360 <cmd_prune>, \n    option = 1\n  }, {\n    cmd = 0x81505d5 \"prune-packed\", \n    fn = 0x809b150 <cmd_prune_packed>, \n    option = 1\n  }, {\n    cmd = 0x817bd88 \"push\", \n    fn = 0x809be70 <cmd_push>, \n    option = 1\n  }, {\n    cmd = 0x81505e2 \"read-tree\", \n    fn = 0x809c800 <cmd_read_tree>, \n    option = 1\n  }, {\n    cmd = 0x8168c20 \"receive-pack\", \n    fn = 0x809daf0 <cmd_receive_pack>, \n    option = 0\n  }, {\n    cmd = 0x8153e8e \"reflog\", \n    fn = 0x80a0830 <cmd_reflog>, \n    option = 1\n  }, {\n    cmd = 0x81664cc \"remote\", \n    fn = 0x80a2bc0 <cmd_remote>, \n    option = 1\n  }, {\n    cmd = 0x81505ec \"remote-ext\", \n    fn = 0x80a4fa0 <cmd_remote_ext>, \n    option = 0\n  }, {\n    cmd = 0x81505f7 \"remote-fd\", \n    fn = 0x80a5170 <cmd_remote_fd>, \n    option = 0\n  }, {\n    cmd = 0x8150601 \"replace\", \n    fn = 0x80a54d0 <cmd_replace>, \n    option = 1\n  }, {\n    cmd = 0x8150609 \"repo-config\", \n    fn = 0x806c210 <cmd_repo_config>, \n    option = 2\n  }, {\n    cmd = 0x8150615 \"rerere\", \n    fn = 0x80a5790 <cmd_rerere>, \n    option = 1\n  }, {\n    cmd = 0x8160ee5 \"reset\", \n    fn = 0x80a5ef0 <cmd_reset>, \n    option = 1\n  }, {\n    cmd = 0x815061c \"rev-list\", \n    fn = 0x80a6a10 <cmd_rev_list>, \n    option = 1\n  }, {\n    cmd = 0x8150625 \"rev-parse\", \n    fn = 0x80a7a20 <cmd_rev_parse>, \n    option = 0\n  }, {\n    cmd = 0x815062f \"revert\", \n    fn = 0x80a97a0 <cmd_revert>, \n    option = 9\n  }, {\n    cmd = 0x8150636 \"rm\", \n    fn = 0x80a9940 <cmd_rm>, \n    option = 1\n  }, {\n    cmd = 0x8150639 \"send-pack\", \n    fn = 0x80aa650 <cmd_send_pack>, \n    option = 1\n  }, {\n    cmd = 0x8150643 \"shortlog\", \n    fn = 0x80ab670 <cmd_shortlog>, \n    option = 6\n  }, {\n    cmd = 0x815064c \"show\", \n    fn = 0x80831e0 <cmd_show>, \n    option = 1\n  }, {\n    cmd = 0x8150651 \"show-branch\", \n    fn = 0x80ac110 <cmd_show_branch>, \n    option = 1\n  }, {\n    cmd = 0x815065d \"show-ref\", \n    fn = 0x80ada40 <cmd_show_ref>, \n    option = 1\n  }, {\n    cmd = 0x8150666 \"stage\", \n    fn = 0x804c7b0 <cmd_add>, \n    option = 9\n  }, {\n    cmd = 0x8178d99 \"status\", \n    fn = 0x8068920 <cmd_status>, \n    option = 9\n  }, {\n    cmd = 0x815066c \"stripspace\", \n    fn = 0x80adfe0 <cmd_stripspace>, \n    option = 0\n  }, {\n    cmd = 0x8150677 \"symbolic-ref\", \n    fn = 0x80ae220 <cmd_symbolic_ref>, \n    option = 1\n  }, {\n    cmd = 0x817bac5 \"tag\", \n    fn = 0x80aebe0 <cmd_tag>, \n    option = 1\n  }, {\n    cmd = 0x8150684 \"tar-tree\", \n    fn = 0x80afb70 <cmd_tar_tree>, \n    option = 0\n  }, {\n    cmd = 0x815068d \"unpack-file\", \n    fn = 0x80afcf0 <cmd_unpack_file>, \n    option = 1\n  }, {\n    cmd = 0x8150699 \"unpack-objects\", \n    fn = 0x80b0650 <cmd_unpack_objects>, \n    option = 1\n  }, {\n    cmd = 0x81506a8 \"update-index\", \n    fn = 0x80b18a0 <cmd_update_index>, \n    option = 1\n  }, {\n    cmd = 0x81506b5 \"update-ref\", \n    fn = 0x80b2fd0 <cmd_update_ref>, \n    option = 1\n  }, {\n    cmd = 0x81506c0 \"update-server-info\", \n    fn = 0x80b3230 <cmd_update_server_info>, \n    option = 1\n  }, {\n    cmd = 0x8152ccb \"upload-archive\", \n    fn = 0x80b33f0 <cmd_upload_archive>, \n    option = 0\n  }, {\n    cmd = 0x81506d3 \"upload-archive--writer\", \n    fn = 0x80b3570 <cmd_upload_archive_writer>, \n    option = 0\n  }, {\n    cmd = 0x81506ea \"var\", \n    fn = 0x80b3690 <cmd_var>, \n    option = 2\n  }, {\n    cmd = 0x81506ee \"verify-pack\", \n    fn = 0x80b3850 <cmd_verify_pack>, \n    option = 0\n  }, {\n    cmd = 0x81506fa \"verify-tag\", \n    fn = 0x80b3ba0 <cmd_verify_tag>, \n    option = 1\n  }, {\n    cmd = 0x8173a7b \"version\", \n    fn = 0x80e85e0 <cmd_version>, \n    option = 0\n  }, {\n    cmd = 0x8150705 \"whatchanged\", \n    fn = 0x8083060 <cmd_whatchanged>, \n    option = 1\n  }, {\n    cmd = 0x816b401 \"write-tree\", \n    fn = 0x80b3e90 <cmd_write_tree>, \n    option = 1\n  }}\n#6  0x0804bdcf in main (argc=2, av=0x25207469) at git.c:500\n\targv = (const char **) 0xbfdfec28\n\tcmd = 0xbfe0018d \"show\"\n\tdone_help = 0\n\twas_alias = 0\n"},{"id":"228211","messageId":"5242FCD0.8050900@atlas-elektronik.com","threadId":"35018","inReplyTo":"5242F78C.5060607@atlas-elektronik.com","subject":"Re: [Bug] git show crashes with deepened shallow clone","fromName":"Stefan Näwe","fromEmail":"stefan.naewe@atlas-elektronik.com","sentAt":"2013-09-25T15:10:08Z","receivedAt":"2013-09-25T15:10:08Z","isPatch":false,"sender":{"key":"stefan.naewe@gmail.com","avatar":"https://avatars.githubusercontent.com/u/4468?v=4"},"body":"Am 25.09.2013 16:47, schrieb Stefan Näwe:\n> Just a quick report since I don't have time to bisect now (will do later\n> if no other gitster is faster...)\n\nSeems to be somewhere between v1.8.3.1 (OK) and v1.8.3.2 (not OK) !!\n\n\n> \n> When I execute the below script 'git show' crashes. 'git log --oneline -2' gives\n> for example:\n> \n>   3808bade5b76c4663ac4a3f751dc9f1ed0b08f2e three\n>   error: Could not read 1e8777edeb2b7e757f74c789e679fc6c71073897\n>   fatal: Failed to traverse parents of commit 0aa4ef86004f5bb29f67e971d7963f5cf430c668\n> \n> gdb backtrace of one run is attached.\n> It happens on 32-bit Debian (5.0.10), 64-bit openSUSE (12.2), and Windows XP with git 1.8.4\n> on all systems.\n> \n> The help of 'git fetch' says:\n> \n>   --depth=<depth>\n> \n>       Deepen or shorten the history of a shallow repository created by git clone with\n>       --depth=<depth> option (see git-clone(1)) to the specified number of commits from\n>       the tip of each remote branch history. Tags for the deepened commits are not fetched.\n> -------------------------------------------------------------------------------^^^^^^^^^\n> \n> But that's not true. The tag 'two' (from the script below) gets fetched when\n> deepening the repository.\n\nv1.8.3.1 fetches the tag also.\n\n\nStefan\n-- \n----------------------------------------------------------------\n/dev/random says: Pobody's Nerfect!\npython -c \"print '73746566616e2e6e616577654061746c61732d656c656b74726f6e696b2e636f6d'.decode('hex')\"\n"},{"id":"228214","messageId":"524300FF.5000801@atlas-elektronik.com","threadId":"35018","inReplyTo":"5242F78C.5060607@atlas-elektronik.com","subject":"Re: [Bug] git show crashes with deepened shallow clone","fromName":"Stefan Näwe","fromEmail":"stefan.naewe@atlas-elektronik.com","sentAt":"2013-09-25T15:27:59Z","receivedAt":"2013-09-25T15:27:59Z","isPatch":false,"sender":{"key":"stefan.naewe@gmail.com","avatar":"https://avatars.githubusercontent.com/u/4468?v=4"},"body":"Am 25.09.2013 16:47, schrieb Stefan Näwe:\n> Just a quick report since I don't have time to bisect now (will do later\n> if no other gitster is faster...)\n\nI'd marry 'git bisect' if I wasn't already... ;-)\n\nThis is what it gives me if I use my script (slightly modified to also run make)\nwith 'git bisect run':\n\n6035d6aad8ca11954c0d7821f6f3e7c047039c8f is the first bad commit\ncommit 6035d6aad8ca11954c0d7821f6f3e7c047039c8f\nAuthor: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>\nDate:   Sun May 26 08:16:15 2013 +0700\n\n    fetch-pack: prepare updated shallow file before fetching the pack\n\n    index-pack --strict looks up and follows parent commits. If shallow\n    information is not ready by the time index-pack is run, index-pack may\n    be led to non-existent objects. Make fetch-pack save shallow file to\n    disk before invoking index-pack.\n\n    git learns new global option --shallow-file to pass on the alternate\n    shallow file path. Undocumented (and not even support --shallow-file=\n    syntax) because it's unlikely to be used again elsewhere.\n\n    Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>\n    Signed-off-by: Junio C Hamano <gitster@pobox.com>\n\n:100644 100644 67bd5091be0b34bfea075cd60281d22cf5b34768 6e9c7cd9d5da7d24d4810b36039681f184325932 M      commit.h\n:100644 100644 f156dd4fac30cda4e09c508b7091cdb8d96917e2 6b5467c6dec9645f53d83cdad2467a158db622c0 M      fetch-pack.c\n:100644 100644 1ada169d5cff3051effee33c6f9ba5b9be15b2e6 88eef5a7cc6d36f6e17f4855945116dd6f1b0681 M      git.c\n:100644 100644 6be915f38f1fe8dbe0a22c4cd8ae2569331f483f cbe2526d8c2b2643957eea2729a16269a7a74fab M      shallow.c\n:040000 040000 5333beeb4db3fc37c37e5a4d03816c4750ce6b28 3b0fb999b8655155cba24e2d09ebff29058d29d7 M      t\nbisect run success\n\n\nStefan\n-- \n----------------------------------------------------------------\n/dev/random says: Answers: $1 * Correct answers: $5 * Dumb looks: Free! *\npython -c \"print '73746566616e2e6e616577654061746c61732d656c656b74726f6e696b2e636f6d'.decode('hex')\"\n"},{"id":"228220","messageId":"loom.20130925T200459-360@post.gmane.org","threadId":"35018","inReplyTo":"524300FF.5000801@atlas-elektronik.com","subject":"Re: [Bug] git show crashes with deepened shallow clone","fromName":"Stefan Näwe","fromEmail":"stefan.naewe@gmail.com","sentAt":"2013-09-25T18:08:31Z","receivedAt":"2013-09-25T18:08:31Z","isPatch":false,"sender":{"key":"stefan.naewe@gmail.com","avatar":"https://avatars.githubusercontent.com/u/4468?v=4"},"body":"Stefan Näwe <stefan.naewe <at> atlas-elektronik.com> writes:\n\n> Am 25.09.2013 16:47, schrieb Stefan Näwe:\n> This is what it gives me if I use my script (slightly modified \n> to also run make) with 'git bisect run':\n> \n> 6035d6aad8ca11954c0d7821f6f3e7c047039c8f is the first bad commit\n\nAnd to answer myself once more:\n\nThat's fixed in\n\n   6da8bdc fetch-pack: do not remove .git/shallow file when --depth is not specified\"\n\nSorry for all the noise.\n\nStefan\n"},{"id":"228222","messageId":"20130925184851.GX9464@google.com","threadId":"35018","inReplyTo":"loom.20130925T200459-360@post.gmane.org","subject":"Re: [Bug] git show crashes with deepened shallow clone","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2013-09-25T18:48:51Z","receivedAt":"2013-09-25T18:48:51Z","isPatch":false,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Stefan Näwe wrote:\n> Stefan Näwe <stefan.naewe <at> atlas-elektronik.com> writes:\n\n>> 6035d6aad8ca11954c0d7821f6f3e7c047039c8f is the first bad commit\n>\n> And to answer myself once more:\n>\n> That's fixed in\n>\n>    6da8bdc fetch-pack: do not remove .git/shallow file when --depth is not specified\"\n>\n> Sorry for all the noise.\n\nNo problem.\n\nIt's probably worth releasing 1.8.4.1 soon.  Thanks for a reminder.\n"}]}