1. 03 Feb, 2011 8 commits
  2. 31 Jan, 2011 1 commit
  3. 27 Jan, 2011 8 commits
    • Adam Tkac's avatar
      Don't pass "--xhtml" to hightlight in gitweb.perl script. · d2d434be
      Adam Tkac authored
      The "--xhtml" option is supported only in highlight < 3.0. There is no option
      to enforce (X)HTML output format compatible with both highlight < 3.0 and
      highlight >= 3.0. However default output format is HTML so we don't need to
      explicitly specify it.
      Signed-off-by: default avatarAdam Tkac <[email protected]>
      Helped-by: Jakub Narębski's avatarJakub Narebski <[email protected]>
      Signed-off-by: default avatarJunio C Hamano <[email protected]>
      d2d434be
    • Junio C Hamano's avatar
      Merge branch 'maint' · 99e63ef2
      Junio C Hamano authored
      * maint:
        rebase -i: clarify in-editor documentation of "exec"
        tests: sanitize more git environment variables
        fast-import: treat filemodify with empty tree as delete
        rebase: give a better error message for bogus branch
        rebase: use explicit "--" with checkout
      
      Conflicts:
      	t/t9300-fast-import.sh
      99e63ef2
    • Jonathan Nieder's avatar
      rebase -i: clarify in-editor documentation of "exec" · 960ac5ff
      Jonathan Nieder authored
      The hints in the current "instruction sheet" template look like so:
      
       # Rebase 3f142468..a1d7e01 onto 3f142468
       #
       # Commands:
       #  p, pick = use commit
       #  r, reword = use commit, but edit the commit message
       #  e, edit = use commit, but stop for amending
       #  s, squash = use commit, but meld into previous commit
       #  f, fixup = like "squash", but discard this commit's log message
       #  x <cmd>, exec <cmd> = Run a shell command <cmd>, and stop if it fails
       #
       # If you remove a line here THAT COMMIT WILL BE LOST.
       # However, if you remove everything, the rebase will be aborted.
       #
      
      This does not make it clear that the format of each line is
      
      	<insn> <commit id> <explanatory text that will be printed>
      
      but the reader will probably infer that from the automatically
      generated pick examples above it.
      
      What about the "exec" instruction?  By analogy, I might imagine that
      the format of that line is "exec <command> <explanatory text>", and
      the "x <cmd>" hint does not address that question (at first I read it
      as taking an argument <cmd> that is the name of a shell).  Meanwhile,
      the mention of <cmd> makes the hints harder to scan as a table.
      
      So remove the <cmd> and add some words to remind the reader that
      "exec" runs a command named by the rest of the line.  To make room, it
      is left to the manpage to explain that that command is run using
      $SHELL and that nonzero status from that command will pause the
      rebase.
      
      Wording from Junio.
      Signed-off-by: default avatarJonathan Nieder <[email protected]>
      Signed-off-by: default avatarJunio C Hamano <[email protected]>
      960ac5ff
    • Jeff King's avatar
      tests: sanitize more git environment variables · a1231de0
      Jeff King authored
      These variables should generally not be set in one's
      environment, but they do get set by rebase, which means
      doing an interactive rebase like:
      
        pick abcd1234 foo
        exec make test
      
      will cause false negatives in the test suite.
      Signed-off-by: default avatarJeff King <[email protected]>
      Signed-off-by: default avatarJunio C Hamano <[email protected]>
      a1231de0
    • Junio C Hamano's avatar
      Merge branch 'jn/fast-import-empty-tree-removal' into maint · 5ce32581
      Junio C Hamano authored
      * jn/fast-import-empty-tree-removal:
        fast-import: treat filemodify with empty tree as delete
      5ce32581
    • Jonathan Nieder's avatar
      fast-import: treat filemodify with empty tree as delete · 8fe533f6
      Jonathan Nieder authored
      Normal git processes do not allow one to build a tree with an empty
      subtree entry without trying hard at it.  This is in keeping with the
      general UI philosophy: git tracks content, not empty directories.
      
      v1.7.3-rc0~75^2 (2010-06-30) changed that by making it easy to include
      an empty subtree in fast-import's active commit:
      
      	M 040000 4b825dc642cb6eb9a060e54bf8d69288fbee4904 subdir
      
      One can trigger this by reading an empty tree (for example, the tree
      corresponding to an empty root commit) and trying to move it to a
      subtree.  It is better and more closely analogous to 'git read-tree
      --prefix' to treat such commands as requests to remove the subtree.
      Noticed-by: default avatarDavid Barr <[email protected]>
      Signed-off-by: default avatarJonathan Nieder <[email protected]>
      Signed-off-by: default avatarJunio C Hamano <[email protected]>
      8fe533f6
    • Jeff King's avatar
      rebase: give a better error message for bogus branch · 4ac5356c
      Jeff King authored
      When you give a non-existent branch to git-rebase, it spits
      out the usage. This can be confusing, since you may
      understand the usage just fine, but simply have made a
      mistake in the branch name.
      
      Before:
      
        $ git rebase origin bogus
        Usage: git rebase ...
      
      After:
      
        $ git rebase origin bogus
        fatal: no such branch: bogus
        Usage: git rebase ...
      Signed-off-by: default avatarJeff King <[email protected]>
      Signed-off-by: default avatarJunio C Hamano <[email protected]>
      4ac5356c
    • Jeff King's avatar
      rebase: use explicit "--" with checkout · 3b21a438
      Jeff King authored
      In the case of a ref/pathname conflict, checkout will
      already do the right thing and checkout the ref. However,
      for a non-existant ref, this has two advantages:
      
        1. If a file with that pathname exists, rebase will
           refresh the file from the index and then rebase the
           current branch instead of producing an error.
      
        2. If no such file exists, the error message using an
           explicit "--" is better:
      
             # before
             $ git rebase -i origin bogus
             error: pathspec 'bogus' did not match any file(s) known to git.
             Could not checkout bogus
      
             # after
             $ git rebase -i origin bogus
             fatal: invalid reference: bogus
             Could not checkout bogus
      
      The problems seem to be trigger-able only through "git
      rebase -i", as regular git-rebase checks the validity of the
      branch parameter as a ref very early on. However, it doesn't
      hurt to be defensive.
      Signed-off-by: default avatarJeff King <[email protected]>
      Signed-off-by: default avatarJunio C Hamano <[email protected]>
      3b21a438
  4. 24 Jan, 2011 5 commits
  5. 21 Jan, 2011 2 commits
    • Jonathan Nieder's avatar
      Subject: setup: officially support --work-tree without --git-dir · 4868b2ea
      Jonathan Nieder authored
      The original intention of --work-tree was to allow people to work in a
      subdirectory of their working tree that does not have an embedded .git
      directory.  Because their working tree, which their $cwd was in, did not
      have an embedded .git, they needed to use $GIT_DIR to specify where it is,
      and because this meant there was no way to discover where the root level
      of the working tree was, so we needed to add $GIT_WORK_TREE to tell git
      where it was.
      
      However, this facility has long been (mis)used by people's scripts to
      start git from a working tree _with_ an embedded .git directory, let git
      find .git directory, and then pretend as if an unrelated directory were
      the associated working tree of the .git directory found by the discovery
      process.  It happens to work in simple cases, and is not worth causing
      "regression" to these scripts.
      Signed-off-by: default avatarJonathan Nieder <[email protected]>
      Signed-off-by: default avatarJunio C Hamano <[email protected]>
      4868b2ea
    • Jonathan Nieder's avatar
      Documentation: do not treat reset --keep as a special case · 8c0db6fd
      Jonathan Nieder authored
      The current treatment of "git reset --keep" emphasizes how it
      differs from --hard (treatment of local changes) and how it breaks
      down into plumbing (git read-tree -m -u HEAD <commit> followed by git
      update-ref HEAD <commit>).  This can discourage people from using
      it, since it might seem to be a complex or niche option.
      
      Better to emphasize what the --keep flag is intended for --- moving
      the index and worktree from one commit to another, like "git checkout"
      would --- so the reader can make a more informed decision about the
      appropriate situations in which to use it.
      Signed-off-by: default avatarJonathan Nieder <[email protected]>
      Signed-off-by: default avatarJunio C Hamano <[email protected]>
      8c0db6fd
  6. 20 Jan, 2011 1 commit
    • Björn Steinbrink's avatar
      Correctly report corrupted objects · 25f3af3f
      Björn Steinbrink authored
      The errno check added in commit 3ba7a065 "A loose object is not corrupt
      if it cannot be read due to EMFILE" only checked for whether errno is
      not ENOENT and thus incorrectly treated "no error" as an error
      condition.
      
      Because of that, it never reached the code path that would report that
      the object is corrupted and instead caused funny errors like:
      
        fatal: failed to read object 333c4768ce595793fdab1ef3a036413e2a883853: Success
      
      So we have to extend the check to cover the case in which the object
      file was successfully read, but its contents are corrupted.
      Reported-by: default avatarWill Palmer <[email protected]>
      Signed-off-by: default avatarBjörn Steinbrink <[email protected]>
      Signed-off-by: default avatarJunio C Hamano <[email protected]>
      25f3af3f
  7. 19 Jan, 2011 15 commits