Commit graph

40951 commits

Author SHA1 Message Date
Junio C Hamano 684fea3794 Merge branch 'xf/user-manual-ff' into maint
* xf/user-manual-ff:
  user-manual: fix the description of fast-forward
2015-11-04 14:20:49 -08:00
Junio C Hamano 6c66686e0b Merge branch 'xf/user-manual-markup' into maint
AsciiDoc markup fixes.

* xf/user-manual-markup:
  Documentation: match undefline with the text in old release notes
  Documentation: match underline with the text
  Documentation: fix header markup
2015-11-04 14:20:47 -08:00
Junio C Hamano 7974b3fd75 Merge branch 'jc/everyday-markup' into maint
AsciiDoc markup fixes.

* jc/everyday-markup:
  Documentation/everyday: match undefline with the text
2015-11-04 14:20:46 -08:00
Junio C Hamano bc1e0481bf Merge branch 'jc/em-dash-in-doc' into maint
AsciiDoc markup fixes.

* jc/em-dash-in-doc:
  Documentation: AsciiDoc spells em-dash as double-dashes, not triple
2015-11-04 14:20:45 -08:00
Junio C Hamano d091031ce2 Merge branch 'es/worktree-add' into maint
* es/worktree-add:
  worktree: usage: denote <branch> as optional with 'add'
2015-11-04 14:20:44 -08:00
Junio C Hamano fdca2bed90 Merge branch 'mk/blame-error-message' into maint
The error message from "git blame --contents --reverse" incorrectly
talked about "--contents --children".

* mk/blame-error-message:
  blame: fix option name in error message
2015-11-03 15:32:43 -08:00
Junio C Hamano 5c15ca0b3c Merge branch 'jk/merge-file-exit-code' into maint
"git merge-file" tried to signal how many conflicts it found, which
obviously would not work well when there are too many of them.

* jk/merge-file-exit-code:
  merge-file: clamp exit code to maximum 127
2015-11-03 15:32:41 -08:00
Junio C Hamano 3a27eec48e Merge branch 'dt/name-hash-dir-entry-fix' into maint
The name-hash subsystem that is used to cope with case insensitive
filesystems keeps track of directories and their on-filesystem
cases for all the paths in the index by holding a pointer to a
randomly chosen cache entry that is inside the directory (for its
ce->ce_name component).  This pointer was not updated even when the
cache entry was removed from the index, leading to use after free.
This was fixed by recording the path for each directory instead of
borrowing cache entries and restructuring the API somewhat.

* dt/name-hash-dir-entry-fix:
  name-hash: don't reuse cache_entry in dir_entry
2015-11-03 15:32:40 -08:00
Junio C Hamano ced2321a8d Merge branch 'jc/am-3-fallback-regression-fix' into maint
"git am -3" had a small regression where it is aborted in its error
handling codepath when underlying merge-recursive failed in certain
ways, as it assumed that the internal call to merge-recursive will
never die, which is not the case (yet).

* jc/am-3-fallback-regression-fix:
  am -3: do not let failed merge from completing the error codepath
2015-11-03 15:32:39 -08:00
Junio C Hamano f5f7684596 Merge branch 'jc/usage-stdin' into maint
The synopsis text and the usage string of subcommands that read
list of things from the standard input are often shown as if they
only take input from a file on a filesystem, which was misleading.

* jc/usage-stdin:
  usage: do not insist that standard input must come from a file
2015-11-03 15:32:38 -08:00
Junio C Hamano 14f905caf2 Merge branch 'rt/placeholder-in-usage' into maint
A couple of commands still showed "[options]" in their usage string
to note where options should come on their command line, but we
spell that "[<options>]" in most places these days.

* rt/placeholder-in-usage:
  am, credential-cache: add angle brackets to usage string
2015-11-03 15:32:37 -08:00
Junio C Hamano ccb47391c1 Merge branch 'dt/t7063-fix-flaky-test' into maint
* dt/t7063-fix-flaky-test:
  t7063: fix flaky untracked-cache test
2015-11-03 15:32:36 -08:00
Junio C Hamano 1bf986bc9c Merge branch 'mk/submodule-gitdir-path' into maint
The submodule code has been taught to work better with separate
work trees created via "git worktree add".

* mk/submodule-gitdir-path:
  path: implement common_dir handling in git_pathdup_submodule()
  submodule refactor: use strbuf_git_path_submodule() in add_submodule_odb()
2015-11-03 15:32:35 -08:00
Junio C Hamano c1324e66d4 Merge branch 'nd/gc-auto-background-fix' into maint
When "git gc --auto" is backgrounded, its diagnosis message is
lost.  Save it to a file in $GIT_DIR and show it next time the "gc
--auto" is run.

* nd/gc-auto-background-fix:
  gc: save log from daemonized gc --auto and print it next time
2015-11-03 15:32:33 -08:00
Junio C Hamano c7bdbd6f92 Merge branch 'ls/p4-translation-failure' into maint
Work around "git p4" failing when the P4 depot records the contents
in UTF-16 without UTF-16 BOM.

* ls/p4-translation-failure:
  git-p4: handle "Translation of file content failed"
  git-p4: add test case for "Translation of file content failed" error
2015-11-03 15:32:32 -08:00
Junio C Hamano c04b3a2dbf Merge branch 'gr/rebase-i-drop-warn' into maint
Recent update to "rebase -i" that tries to sanity check the edited
insn sheet before it uses it has become too picky on Windows where
CRLF left by the editor is turned into a trailing CR on the line
read via the "read" built-in command.

* gr/rebase-i-drop-warn:
  rebase-i: work around Windows CRLF line endings
  t3404: "rebase -i" gets broken when insn sheet uses CR/LF line endings
2015-11-03 15:32:30 -08:00
Junio C Hamano f836a32ba7 Merge branch 'js/clone-dissociate' into maint
"git clone --dissociate" runs a big "git repack" process at the
end, and it helps to close file descriptors that are open on the
packs and their idx files before doing so on filesystems that
cannot remove a file that is still open.

* js/clone-dissociate:
  clone --dissociate: avoid locking pack files
  sha1_file.c: add a function to release all packs
  sha1_file: consolidate code to close a pack's file descriptor
  t5700: demonstrate a Windows file locking issue with `git clone --dissociate`
2015-11-03 15:32:29 -08:00
Junio C Hamano 04bba3a12b Merge branch 'ld/p4-import-labels' into maint
Correct "git p4 --detect-labels" so that it does not fail to create
a tag that points at a commit that is also being imported.

* ld/p4-import-labels:
  git-p4: fix P4 label import for unprocessed commits
  git-p4: do not terminate creating tag for unknown commit
  git-p4: failing test for ignoring invalid p4 labels
2015-11-03 15:32:28 -08:00
Junio C Hamano e23469f91a Merge branch 'tk/stripspace' into maint
The internal stripspace() function has been moved to where it
logically belongs to, i.e. strbuf API, and the command line parser
of "git stripspace" has been updated to use the parse_options API.

* tk/stripspace:
  stripspace: use parse-options for command-line parsing
  strbuf: make stripspace() part of strbuf
2015-11-03 15:32:26 -08:00
Junio C Hamano f89baca1b9 Merge branch 'jk/repository-extension' into maint
Prepare for Git on-disk repository representation to undergo
backward incompatible changes by introducing a new repository
format version "1", with an extension mechanism.

* jk/repository-extension:
  introduce "preciousObjects" repository extension
  introduce "extensions" form of core.repositoryformatversion
2015-11-03 15:32:25 -08:00
Jeff King e34f80278e merge-file: clamp exit code to maximum 127
Git-merge-file is documented to return one of three exit
codes:

  - zero means the merge was successful

  - a negative number means an error occurred

  - a positive number indicates the number of conflicts

Unfortunately, this all gets stuffed into an 8-bit return
code. Which means that if you have 256 conflicts, this wraps
to zero, and the merge appears to succeed (and commits a
blob full of conflict-marker cruft!).

This patch clamps the return value to a maximum of 127,
which we should be able to safely represent everywhere. This
also leaves 128-255 for other values. Shells (and some parts
of git) will typically represent signal death as 128 plus
the signal number. And negative values are typically coerced
to an 8-bit unsigned value (so "return -1" ends up as 255).

Technically negative returns have the same problem (e.g.,
"-256" wraps back to 0), but this is not a problem in
practice, as the only negative value we use is "-1".

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-10-29 12:10:23 -07:00
Junio C Hamano 39743cf554 rebase-i: work around Windows CRLF line endings
Editors on Windows can and do save text files with CRLF line
endings, which is the convention on the platform.  We are seeing
reports that the "read" command in a port of bash to the environment
however does not strip the CRLF at the end, not adjusting for the
same convention on the platform.

This breaks the recently added sanity checks for the insn sheet fed
to "rebase -i"; instead of an empty line (hence nothing in $command),
the script was getting a lone CR in there.

Special case a lone CR and treat it the same way as an empty line to
work this around.

This patch (also) passes the test with Git for Windows, where the
issue was seen first.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-10-28 10:06:46 -07:00
Johannes Schindelin 1db25aae5e t3404: "rebase -i" gets broken when insn sheet uses CR/LF line endings
Based on a bug report by Chad Boles.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-10-28 10:01:59 -07:00
Max Kirillov 95261974bb blame: fix option name in error message
The option name used in blame's UI is `--reverse`.

Signed-off-by: Max Kirillov <max@max630.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-10-26 13:08:21 -07:00
Xue Fuqiao b2af4829cc user-manual: fix the description of fast-forward
The "Fast-forward merges" section of user-manual.txt incorrectly
says if the current branch is a descendant of the other, Git will
perform a fast-forward merge, but it should the other way around.

Signed-off-by: Xue Fuqiao <xfq.free@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-10-26 13:03:44 -07:00
Junio C Hamano 3b19dba703 Documentation: AsciiDoc spells em-dash as double-dashes, not triple
Again, we do not usually process release notes with AsciiDoc, but it
is better to be consistent.

This incidentally reveals breakages left by an ancient 5e00439f
(Documentation: build html for all files in technical and howto,
2012-10-23).  The index-format documentation was originally written
to be read as straight text without formatting and when the commit
forced everything in Documentation/ to go through AsciiDoc, it did
not do any adjustment--hence the double-dashes will be seen in the
resulting text that is rendered as preformatted fixed-width without
converted into em-dashes.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-10-22 13:02:33 -07:00
Junio C Hamano 77d5f715c2 Documentation: match undefline with the text in old release notes
These are not processed with AsciiDoc, but it is better to be
consistent.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-10-22 10:16:17 -07:00
Junio C Hamano 142d035a02 Documentation: match underline with the text
Even though AsciiDoc is more lenient when deciding if an underline
is for the contents on the previous line to find section headers, we
should match the length of them for other formatters to help them.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-10-22 10:16:12 -07:00
Junio C Hamano f3f38c7d9b Documentation/everyday: match undefline with the text
Even though AsciiDoc is more lenient when deciding if an underline
is for the contents on the previous line to find section headers, we
should match the length of them for other formatters to help them.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-10-22 10:14:44 -07:00
Xue Fuqiao a3e1fa97bc Documentation: fix header markup
Asciidoctor is stricter than AsciiDoc when deciding if underlining
is a section title or the start of preformatted text.  Make the
length of the underlining match the text to ensure that it renders
correctly in all implementations.

Signed-off-by: Xue Fuqiao <xfq.free@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-10-22 09:35:36 -07:00
David Turner 41284eb0f9 name-hash: don't reuse cache_entry in dir_entry
Stop reusing cache_entry in dir_entry; doing so causes a
use-after-free bug.

During merges, we free entries that we no longer need in the
destination index.  But those entries might have also been stored in
the dir_entry cache, and when a later call to add_to_index found them,
they would be used after being freed.

To prevent this, change dir_entry to store a copy of the name instead
of a pointer to a cache_entry.  This entails some refactoring of code
that expects the cache_entry.

Keith McGuigan <kmcguigan@twitter.com> diagnosed this bug and wrote
the initial patch, but this version does not use any of Keith's code.

Helped-by: Keith McGuigan <kmcguigan@twitter.com>
Helped-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: David Turner <dturner@twopensource.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-10-21 12:47:38 -07:00
Junio C Hamano b05c2f9ed4 Merge branch 'js/gc-with-stale-symref' into maint
"git gc" used to barf when a symbolic ref has gone dangling
(e.g. the branch that used to be your upstream's default when you
cloned from it is now gone, and you did "fetch --prune").

* js/gc-with-stale-symref:
  pack-objects: do not get distracted by broken symrefs
  gc: demonstrate failure with stale remote HEAD
2015-10-20 15:22:42 -07:00
Junio C Hamano 3b7c49e9a3 Merge branch 'rd/test-path-utils' into maint
The normalize_ceiling_entry() function does not muck with the end
of the path it accepts, and the real world callers do rely on that,
but a test insisted that the function drops a trailing slash.

* rd/test-path-utils:
  test-path-utils.c: remove incorrect assumption
2015-10-20 15:22:41 -07:00
Junio C Hamano ce555f3842 Merge branch 'jc/doc-gc-prune-now' into maint
"git gc" is safe to run anytime only because it has the built-in
grace period to protect young objects.  In order to run with no
grace period, the user must make sure that the repository is
quiescent.

* jc/doc-gc-prune-now:
  Documentation/gc: warn against --prune=<now>
2015-10-20 15:22:40 -07:00
Junio C Hamano 44a9b53c59 Merge branch 'jk/filter-branch-use-of-sed-on-incomplete-line' into maint
A recent "filter-branch --msg-filter" broke skipping of the commit
object header, which is fixed.

* jk/filter-branch-use-of-sed-on-incomplete-line:
  filter-branch: remove multi-line headers in msg filter
2015-10-20 15:22:39 -07:00
David Turner 9b680fbd3b t7063: fix flaky untracked-cache test
Dirty the test worktree's root directory, as the test expects.

When testing the untracked-cache, we previously assumed that checking
out master would be sufficient to mark the mtime of the worktree's
root directory as racily-dirty.  But sometimes, the checkout would
happen at 12345.999 seconds and the status at 12346.001 seconds,
meaning that the worktree's root directory would not be racily-dirty.
And since it was not truly dirty, occasionally the test would fail.
By making the root truly dirty, the test will always succeed.

Tested by running a few hundred times.

Signed-off-by: David Turner <dturner@twopensource.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-10-19 18:32:28 -07:00
Junio C Hamano 1b5ffa36cb Merge branch 'maint' of git://github.com/git-l10n/git-po into maint
* 'maint' of git://github.com/git-l10n/git-po:
  l10n: ru.po: update Russian translation
2015-10-18 23:37:35 -07:00
Sidhant Sharma ae9f2745be worktree: usage: denote <branch> as optional with 'add'
Although 1eb07d8 (worktree: add: auto-vivify new branch when
<branch> is omitted, 2015-07-06) updated the documentation when
<branch> became optional, it neglected to update the in-code
usage message. Fix this oversight.

Reported-by: ch3cooli@gmail.com
Signed-off-by: Sidhant Sharma <tigerkid001@gmail.com>
Helped-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-10-18 23:35:58 -07:00
Junio C Hamano 33e8fc8740 usage: do not insist that standard input must come from a file
The synopsys text and the usage string of subcommands that read list
of things from the standard input are often shown like this:

	git gostak [--distim] < <list-of-doshes>

This is problematic in a number of ways:

 * The way to use these commands is more often to feed them the
   output from another command, not feed them from a file.

 * Manual pages outside Git, commands that operate on the data read
   from the standard input, e.g "sort", "grep", "sed", etc., are not
   described with such a "< redirection-from-file" in their synopsys
   text.  Our doing so introduces inconsistency.

 * We do not insist on where the output should go, by saying

	git gostak [--distim] < <list-of-doshes> > <output>

 * As it is our convention to enclose placeholders inside <braket>,
   the redirection operator followed by a placeholder filename
   becomes very hard to read, both in the documentation and in the
   help text.

Let's clean them all up, after making sure that the documentation
clearly describes the modes that take information from the standard
input and what kind of things are expected on the input.

[jc: stole example for fmt-merge-msg from Jonathan]

Helped-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-10-16 15:27:52 -07:00
Junio C Hamano 3c3d3f629a Git 2.6.2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-10-16 14:40:05 -07:00
Junio C Hamano 119ffa3351 Merge branch 'cc/quote-comments' into maint
A no-op code-health maintenance.

* cc/quote-comments:
  quote: move comment before sq_quote_buf()
  quote: fix broken sq_quote_buf() related comment
2015-10-16 14:32:58 -07:00
Junio C Hamano 71ae53526d Merge branch 'es/worktree-add-cleanup' into maint
A no-op code-health maintenance.

* es/worktree-add-cleanup:
  t2026: rename worktree prune test
2015-10-16 14:32:57 -07:00
Junio C Hamano 0dd9e571e8 Merge branch 'tk/doc-interpret-trailers-grammo' into maint
* tk/doc-interpret-trailers-grammo:
  Documentation/interpret-trailers: Grammar fix
2015-10-16 14:32:56 -07:00
Junio C Hamano 9ab74762cd Merge branch 'tk/typofix-connect-unknown-proto-error' into maint
* tk/typofix-connect-unknown-proto-error:
  connect: fix typo in result string of prot_name()
2015-10-16 14:32:55 -07:00
Junio C Hamano aa8f64dead Merge branch 'jk/asciidoctor-section-heading-markup-fix' into maint
* jk/asciidoctor-section-heading-markup-fix:
  Documentation: fix section header mark-up
2015-10-16 14:32:53 -07:00
Junio C Hamano 22f4b15e88 Merge branch 'nd/ls-remote-does-not-have-u-option' into maint
* nd/ls-remote-does-not-have-u-option:
  ls-remote.txt: delete unsupported option
2015-10-16 14:32:52 -07:00
Junio C Hamano 1c7dc12c43 Merge branch 'jc/fsck-dropped-errors' into maint
There were some classes of errors that "git fsck" diagnosed to its
standard error that did not cause it to exit with non-zero status.

* jc/fsck-dropped-errors:
  fsck: exit with non-zero when problems are found
2015-10-16 14:32:50 -07:00
Junio C Hamano 8f6f1771da Merge branch 'sb/http-flaky-test-fix' into maint
A test script for the HTTP service had a timing dependent bug,
which was fixed.

* sb/http-flaky-test-fix:
  t5561: get rid of racy appending to logfile
2015-10-16 14:32:49 -07:00
Junio C Hamano 2c3cb52c6c Merge branch 'sb/perf-without-installed-git' into maint
Performance-measurement tests did not work without an installed Git.

* sb/perf-without-installed-git:
  t/perf: make runner work even if Git is not installed
2015-10-16 14:32:47 -07:00
Junio C Hamano 15cef7ccd9 Merge branch 'js/icase-wt-detection' into maint
On a case insensitive filesystems, setting GIT_WORK_TREE variable
using a random cases that does not agree with what the filesystem
thinks confused Git that it wasn't inside the working tree.

* js/icase-wt-detection:
  setup: fix "inside work tree" detection on case-insensitive filesystems
2015-10-16 14:32:46 -07:00