1. 26 Apr, 2012 19 commits
    • Jeff King's avatar
      docs: stop using asciidoc no-inline-literal · 6cf378f0
      Jeff King authored
      In asciidoc 7, backticks like `foo` produced a typographic
      effect, but did not otherwise affect the syntax. In asciidoc
      8, backticks introduce an "inline literal" inside which markup
      is not interpreted. To keep compatibility with existing
      documents, asciidoc 8 has a "no-inline-literal" attribute to
      keep the old behavior. We enabled this so that the
      documentation could be built on either version.
      
      It has been several years now, and asciidoc 7 is no longer
      in wide use. We can now decide whether or not we want
      inline literals on their own merits, which are:
      
        1. The source is much easier to read when the literal
           contains punctuation. You can use `master~1` instead
           of `master{tilde}1`.
      
        2. They are less error-prone. Because of point (1), we
           tend to make mistakes and forget the extra layer of
           quoting.
      
      This patch removes the no-inline-literal attribute from the
      Makefile and converts every use of backticks in the
      documentation to an inline literal (they must be cleaned up,
      or the example above would literally show "{tilde}" in the
      output).
      
      Problematic sites were found by grepping for '`.*[{\\]' and
      examined and fixed manually. The results were then verified
      by comparing the output of "html2text" on the set of
      generated html pages. Doing so revealed that in addition to
      making the source more readable, this patch fixes several
      formatting bugs:
      
        - HTML rendering used the ellipsis character instead of
          literal "..." in code examples (like "git log A...B")
      
        - some code examples used the right-arrow character
          instead of '->' because they failed to quote
      
        - api-config.txt did not quote tilde, and the resulting
          HTML contained a bogus snippet like:
      
            <tt><sub></tt> foo <tt></sub>bar</tt>
      
          which caused some parsers to choke and omit whole
          sections of the page.
      
        - git-commit.txt confused ``foo`` (backticks inside a
          literal) with ``foo'' (matched double-quotes)
      
        - mentions of `A U Thor <[email protected]>` used to
          erroneously auto-generate a mailto footnote for
          [email protected]
      
        - the description of --word-diff=plain incorrectly showed
          the output as "[-removed-] and {added}", not "{+added+}".
      
        - using "prime" notation like:
      
            commit `C` and its replacement `C'`
      
          confused asciidoc into thinking that everything between
          the first backtick and the final apostrophe were meant
          to be inside matched quotes
      
        - asciidoc got confused by the escaping of some of our
          asterisks. In particular,
      
            `credential.\*` and `credential.<url>.\*`
      
          properly escaped the asterisk in the first case, but
          literally passed through the backslash in the second
          case.
      Signed-off-by: default avatarJeff King <[email protected]>
      Signed-off-by: default avatarJunio C Hamano <[email protected]>
      6cf378f0
    • Junio C Hamano's avatar
      Start preparing for 1.7.10.1 · 868d6623
      Junio C Hamano authored
      Signed-off-by: default avatarJunio C Hamano <[email protected]>
      868d6623
    • Junio C Hamano's avatar
      Merge branch 'jk/run-command-eacces' into maint · 8c1ba213
      Junio C Hamano authored
      When PATH contains an unreadable directory, alias expansion code did
      not kick in, and failed with an error that said "git-subcmd" was not
      found.
      
      By Jeff King (1) and Ramsay Jones (1)
      * jk/run-command-eacces:
        run-command: treat inaccessible directories as ENOENT
        compat/mingw.[ch]: Change return type of exec functions to int
      8c1ba213
    • Junio C Hamano's avatar
      Merge branch 'jc/push-upstream-sanity' into maint · 731673b1
      Junio C Hamano authored
      The 'push to upstream' implementation was broken in some corner
      cases. "git push $there" without refspec, when the current branch is
      set to push to a remote different from $there, used to push to $there
      using the upstream information to a remote unreleated to $there.
      
      * jc/push-upstream-sanity:
        push: error out when the "upstream" semantics does not make sense
      731673b1
    • Junio C Hamano's avatar
      Merge branch 'jc/maint-clean-nested-worktree-in-subdir' into maint · 5d65c2ee
      Junio C Hamano authored
      "git clean -d -f" (not "-d -f -f") is supposed to protect nested
      working trees of independent git repositories that exist in the
      current project working tree from getting removed, but the protection
      applied only to such working trees that are at the top-level of the
      current project by mistake.
      
      * jc/maint-clean-nested-worktree-in-subdir:
        clean: preserve nested git worktree in subdirectories
      5d65c2ee
    • Junio C Hamano's avatar
      Merge branch 'jk/diff-no-rename-empty' into maint · 3f231e23
      Junio C Hamano authored
      Rename detection logic used to match two empty files as renames during
      merge-recursive, leading unnatural mismerges.
      
      By Jeff King
      * jk/diff-no-rename-empty:
        merge-recursive: don't detect renames of empty files
        teach diffcore-rename to optionally ignore empty content
        make is_empty_blob_sha1 available everywhere
        drop casts from users EMPTY_TREE_SHA1_BIN
      3f231e23
    • Junio C Hamano's avatar
      Merge branch 'rs/combine-diff-zero-context-at-the-beginning' into maint · 10a20b43
      Junio C Hamano authored
      An age-old corner case bug in combine diff (only triggered with -U0
      and the hunk at the beginning of the file needs to be shown) has been
      fixed.
      
      By René Scharfe
      * rs/combine-diff-zero-context-at-the-beginning:
        combine-diff: fix loop index underflow
      10a20b43
    • Junio C Hamano's avatar
      Merge branch 'jc/commit-unedited-template' into maint · b4bd6bb3
      Junio C Hamano authored
      When "git commit --template F" errors out because the user did not
      touch the message, it claimed that it aborts due to "empty message",
      which was utterly wrong.
      
      By Junio C Hamano (4) and Adam Monsen (1)
      * jc/commit-unedited-template:
        Documentation/git-commit: rephrase the "initial-ness" of templates
        git-commit.txt: clarify -t requires editing message
        commit: rephrase the error when user did not touch templated log message
        commit: do not trigger bogus "has templated message edited" check
        t7501: test the right kind of breakage
      b4bd6bb3
    • Junio C Hamano's avatar
      Merge branch 'jk/add-p-skip-conflicts' into maint · 4579a054
      Junio C Hamano authored
      "git add -p" is not designed to deal with unmerged paths but did
      not exclude them and tried to apply funny patches only to fail.
      
      By Jeff King
      * jk/add-p-skip-conflicts:
        add--interactive: ignore unmerged entries in patch mode
      4579a054
    • Junio C Hamano's avatar
      Merge branch 'jc/commit-hook-authorship' into maint · 695db86a
      Junio C Hamano authored
      "git commit --author=$name" did not tell the name that was being
      recorded in the resulting commit to hooks, even though it does do so
      when the end user overrode the authorship via the "GIT_AUTHOR_NAME"
      environment variable.
      
      * jc/commit-hook-authorship:
        commit: pass author/committer info to hooks
        t7503: does pre-commit-hook learn authorship?
        ident.c: add split_ident_line() to parse formatted ident line
      695db86a
    • Junio C Hamano's avatar
      Merge branch 'tr/maint-word-diff-regex-sticky' into maint · 7b90ed59
      Junio C Hamano authored
      The regexp configured with diff.wordregex was incorrectly reused
      across files.
      
      By Thomas Rast (2) and Johannes Sixt (1)
      * tr/maint-word-diff-regex-sticky:
        diff: tweak a _copy_ of diff_options with word-diff
        diff: refactor the word-diff setup from builtin_diff_cmd
        t4034: diff.*.wordregex should not be "sticky" in --word-diff
      7b90ed59
    • Junio C Hamano's avatar
      Merge branch 'jh/notes-merge-in-git-dir-worktree' into maint · 05843263
      Junio C Hamano authored
      Running "notes merge --commit" failed to perform correctly when run
      from any directory inside $GIT_DIR/.  When "notes merge" stops with
      conflicts, $GIT_DIR/NOTES_MERGE_WORKTREE is the place a user edits
      to resolve it.
      
      By Johan Herland (3) and Junio C Hamano (1)
      * jh/notes-merge-in-git-dir-worktree:
        notes-merge: Don't remove .git/NOTES_MERGE_WORKTREE; it may be the user's cwd
        notes-merge: use opendir/readdir instead of using read_directory()
        t3310: illustrate failure to "notes merge --commit" inside $GIT_DIR/
        remove_dir_recursively(): Add flag for skipping removal of toplevel dir
      05843263
    • Junio C Hamano's avatar
      Sync with 1.7.9.7 · 50bf38ac
      Junio C Hamano authored
      50bf38ac
    • Junio C Hamano's avatar
      Git 1.7.9.7 · d0f1ea60
      Junio C Hamano authored
      Signed-off-by: default avatarJunio C Hamano <[email protected]>
      d0f1ea60
    • Junio C Hamano's avatar
      Sync with 1.7.8.6 · b2bab5b3
      Junio C Hamano authored
      b2bab5b3
    • Junio C Hamano's avatar
      Git 1.7.8.6 · d9f5ef7a
      Junio C Hamano authored
      Signed-off-by: default avatarJunio C Hamano <[email protected]>
      d9f5ef7a
    • Junio C Hamano's avatar
      Sync with 1.7.7.7 · aba5f57c
      Junio C Hamano authored
      aba5f57c
    • Junio C Hamano's avatar
      Git 1.7.7.7 · 82588584
      Junio C Hamano authored
      Signed-off-by: default avatarJunio C Hamano <[email protected]>
      82588584
    • Jonathan Nieder's avatar
      bundle: remove stray single-quote from error message · 97afde15
      Jonathan Nieder authored
      After running rev-list --boundary to retrieve the list of boundary
      commits, "git bundle create" runs its own revision walk.  If in this
      stage git encounters an unfamiliar option, it writes a message with an
      unbalanced quotation mark:
      
      	error: unrecognized argument: --foo'
      
      Drop the stray quote to match the "unrecognized argument: %s" message
      used elsewhere and save translators some work.
      
      This is mostly a futureproofing measure: for now, the "rev-list
      --boundary" command catches most strange arguments on its own and the
      above message is not seen unless you try something esoteric like "git
      bundle create test.bundle --header HEAD".
      Reported-by: default avatarJunio C Hamano <[email protected]>
      Signed-off-by: default avatarJonathan Nieder <[email protected]>
      Signed-off-by: default avatarJunio C Hamano <[email protected]>
      97afde15
  2. 10 Apr, 2012 4 commits
  3. 09 Apr, 2012 8 commits
  4. 06 Apr, 2012 2 commits
  5. 05 Apr, 2012 4 commits
    • Jeff King's avatar
      run-command: treat inaccessible directories as ENOENT · 38f865c2
      Jeff King authored
      When execvp reports EACCES, it can be one of two things:
      
        1. We found a file to execute, but did not have
           permissions to do so.
      
        2. We did not have permissions to look in some directory
           in the $PATH.
      
      In the former case, we want to consider this a
      permissions problem and report it to the user as such (since
      getting this for something like "git foo" is likely a
      configuration error).
      
      In the latter case, there is a good chance that the
      inaccessible directory does not contain anything of
      interest. Reporting "permission denied" is confusing to the
      user (and prevents our usual "did you mean...?" lookup). It
      also prevents git from trying alias lookup, since we do so
      only when an external command does not exist (not when it
      exists but has an error).
      
      This patch detects EACCES from execvp, checks whether we are
      in case (2), and if so converts errno to ENOENT. This
      behavior matches that of "bash" (but not of simpler shells
      that use execvp more directly, like "dash").
      
      Test stolen from Junio.
      Signed-off-by: default avatarJeff King <[email protected]>
      Signed-off-by: default avatarJunio C Hamano <[email protected]>
      38f865c2
    • Ramsay Jones's avatar
      compat/mingw.[ch]: Change return type of exec functions to int · 1696d723
      Ramsay Jones authored
      The POSIX standard specifies a return type of int for all six exec
      functions. In addition, all exec functions return -1 on error, and
      simply do not return on success. However, the current emulation of
      the exec functions on mingw are declared with a void return type.
      
      This would cause a problem should any code attempt to call the
      exec function in a non-void context. In particular, if an exec
      function were used in a conditional it would fail to compile.
      
      In order to improve the fidelity of the emulation, we change the
      return type of the mingw_execv[p] functions to int and return -1
      on error.
      Signed-off-by: default avatarRamsay Jones <[email protected]>
      Signed-off-by: default avatarJunio C Hamano <[email protected]>
      1696d723
    • Junio C Hamano's avatar
      push: error out when the "upstream" semantics does not make sense · 135dadef
      Junio C Hamano authored
      The user can say "git push" without specifying any refspec.  When using
      the "upstream" semantics via the push.default configuration, the user
      wants to update the "upstream" branch of the current branch, which is the
      branch at a remote repository the current branch is set to integrate with,
      with this command.
      
      However, there are cases that such a "git push" that uses the "upstream"
      semantics does not make sense:
      
       - The current branch does not have branch.$name.remote configured.  By
         definition, "git push" that does not name where to push to will not
         know where to push to.  The user may explicitly say "git push $there",
         but again, by definition, no branch at repository $there is set to
         integrate with the current branch in this case and we wouldn't know
         which remote branch to update.
      
       - The current branch does have branch.$name.remote configured, but it
         does not specify branch.$name.merge that names what branch at the
         remote this branch integrates with. "git push" knows where to push in
         this case (or the user may explicitly say "git push $remote" to tell us
         where to push), but we do not know which remote branch to update.
      
       - The current branch does have its remote and upstream branch configured,
         but the user said "git push $there", where $there is not the remote
         named by "branch.$name.remote".  By definition, no branch at repository
         $there is set to integrate with the current branch in this case, and
         this push is not meant to update any branch at the remote repository
         $there.
      
      The first two cases were already checked correctly, but the third case was
      not checked and we ended up updating the branch named branch.$name.merge
      at repository $there, which was totally bogus.
      Signed-off-by: default avatarJunio C Hamano <[email protected]>
      135dadef
    • Jeff King's avatar
      add--interactive: ignore unmerged entries in patch mode · 4066bd67
      Jeff King authored
      When "add -p" sees an unmerged entry, it shows the combined
      diff and then immediately skips the hunk. This can be
      confusing in a variety of ways, depending on whether there
      are other changes to stage (in which case you get the
      superfluous combined diff output in between other hunks) or
      not (in which case you get the combined diff and the program
      exits immediately, rather than seeing "No changes").
      
      The current behavior was not planned, and is just what the
      implementation happens to do. Instead, let's explicitly
      remove unmerged entries from our list of modified files, and
      print a warning that we are ignoring them.
      
      We can cheaply find which entries are unmerged by adding
      "--raw" output to the "diff-files --numstat" we already run.
      There is one non-obvious thing we must change when parsing
      this combined output. Before this patch, when we saw a
      numstat line for a file that did not have index changes, we
      would create a new record with 'unchanged' in the 'INDEX'
      field.  Because "--raw" comes before "--numstat", we must
      move this special-case down to the raw-line case (and it is
      sufficient to move it rather than handle it in both places,
      since any file which has a --numstat will also have a --raw
      entry).
      Signed-off-by: default avatarJeff King <[email protected]>
      Signed-off-by: default avatarJunio C Hamano <[email protected]>
      4066bd67
  6. 03 Apr, 2012 2 commits
  7. 02 Apr, 2012 1 commit
    • Junio C Hamano's avatar
      Merge branch 'pt/gitk' · ca2b71a0
      Junio C Hamano authored
      * pt/gitk:
        gitk: fix setting font display with new tabbed dialog layout.
        gitk: fix tabbed preferences construction when using tcl 8.4
      ca2b71a0