Junio C Hamano [Fri, 21 May 2010 11:02:21 +0000 (04:02 -0700)]
Merge branch 'jn/fsck-ident'
* jn/fsck-ident:
fsck: check ident lines in commit objects
Junio C Hamano [Fri, 21 May 2010 11:02:21 +0000 (04:02 -0700)]
Merge branch 'jn/gitweb-caching-prep'
* jn/gitweb-caching-prep:
gitweb: Move generating page title to separate subroutine
gitweb: Add custom error handler using die_error
gitweb: Use nonlocal jump instead of 'exit' in die_error
gitweb: href(..., -path_info => 0|1)
Export more test-related variables when running external tests
Junio C Hamano [Fri, 21 May 2010 11:02:21 +0000 (04:02 -0700)]
Merge branch 'jn/gitweb-install'
* jn/gitweb-install:
gitweb: Create install target for gitweb in Makefile
gitweb: Improve installation instructions in gitweb/INSTALL
Junio C Hamano [Fri, 21 May 2010 11:02:20 +0000 (04:02 -0700)]
Merge branch 'jn/gitweb-our-squelch'
* jn/gitweb-our-squelch:
gitweb: Silence 'Variable VAR may be unavailable' warnings
Junio C Hamano [Fri, 21 May 2010 11:02:20 +0000 (04:02 -0700)]
Merge branch 'jn/request-pull'
* jn/request-pull:
tests: chmod +x t5150
adapt request-pull tests for new pull request format
t5150: protect backslash with backslash in shell
request-pull: protect against OPTIONS_KEEPDASHDASH from environment
tests for request-pull
Junio C Hamano [Fri, 21 May 2010 11:02:20 +0000 (04:02 -0700)]
Merge branch 'jn/shortlog'
* jn/shortlog:
pretty: Respect --abbrev option
shortlog: Document and test --format option
t4201 (shortlog): Test output format with multiple authors
t4201 (shortlog): guard setup with test_expect_success
Documentation/shortlog: scripted users should not rely on implicit HEAD
Junio C Hamano [Fri, 21 May 2010 11:02:20 +0000 (04:02 -0700)]
Merge branch 'jn/t7006-fixup'
* jn/t7006-fixup:
t7006: guard cleanup with test_expect_success
Junio C Hamano [Fri, 21 May 2010 11:02:19 +0000 (04:02 -0700)]
Merge branch 'js/maint-receive-pack-symref-alias'
* js/maint-receive-pack-symref-alias:
t5516-fetch-push.sh: style cleanup
receive-pack: detect aliased updates which can occur with symrefs
receive-pack: switch global variable 'commands' to a parameter
Conflicts:
t/t5516-fetch-push.sh
Junio C Hamano [Fri, 21 May 2010 11:02:19 +0000 (04:02 -0700)]
Merge branch 'sp/maint-dumb-http-pack-reidx'
* sp/maint-dumb-http-pack-reidx:
http.c::new_http_pack_request: do away with the temp variable filename
http-fetch: Use temporary files for pack-*.idx until verified
http-fetch: Use index-pack rather than verify-pack to check packs
Allow parse_pack_index on temporary files
Extract verify_pack_index for reuse from verify_pack
Introduce close_pack_index to permit replacement
http.c: Remove unnecessary strdup of sha1_to_hex result
http.c: Don't store destination name in request structures
http.c: Drop useless != NULL test in finish_http_pack_request
http.c: Tiny refactoring of finish_http_pack_request
t5550-http-fetch: Use subshell for repository operations
http.c: Remove bad free of static block
Junio C Hamano [Fri, 21 May 2010 11:02:19 +0000 (04:02 -0700)]
Merge branch 'jn/submodule-basic-test'
* jn/submodule-basic-test:
t7400: clarify submodule update tests
t7400: clarify 'submodule add' tests
t7400: split setup into multiple tests
Junio C Hamano [Fri, 21 May 2010 11:02:19 +0000 (04:02 -0700)]
Merge branch 'np/index-pack-memsave'
* np/index-pack-memsave:
index-pack: smarter memory usage when appending objects
index-pack: rationalize unpack_entry_data()
index-pack: smarter memory usage when resolving deltas
Junio C Hamano [Fri, 21 May 2010 11:02:18 +0000 (04:02 -0700)]
Merge branch 'jc/am-3-show-corrupted-patch'
* jc/am-3-show-corrupted-patch:
am -3: recover the diagnostic messages for corrupt patches
Junio C Hamano [Fri, 21 May 2010 11:02:18 +0000 (04:02 -0700)]
Merge branch 'jc/maint-no-reflog-expire-unreach-for-head'
* jc/maint-no-reflog-expire-unreach-for-head:
reflog --expire-unreachable: special case entries in "HEAD" reflog
more war on "sleep" in tests
Document gc.<pattern>.reflogexpire variables
Conflicts:
Documentation/config.txt
Junio C Hamano [Fri, 21 May 2010 11:02:17 +0000 (04:02 -0700)]
Merge branch 'cw/maint-exec-defpath'
* cw/maint-exec-defpath:
autoconf: Check if <paths.h> exists and set HAVE_PATHS_H
exec_cmd.c: replace hard-coded path list with one from <paths.h>
Junio C Hamano [Fri, 21 May 2010 11:02:17 +0000 (04:02 -0700)]
Merge branch 'tr/word-diff'
* tr/word-diff:
diff: add --word-diff option that generalizes --color-words
Conflicts:
diff.c
Junio C Hamano [Fri, 21 May 2010 11:02:17 +0000 (04:02 -0700)]
Merge branch 'sp/maint-describe-tiebreak-with-tagger-date'
* sp/maint-describe-tiebreak-with-tagger-date:
describe: Break annotated tag ties by tagger date
tag.c: Parse tagger date (if present)
tag.c: Refactor parse_tag_buffer to be saner to program
tag.h: Remove unused signature field
tag.c: Correct indentation
Junio C Hamano [Fri, 21 May 2010 11:02:16 +0000 (04:02 -0700)]
Merge branch 'jc/status-show-ignored'
* jc/status-show-ignored:
wt-status: fix 'fprintf' compilation warning
status: --ignored option shows ignored files
wt-status: rename and restructure status-print-untracked
wt-status: collect ignored files
wt-status: plug memory leak while collecting untracked files
wt-status: remove unused workdir_untracked member
Junio C Hamano [Fri, 21 May 2010 11:02:16 +0000 (04:02 -0700)]
Merge branch 'np/malloc-threading'
* np/malloc-threading:
Thread-safe xmalloc and xrealloc needs a recursive mutex
Make xmalloc and xrealloc thread-safe
Junio C Hamano [Fri, 21 May 2010 11:02:15 +0000 (04:02 -0700)]
Merge branch 'sr/remote-helper-export'
* sr/remote-helper-export:
t5800: testgit helper requires Python support
Makefile: Simplify handling of python scripts
remote-helpers: add tests for testgit helper
remote-helpers: add testgit helper
remote-helpers: add support for an export command
remote-helpers: allow requesing the path to the .git directory
fast-import: always create marks_file directories
clone: also configure url for bare clones
clone: pass the remote name to remote_get
Conflicts:
Makefile
Junio C Hamano [Fri, 21 May 2010 11:02:15 +0000 (04:02 -0700)]
Merge branch 'ld/discovery-limit-to-fs' (early part)
* 'ld/discovery-limit-to-fs' (early part):
Rename ONE_FILESYSTEM to DISCOVERY_ACROSS_FILESYSTEM
GIT_ONE_FILESYSTEM: flip the default to stop at filesystem boundaries
Add support for GIT_ONE_FILESYSTEM
truncate cwd string before printing error message
config.c: remove static keyword from git_env_bool()
Junio C Hamano [Fri, 21 May 2010 11:02:14 +0000 (04:02 -0700)]
Merge branch 'ar/config-from-command-line'
* ar/config-from-command-line:
Complete prototype of git_config_from_parameters()
Use strbufs instead of open-coded string manipulation
Allow passing of configuration parameters in the command line
Junio C Hamano [Fri, 21 May 2010 11:02:14 +0000 (04:02 -0700)]
Merge branch 'em/checkout-orphan'
* em/checkout-orphan:
git checkout: create unparented branch by --orphan
Thomas Rast [Fri, 21 May 2010 10:07:47 +0000 (12:07 +0200)]
Complete prototype of git_config_from_parameters()
Add the missing argument list. (Its lack triggered a compiler warning
for me.)
Signed-off-by: Thomas Rast <redacted>
Acked-by: Alex Riesen <redacted>
Signed-off-by: Junio C Hamano <redacted>
Junio C Hamano [Fri, 21 May 2010 10:13:07 +0000 (03:13 -0700)]
Merge branch 'maint'
* maint:
Fix checkout of large files to network shares on Windows XP
start_command: close cmd->err descriptor when fork/spawn fails
Fix "Out of memory? mmap failed" for files larger than 4GB on Windows
Johannes Sixt [Mon, 20 Jul 2009 20:15:07 +0000 (22:15 +0200)]
Recent MinGW has a C99 implementation of snprintf functions
Starting with MinGW 3.14, released end of 2007, a working snprintf
is available. This means we do not need our own replacement that works
around the broken implementation in Microsoft's C runtime.
People who build git in an old MinGW environment are expected to set
SNPRINTF_RETURNS_BOGUS in their config.mak. msysgit is sufficiently
recent, of course.
Signed-off-by: Johannes Sixt <redacted>
Signed-off-by: Junio C Hamano <redacted>
Erik Faye-Lund [Thu, 20 May 2010 18:57:54 +0000 (20:57 +0200)]
mingw: use _commit to implement fsync
Signed-off-by: Erik Faye-Lund <redacted>
Signed-off-by: Johannes Sixt <redacted>
Signed-off-by: Junio C Hamano <redacted>
René Scharfe [Thu, 20 May 2010 18:57:53 +0000 (20:57 +0200)]
Fix checkout of large files to network shares on Windows XP
Bigger writes to network drives on Windows XP fail. Cap them at 31MB to
allow them to succeed. Callers need to be prepared for write() calls
that do less work than requested anyway.
On local drives, write() calls are translated to WriteFile() calls with
a cap of 64KB on Windows XP and 256KB on Vista. Thus a cap of 31MB won't
affect the number of WriteFile() calls which do the actual work. There's
still room for some other version of Windows to use a chunk size of 1MB
without increasing the number of system calls.
Signed-off-by: Rene Scharfe <redacted>
Signed-off-by: Johannes Sixt <redacted>
Signed-off-by: Junio C Hamano <redacted>
bert Dvornik [Thu, 20 May 2010 18:57:52 +0000 (20:57 +0200)]
start_command: close cmd->err descriptor when fork/spawn fails
Fix the problem where the cmd->err passed into start_command wasn't
being properly closed when certain types of errors occurr. (Compare
the affected code with the clean shutdown code later in the function.)
On Windows, this problem would be triggered if mingw_spawnvpe()
failed, which would happen if the command to be executed was malformed
(e.g. a text file that didn't start with a #! line). If cmd->err was
a pipe, the failure to close it could result in a hang while the other
side was waiting (forever) for either input or pipe close, e.g. while
trying to shove the output into the side band. On msysGit, this
problem was causing a hang in t5516-fetch-push.
[J6t: With a slight adjustment of the test case, the hang is also
observed on Linux.]
Signed-off-by: bert Dvornik <redacted>
Signed-off-by: Johannes Sixt <redacted>
Signed-off-by: Junio C Hamano <redacted>
Ian McLean [Thu, 20 May 2010 18:57:51 +0000 (20:57 +0200)]
Fix "Out of memory? mmap failed" for files larger than 4GB on Windows
The git_mmap implementation was broken for file sizes that wouldn't fit
into a size_t (32 bits). This was caused by intermediate variables that
were only 32 bits wide when they should be 64 bits.
Signed-off-by: Johannes Sixt <redacted>
Signed-off-by: Junio C Hamano <redacted>
Pelle Wessman [Thu, 20 May 2010 20:40:09 +0000 (22:40 +0200)]
Fixed regression with splitting out new subtree
A folder in a repository that wasn't initially imported as a subtree could no longer be splitted into an entirely new subtree with no parent.
A fix and a new test to fix that regression is added here.
Michael J Gruber [Fri, 14 May 2010 21:42:07 +0000 (23:42 +0200)]
notes: dry-run and verbose options for prune
Introduce -n and -v options for "git notes prune" in complete analogy to
"git prune" so that one can check for dangling notes easily.
The output is a list of names of objects whose notes would be resp.
are removed so that one can check the object ("git show sha1") as well as
the note ("git notes show sha1").
Signed-off-by: Michael J Gruber <redacted>
Acked-by: Johan Herland <redacted>
Signed-off-by: Junio C Hamano <redacted>
Junio C Hamano [Thu, 20 May 2010 04:28:51 +0000 (21:28 -0700)]
Merge branch 'maint'
* maint:
post-receive-email: document command-line mode
Bert Wesarg [Mon, 3 May 2010 22:38:07 +0000 (00:38 +0200)]
diff: fix coloring of extended diff headers
Coloring the extended headers where done as a whole not per line. less with
option -R (which is the default from git) does not support this coloring
mode because of performance reasons. The -r option would be an alternative
but has problems with lines that are longer than the screen. Therefore
stick to the idiom to color each line separately. The problem is, that the
result of ill_metainfo() will also be used as an parameter to an external
diff driver, so we need to disable coloring in this case.
Because coloring is now done inside fill_metainfo() we can simply add this
string to the diff header and therefore keep the last newline in the
extended header. This results also into the fact that the external diff
driver now gets this last newline too. Which is a change in behavior
but a good one.
Signed-off-by: Bert Wesarg <redacted>
Signed-off-by: Junio C Hamano <redacted>
Ævar Arnfjörð Bjarmason [Sat, 15 May 2010 02:46:04 +0000 (02:46 +0000)]
git-cvsserver: test for pserver authentication support
Signed-off-by: Ævar Arnfjörð Bjarmason <redacted>
Signed-off-by: Junio C Hamano <redacted>
Ævar Arnfjörð Bjarmason [Sat, 15 May 2010 02:46:03 +0000 (02:46 +0000)]
git-cvsserver: document making a password without htpasswd
This perl snippet is useful for quickly making a password without
htpasswd(1).
Signed-off-by: Ævar Arnfjörð Bjarmason <redacted>
Signed-off-by: Junio C Hamano <redacted>
Ævar Arnfjörð Bjarmason [Sat, 15 May 2010 02:46:02 +0000 (02:46 +0000)]
git-cvsserver: Improved error handling for pserver
- Produce an error if the user tries to supply a password for anonymous
- Clarify the error message produced when there's no [gitcvs.authdb]
- Produce an E error if the authdb doesn't exist instead of spewing
$! to the user
- do crypt($user, descramble($pass)) eq $hash; crypt($user, $hash)
eq $hash would accept any password
Signed-off-by: Ævar Arnfjörð Bjarmason <redacted>
Signed-off-by: Junio C Hamano <redacted>
Ævar Arnfjörð Bjarmason [Sat, 15 May 2010 02:46:01 +0000 (02:46 +0000)]
git-cvsserver: indent & clean up authdb code
- Indent the last commit to fit with the rest of the code.
- Use lexical filehandles instead of global globs
- Close the filehandle after the password database has been read.
Signed-off-by: Ævar Arnfjörð Bjarmason <redacted>
Signed-off-by: Junio C Hamano <redacted>
Sam Vilain [Sat, 15 May 2010 15:07:54 +0000 (15:07 +0000)]
git-cvsserver: use a password file cvsserver pserver
If a git repository is shared via HTTP, the config file is typically
visible. Use an external file instead.
Signed-off-by: Ævar Arnfjörð Bjarmason <redacted>
Signed-off-by: Junio C Hamano <redacted>
Ævar Arnfjörð Bjarmason [Sat, 15 May 2010 15:06:46 +0000 (15:06 +0000)]
git-cvsserver: authentication support for pserver
Allow git-cvsserver to use authentication over pserver mode. The
pserver user/password database is stored in the config file for each
repository.
Signed-off-by: Ævar Arnfjörð Bjarmason <redacted>
Worriedly-Acked-by: Martin Langhoff <redacted>
Signed-off-by: Junio C Hamano <redacted>
Jonathan Nieder [Wed, 19 May 2010 18:38:50 +0000 (13:38 -0500)]
Add git remote set-branches
Add ‘git remote set-branches’ for changing the list of tracked refs
for a remote repository with one "porcelain-level" command. This
complements the longstanding ‘git remote add --track’ option.
The interface is based on the ‘git remote set-url’ subcommand.
git remote set-branches base --add C
git remote set-branches base A B D
git remote set-branches base --delete D; # not implemented
Suggested-by: martin f. krafft <redacted>
Signed-off-by: Jonathan Nieder <redacted>
Signed-off-by: Junio C Hamano <redacted>
Jonathan Nieder [Wed, 19 May 2010 19:01:47 +0000 (14:01 -0500)]
post-receive-email: document command-line mode
According to the default hooks/post-receive file, the hook is called
with three arguments on stdin:
<oldrev> <newrev> <refname>
In command-line mode, the arguments come in a different order, because
the email hook instead calls:
generate_email $2 $3 $1
Add a comment to explain why, based on comments from the mailing list
and the commit message to v1.5.1~9. Thanks to Andy for the
explanation.
Requested-by: martin f. krafft <redacted>
Cc: Andy Parkins <redacted>
Signed-off-by: Jonathan Nieder <redacted>
Signed-off-by: Junio C Hamano <redacted>
Eyvind Bernhardsen [Wed, 19 May 2010 20:43:11 +0000 (22:43 +0200)]
Rename the "crlf" attribute "text"
As discussed on the list, "crlf" is not an optimal name. Linus
suggested "text", which is much better.
Signed-off-by: Eyvind Bernhardsen <redacted>
Signed-off-by: Junio C Hamano <redacted>
Eyvind Bernhardsen [Wed, 19 May 2010 20:43:10 +0000 (22:43 +0200)]
Add per-repository eol normalization
Change the semantics of the "crlf" attribute so that it enables
end-of-line normalization when it is set, regardless of "core.autocrlf".
Add a new setting for "crlf": "auto", which enables end-of-line
conversion but does not override the automatic text file detection.
Add a new attribute "eol" with possible values "crlf" and "lf". When
set, this attribute enables normalization and forces git to use CRLF or
LF line endings in the working directory, respectively.
The line ending style to be used for normalized text files in the
working directory is set using "core.autocrlf". When it is set to
"true", CRLFs are used in the working directory; when set to "input" or
"false", LFs are used.
Signed-off-by: Eyvind Bernhardsen <redacted>
Signed-off-by: Junio C Hamano <redacted>
Eyvind Bernhardsen [Wed, 19 May 2010 20:43:09 +0000 (22:43 +0200)]
Add tests for per-repository eol normalization
Signed-off-by: Eyvind Bernhardsen <redacted>
Signed-off-by: Junio C Hamano <redacted>
Junio C Hamano [Wed, 19 May 2010 05:39:56 +0000 (22:39 -0700)]
Merge branch 'maint'
* maint:
Documentation/gitdiffcore: fix order in pickaxe description
Documentation: fix minor inconsistency
Documentation: rebase -i ignores options passed to "git am"
hash_object: correction for zero length file
Marcus Comstedt [Mon, 17 May 2010 19:07:10 +0000 (21:07 +0200)]
Add "Z" as an alias for the timezone "UTC"
The name "Z" for the UTC timezone is required to properly parse ISO 8601
timestamps. Add it to the list of recognized timezones.
Because timezone names can be shorter than 3 letters, loosen the
restriction in match_alpha() that used to require at least 3 letters to
match to allow a short timezone name as long as it matches exactly. Prior
to the introduction of the "Z" zone, this already affected the timezone
"NT" (Nome).
Signed-off-by: Marcus Comstedt <redacted>
Reviewed-by: Jay Soffian <redacted>
Signed-off-by: Junio C Hamano <redacted>
Michael J Gruber [Tue, 18 May 2010 10:49:33 +0000 (12:49 +0200)]
Documentation/gitdiffcore: fix order in pickaxe description
Reverse the order of "origin" and "result" so that the sentence
really describes an addition rather than a removal.
Signed-off-by: Michael J Gruber <redacted>
Signed-off-by: Junio C Hamano <redacted>
Michael J Gruber [Thu, 13 May 2010 12:51:38 +0000 (14:51 +0200)]
Documentation: fix minor inconsistency
While we don't always write out commands in full (`git command`) we
should do it consistently in adjacent paragraphs.
Signed-off-by: Michael J Gruber <redacted>
Signed-off-by: Junio C Hamano <redacted>
Markus Heidelberg [Thu, 13 May 2010 12:47:53 +0000 (14:47 +0200)]
Documentation: rebase -i ignores options passed to "git am"
Signed-off-by: Markus Heidelberg <redacted>
Signed-off-by: Junio C Hamano <redacted>
Will Palmer [Thu, 13 May 2010 08:59:00 +0000 (09:59 +0100)]
diff-options: make --patch a synonym for -p
Here we simply make --patch a synonym for -p, whose mnemonic was "patch"
all along.
Signed-off-by: Will Palmer <redacted>
Reviewed-by: Jeff King <redacted>
Signed-off-by: Junio C Hamano <redacted>
Michael J Gruber [Thu, 13 May 2010 12:31:46 +0000 (14:31 +0200)]
for-each-ref: Field with abbreviated objectname
Introduce a :short modifier to objectname which outputs the abbreviated
object name.
Signed-off-by: Michael J Gruber <redacted>
Reviewed-by: Jeff King <redacted>
Signed-off-by: Junio C Hamano <redacted>
Dmitry Potapov [Mon, 10 May 2010 21:38:17 +0000 (01:38 +0400)]
hash_object: correction for zero length file
The check whether size is zero was done after if size <= SMALL_FILE_SIZE,
as result, zero size case was never triggered. Instead zero length file
was treated as any other small file. This did not caused any problem, but
if we have a special case for size equal to zero, it is better to make it
work and avoid redundant malloc().
Signed-off-by: Dmitry Potapov <redacted>
Signed-off-by: Junio C Hamano <redacted>
Pavan Kumar Sunkara [Mon, 10 May 2010 16:41:35 +0000 (18:41 +0200)]
gitweb: Use @diff_opts while using format-patch
Make git-format-patch (used by 'patch' and 'patches' views) use the
same rename detection options that git-diff and git-diff-tree (used
by 'commitdiff', 'blobdiff', etc.) use.
Signed-off-by: Pavan Kumar Sunkara <redacted>
Acked-by: Jakub Narebski <redacted>
Acked-by: Giuseppe Bilotta <redacted>
Signed-off-by: Junio C Hamano <redacted>
Jeff King [Sat, 8 May 2010 04:44:34 +0000 (00:44 -0400)]
docs: clarify meaning of -M for git-log
As an option to the "diff" family, it is fairly obvious what
"detect renames" means. However, for revision traversal, the
"-M" option is just included in the long list of options,
with no indication that it is about showing renames in diffs
versus following renames. Let's make it more explicit.
Signed-off-by: Jeff King <redacted>
Signed-off-by: Junio C Hamano <redacted>
Eli Collins [Mon, 3 May 2010 02:03:41 +0000 (19:03 -0700)]
diff: add configuration option for disabling diff prefixes.
With new configuration "diff.noprefix", "git diff" does not show a source or destination prefix ala "git diff --no-prefix".
Signed-off-by: Eli Collins <redacted>
Signed-off-by: Junio C Hamano <redacted>
Junio C Hamano [Wed, 12 May 2010 06:04:47 +0000 (23:04 -0700)]
Merge branch 'maint'
* maint:
GIT-VERSION-GEN: restrict tags used
Tay Ray Chuan [Wed, 12 May 2010 03:29:20 +0000 (11:29 +0800)]
GIT-VERSION-GEN: restrict tags used
Restrict the tags used to generate the version string to those that
begin with "v", since git's tags for git-core (ie. excluding git-gui)
are all of the form "vX.Y...".
This is to avoid using private tags by the user in a clone of the git
code repository, which may break certain machinery (eg. Makefile, gitk).
Signed-off-by: Tay Ray Chuan <redacted>
Signed-off-by: Junio C Hamano <redacted>
Finn Arne Gangstad [Tue, 11 May 2010 22:37:57 +0000 (00:37 +0200)]
autocrlf: Make it work also for un-normalized repositories
Previously, autocrlf would only work well for normalized
repositories. Any text files that contained CRLF in the repository
would cause problems, and would be modified when handled with
core.autocrlf set.
Change autocrlf to not do any conversions to files that in the
repository already contain a CR. git with autocrlf set will never
create such a file, or change a LF only file to contain CRs, so the
(new) assumption is that if a file contains a CR, it is intentional,
and autocrlf should not change that.
The following sequence should now always be a NOP even with autocrlf
set (assuming a clean working directory):
git checkout <something>
touch *
git add -A . (will add nothing)
git commit (nothing to commit)
Previously this would break for any text file containing a CR.
Some of you may have been folowing Eyvind's excellent thread about
trying to make end-of-line translation in git a bit smoother.
I decided to attack the problem from a different angle: Is it possible
to make autocrlf behave non-destructively for all the previous problem cases?
Stealing the problem from Eyvind's initial mail (paraphrased and
summarized a bit):
1. Setting autocrlf globally is a pain since autocrlf does not work well
with CRLF in the repo
2. Setting it in individual repos is hard since you do it "too late"
(the clone will get it wrong)
3. If someone checks in a file with CRLF later, you get into problems again
4. If a repository once has contained CRLF, you can't tell autocrlf
at which commit everything is sane again
5. autocrlf does needless work if you know that all your users want
the same EOL style.
I belive that this patch makes autocrlf a safe (and good) default
setting for Windows, and this solves problems 1-4 (it solves 2 by being
set by default, which is early enough for clone).
I implemented it by looking for CR charactes in the index, and
aborting any conversion attempt if this is found.
Signed-off-by: Finn Arne Gangstad <redacted>
Signed-off-by: Junio C Hamano <redacted>
Tay Ray Chuan [Tue, 11 May 2010 17:20:23 +0000 (01:20 +0800)]
ls-remote: print URL when no repo is specified
After
9c00de5 (ls-remote: fall-back to default remotes when no remote
specified), when no repository is specified, ls-remote may use
the URL/remote in the config "branch.<name>.remote" or the remote
"origin"; it may not be immediately obvious to the user which was used.
In such cases, print a simple "From <URL>" line to indicate which
repository was used. This message is similar to git-fetch's, and is
printed to stderr to avoid breaking existing scripts that depend on
ls-remote's output behaviour.
It can also be disabled with -q/--quiet.
Modify tests related to falling back on default remotes to check for
this as well, and add a test to check for suppression of the message.
Signed-off-by: Tay Ray Chuan <redacted>
Signed-off-by: Junio C Hamano <redacted>
Junio C Hamano [Tue, 11 May 2010 01:34:03 +0000 (18:34 -0700)]
Merge branch 'maint'
* maint:
handle "git --bare init <dir>" properly
Tay Ray Chuan [Mon, 10 May 2010 17:17:52 +0000 (01:17 +0800)]
merge: --log appends shortlog to message if specified
When the user specifies a message, use fmt_merge_msg_shortlog() to
append the shortlog.
Previously, when a message was specified, we ignored the merge title
("Merge <foo> into <bar>") and shortlog from fmt_merge_msg().
Update the documentation for -m to reflect this too.
Signed-off-by: Tay Ray Chuan <redacted>
Signed-off-by: Junio C Hamano <redacted>
Tay Ray Chuan [Mon, 10 May 2010 17:17:51 +0000 (01:17 +0800)]
fmt-merge-msg: add function to append shortlog only
Signed-off-by: Tay Ray Chuan <redacted>
Signed-off-by: Junio C Hamano <redacted>
Tay Ray Chuan [Mon, 10 May 2010 17:17:50 +0000 (01:17 +0800)]
fmt-merge-msg: refactor merge title formatting
Signed-off-by: Tay Ray Chuan <redacted>
Signed-off-by: Junio C Hamano <redacted>
Tay Ray Chuan [Mon, 10 May 2010 17:17:49 +0000 (01:17 +0800)]
fmt-merge-msg: minor refactor of fmt_merge_msg()
Shift implementation into a private function, do_fmt_merge_msg(). This
allows for further changes to the implementation, without affecting the
interface.
Signed-off-by: Tay Ray Chuan <redacted>
Signed-off-by: Junio C Hamano <redacted>
Tay Ray Chuan [Mon, 10 May 2010 17:17:48 +0000 (01:17 +0800)]
merge: rename variable
It is more accurate to call it 'merge_names' instead of 'msg', as it
does not contain the final message.
Signed-off-by: Tay Ray Chuan <redacted>
Signed-off-by: Junio C Hamano <redacted>
Tay Ray Chuan [Mon, 10 May 2010 17:17:47 +0000 (01:17 +0800)]
merge: update comment
ce9d823 (merge: do not add standard message when message is given with
-m option) changed the behaviour of the code that the comment addressed,
but the comment was not similarly updated.
Fix this.
Signed-off-by: Tay Ray Chuan <redacted>
Signed-off-by: Junio C Hamano <redacted>
Tay Ray Chuan [Mon, 10 May 2010 17:17:46 +0000 (01:17 +0800)]
t7604-merge-custom-message: show that --log doesn't append to -m
Signed-off-by: Tay Ray Chuan <redacted>
Signed-off-by: Junio C Hamano <redacted>
Tay Ray Chuan [Mon, 10 May 2010 17:17:45 +0000 (01:17 +0800)]
t7604-merge-custom-message: shift expected output creation
Squash in a minor rename too.
Signed-off-by: Tay Ray Chuan <redacted>
Signed-off-by: Junio C Hamano <redacted>
Jeff King [Mon, 10 May 2010 09:51:39 +0000 (05:51 -0400)]
tests: chmod +x t5150
Signed-off-by: Jeff King <redacted>
Signed-off-by: Junio C Hamano <redacted>
Jeff King [Mon, 10 May 2010 09:47:39 +0000 (05:47 -0400)]
tests: rename duplicate t4205
Signed-off-by: Jeff King <redacted>
Signed-off-by: Junio C Hamano <redacted>
Jeff King [Mon, 10 May 2010 09:42:06 +0000 (05:42 -0400)]
handle "git --bare init <dir>" properly
If we know we are creating a bare repository, we use setenv
to set the GIT_DIR directory to the current directory
(either where we already were, or one we created and chdir'd
into with "git init --bare <dir>").
However, with "git --bare init <dir>" (note the --bare as a
git wrapper option), the setup code actually sets GIT_DIR
for us, but it uses the wrong, original cwd when a directory
is given. Because our setenv does not use the overwrite
flag, it is ignored.
We need to set the overwrite flag, but only when we are
given a directory on the command line. That still allows:
GIT_DIR=foo.git git init --bare
to work. The behavior is changed for:
GIT_DIR=foo.git git init --bare bar.git
which used to create the repository in foo.git, but now will
use bar.git. This is more sane, as command line options
should generally override the environment.
Noticed by Oliver Hoffmann.
Signed-off-by: Jeff King <redacted>
Signed-off-by: Junio C Hamano <redacted>
Pete Harlan [Sun, 9 May 2010 20:10:17 +0000 (13:10 -0700)]
clone: reword messages to match the end-user perception
When cloning into a non-bare repository, e.g. "git clone $URL mine",
we used to report that we are cloning into "mine/.git". Reword the
report to say "Cloning into mine" instead, as that matches what the
end-user asked for closer.
Make the message for "git clone --bare $URL mine" to say "Cloning
into bare repository mine" do make the distinction between this case and
the above stand out a bit more prominently.
Suggested-by: Jeff King <redacted>
Signed-off-by: Pete Harlan <redacted>
Signed-off-by: Junio C Hamano <redacted>
Torsten Schmutzler [Thu, 6 May 2010 20:20:43 +0000 (22:20 +0200)]
git-svn: mangle refnames forbidden in git
git-check-ref-format(1) describes names which
cannot be used as refnames for git. Some are
legal branchnames in subversion however.
Mangle the not yet handled cases.
Signed-off-by: Torsten Schmutzler <redacted>
Acked-by: Eric Wong <redacted>
Ævar Arnfjörð Bjarmason [Sat, 8 May 2010 16:40:41 +0000 (16:40 +0000)]
git-svn: Remove unused use of File::Temp
The use line was added in
ffe256f9. File::Temp calls were later moved
to Git.pm in
0b19138b, but that commit neglected to remove the
now-redundant import.
Signed-off-by: Ævar Arnfjörð Bjarmason <redacted>
Acked-by: Eric Wong <redacted>
Ævar Arnfjörð Bjarmason [Fri, 7 May 2010 19:50:03 +0000 (19:50 +0000)]
git-svn documentation: minor grammar fix
Use the definite article when talking about a configuration property.
Signed-off-by: Ævar Arnfjörð Bjarmason <redacted>
Acked-by: Eric Wong <redacted>
Jonathan Nieder [Tue, 4 May 2010 23:36:47 +0000 (16:36 -0700)]
git svn: avoid uninitialized var in 'reset'
When "git svn reset" is called with an invalid revision, we
bail out and show the user a proper error message instead
of giving them a cryptic one related to git-svn internals.
ref: http://bugs.debian.org/578908
Signed-off-by: Jonathan Nieder <redacted>
Reported-by: Jens Seidel <redacted>
Acked-by: Eric Wong <redacted>
Junio C Hamano [Sun, 9 May 2010 05:58:36 +0000 (22:58 -0700)]
Start 1.7.2 cycle
Signed-off-by: Junio C Hamano <redacted>
Junio C Hamano [Sun, 9 May 2010 05:37:41 +0000 (22:37 -0700)]
Merge branch 'bg/apply-blank-trailing-context'
* bg/apply-blank-trailing-context:
apply: Allow blank *trailing* context lines to match beyond EOF
Junio C Hamano [Sun, 9 May 2010 05:37:34 +0000 (22:37 -0700)]
Merge branch 'bg/send-email-smtpdomain'
* bg/send-email-smtpdomain:
send-email: Cleanup smtp-domain and add config
Document send-email --smtp-domain
send-email: Don't use FQDNs without a '.'
send-email: Cleanup { style
Junio C Hamano [Sun, 9 May 2010 05:37:28 +0000 (22:37 -0700)]
Merge branch 'rc/ls-remote-default'
* rc/ls-remote-default:
ls-remote: fall-back to default remotes when no remote specified
Junio C Hamano [Sun, 9 May 2010 05:37:24 +0000 (22:37 -0700)]
Merge branch 'rc/maint-curl-helper'
* rc/maint-curl-helper:
remote-curl: ensure that URLs have a trailing slash
http: make end_url_with_slash() public
t5541-http-push: add test for URLs with trailing slash
Conflicts:
remote-curl.c
Junio C Hamano [Sun, 9 May 2010 05:37:05 +0000 (22:37 -0700)]
Merge branch 'hg/maint-attr-fix'
* hg/maint-attr-fix:
attr: Expand macros immediately when encountered.
attr: Allow multiple changes to an attribute on the same line.
attr: Fixed debug output for macro expansion.
Junio C Hamano [Sun, 9 May 2010 05:36:40 +0000 (22:36 -0700)]
Merge branch 'eb/unpretty-b-format'
* eb/unpretty-b-format:
Add `%B' in format strings for raw commit body in `git log' and friends
Junio C Hamano [Sun, 9 May 2010 05:36:31 +0000 (22:36 -0700)]
Merge branch 'ab/commit-empty-message'
* ab/commit-empty-message:
Add option to git-commit to allow empty log messages
Junio C Hamano [Sun, 9 May 2010 05:36:23 +0000 (22:36 -0700)]
Merge branch 'jc/test-sleepless'
* jc/test-sleepless:
war on "sleep" in tests
Junio C Hamano [Sun, 9 May 2010 05:36:16 +0000 (22:36 -0700)]
Merge branch 'jc/maint-reflog-expire-unreachable'
* jc/maint-reflog-expire-unreachable:
reflog --expire-unreachable: avoid merge-base computation
Junio C Hamano [Sun, 9 May 2010 05:36:14 +0000 (22:36 -0700)]
Merge branch 'sd/log-decorate'
* sd/log-decorate:
log.decorate: only ignore it under "log --pretty=raw"
script with rev-list instead of log
log --pretty/--oneline: ignore log.decorate
log.decorate: usability fixes
Add `log.decorate' configuration variable.
git_config_maybe_bool()
Conflicts:
builtin/log.c
Junio C Hamano [Sun, 9 May 2010 05:35:39 +0000 (22:35 -0700)]
Merge branch 'mh/status-optionally-refresh'
* mh/status-optionally-refresh:
t7508: add a test for "git status" in a read-only repository
git status: refresh the index if possible
t7508: add test for "git status" refreshing the index
Junio C Hamano [Sun, 9 May 2010 05:35:35 +0000 (22:35 -0700)]
Merge branch 'cw/ws-indent-with-tab'
* cw/ws-indent-with-tab:
whitespace: tests for git-apply --whitespace=fix with tab-in-indent
whitespace: add tab-in-indent support for --whitespace=fix
whitespace: replumb ws_fix_copy to take a strbuf *dst instead of char *dst
whitespace: tests for git-diff --check with tab-in-indent error class
whitespace: add tab-in-indent error class
whitespace: we cannot "catch all errors known to git" anymore
Junio C Hamano [Sun, 9 May 2010 05:34:47 +0000 (22:34 -0700)]
Merge branch 'cc/revert-strategy'
* cc/revert-strategy:
revert: add "--strategy" option to choose merge strategy
merge: make function try_merge_command non static
merge: refactor code that calls "git merge-STRATEGY"
revert: refactor merge recursive code into its own function
revert: use strbuf to refactor the code that writes the merge message
Conflicts:
builtin/revert.c
Junio C Hamano [Sun, 9 May 2010 05:33:16 +0000 (22:33 -0700)]
Merge branch 'sc/http-late-auth'
* sc/http-late-auth:
Prompt for a username when an HTTP request 401s
Junio C Hamano [Sun, 9 May 2010 05:33:08 +0000 (22:33 -0700)]
Merge branch 'jk/cached-textconv'
* jk/cached-textconv:
diff: avoid useless filespec population
diff: cache textconv output
textconv: refactor calls to run_textconv
introduce notes-cache interface
make commit_tree a library function
Junio C Hamano [Sun, 9 May 2010 05:32:59 +0000 (22:32 -0700)]
Merge branch 'pc/remove-warn'
* pc/remove-warn:
Remove a redundant errno test in a usage of remove_path
Introduce remove_or_warn function
Implement the rmdir_or_warn function
Generalise the unlink_or_warn function
Jonathan Nieder [Sun, 9 May 2010 04:00:10 +0000 (23:00 -0500)]
Makefile: let header dependency checker override COMPUTE_HEADER_DEPENDENCIES
This way, if you have “COMPUTE_HEADER_DEPENDENCIES = YesPlease” in your
config.mak, you can still “make CHECK_HEADER_DEPENDENCIES=Yes” to check
the makefile after a successful build.
This change does not affect the result of the command
“make CHECK_HEADER_DEPENDENCIES=Yes COMPUTE_HEADER_DEPENDENCIES=Yes”.
That will still die with an error message:
cannot compute header dependencies outside a normal build
The message is appropriate because still true.
Signed-off-by: Jonathan Nieder <redacted>
Signed-off-by: Junio C Hamano <redacted>
Jonathan Nieder [Sun, 9 May 2010 03:57:28 +0000 (22:57 -0500)]
Makefile: fix header dependency checker to allow NO_CURL builds
Do not expect to find http-related dependency fragments after a build
with HTTP support disabled.
Signed-off-by: Jonathan Nieder <redacted>
Signed-off-by: Junio C Hamano <redacted>
Jonathan Nieder [Sun, 9 May 2010 03:37:21 +0000 (22:37 -0500)]
Documentation/notes: nitpicks
Spell out “or” in the NAME line and simplify the leading sentence
in the DESCRIPTION.
Some other language cleanups, too.
Signed-off-by: Jonathan Nieder <redacted>
Signed-off-by: Junio C Hamano <redacted>
Jonathan Nieder [Sun, 9 May 2010 03:33:28 +0000 (22:33 -0500)]
Documentation/notes: clean up description of rewriting configuration
Clarify that the GIT_NOTES_REWRITE_REFS environment variable
overrides both ‘[notes "rewrite"] <command>’ and ‘[notes] rewriteRef’.
Add explanations of GIT_NOTES_REWRITE_MODE and GIT_NOTES_REWRITE_REFS
to the ENVIRONMENT section.
Cc: Leif Arne Storset <redacted>
Signed-off-by: Jonathan Nieder <redacted>
Signed-off-by: Junio C Hamano <redacted>
Jonathan Nieder [Sun, 9 May 2010 03:32:24 +0000 (22:32 -0500)]
Documentation/notes: simplify treatment of default display refs
The main description of display refs for notes should be in
git-log.1, where there is a chance to give a leisurely description
of all the ways they can be set, what they are used for, and so
on. The description in git-notes.1 is only meant to be a quick
reminder of how notes are used.
So simplify it.
Also add an entry for GIT_NOTES_DISPLAY_REF to the environment
section.
Cc: Thomas Rast <redacted>
Cc: Johan Herland <redacted>
Signed-off-by: Jonathan Nieder <redacted>
Signed-off-by: Junio C Hamano <redacted>
Jonathan Nieder [Sun, 9 May 2010 03:30:41 +0000 (22:30 -0500)]
Documentation/log: add a CONFIGURATION section
Add a configuration section summarizing variables that affect the
log family of commands.
Cc: Thomas Rast <redacted>
Cc: Jakub Narebski <redacted>
Signed-off-by: Jonathan Nieder <redacted>
Signed-off-by: Junio C Hamano <redacted>
Jonathan Nieder [Sun, 9 May 2010 03:23:58 +0000 (22:23 -0500)]
Documentation/notes: simplify treatment of default notes ref
Separate the documentation of the semantics, command-line option,
configuration item, and environment variable for the default notes
ref. The documentation is easier to digest in bite-sized pieces.
Signed-off-by: Jonathan Nieder <redacted>
Signed-off-by: Junio C Hamano <redacted>