Commit graph

27911 commits

Author SHA1 Message Date
Junio C Hamano 297638a98e Merge branch 'mp/make-cleanse-x-for-exe'
* mp/make-cleanse-x-for-exe:
  Explicitly set X to avoid potential build breakage
2012-02-12 22:42:17 -08:00
Junio C Hamano 8ed9f5d6a7 Merge branch 'bw/inet-pton-ntop-compat'
* bw/inet-pton-ntop-compat:
  Drop system includes from inet_pton/inet_ntop compatibility wrappers
2012-02-12 22:42:14 -08:00
Junio C Hamano 44a1020d4d Merge branch 'jc/maint-commit-ignore-i-t-a'
* jc/maint-commit-ignore-i-t-a:
  commit: ignore intent-to-add entries instead of refusing

Conflicts:
	cache-tree.c
2012-02-12 22:42:10 -08:00
Junio C Hamano 1efb73322a Merge branch 'jk/maint-tag-show-fixes'
* jk/maint-tag-show-fixes:
  tag: do not show non-tag contents with "-n"
  tag: die when listing missing or corrupt objects
  tag: fix output of "tag -n" when errors occur

Conflicts:
	t/t7004-tag.sh
2012-02-12 22:42:06 -08:00
Junio C Hamano 8c18a6f3fa Merge branch 'mm/empty-loose-error-message'
* mm/empty-loose-error-message:
  fsck: give accurate error message on empty loose object files
2012-02-12 22:42:02 -08:00
Junio C Hamano 39ee1710c0 Merge branch 'nk/ctype-for-perf'
* nk/ctype-for-perf:
  ctype: implement islower/isupper macro
  ctype.c only wants git-compat-util.h
2012-02-12 22:41:56 -08:00
Junio C Hamano 5cdc9fbb08 Merge branch 'jn/merge-no-edit-fix'
* jn/merge-no-edit-fix:
  merge: do not launch an editor on "--no-edit $tag"

Conflicts:
	builtin/merge.c
2012-02-12 22:41:51 -08:00
Junio C Hamano b6b3b6a01f Update draft release notes to 1.7.10
Document bunch of bugfix topics to be merged down to 'maint' soonish
for 1.7.9.1 maintenance release.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-02-10 14:16:32 -08:00
Junio C Hamano ee8d52f839 Merge branch 'js/add-e-submodule-fix'
* js/add-e-submodule-fix:
  add -e: do not show difference in a submodule that is merely dirty
2012-02-10 14:08:27 -08:00
Junio C Hamano 3d8bc74127 Merge branch 'jc/parse-date-raw'
* jc/parse-date-raw:
  parse_date(): '@' prefix forces git-timestamp
  parse_date(): allow ancient git-timestamp
2012-02-10 14:08:12 -08:00
Junio C Hamano fd6abd0c65 Merge branch 'jc/merge-ff-only-stronger-than-signed-merge'
* jc/merge-ff-only-stronger-than-signed-merge:
  merge: do not create a signed tag merge under --ff-only option
2012-02-10 14:08:02 -08:00
Junio C Hamano d88698ec0b Merge branch 'jc/branch-desc-typoavoidance'
* jc/branch-desc-typoavoidance:
  branch --edit-description: protect against mistyped branch name
2012-02-10 14:07:58 -08:00
Junio C Hamano e684e89ef0 Merge branch 'jn/rpm-spec'
* jn/rpm-spec:
  git.spec: Workaround localized messages not put in any RPM
2012-02-10 14:07:49 -08:00
Junio C Hamano e06ed3ed8a Merge branch 'jk/tests-write-script'
* jk/tests-write-script:
  t0300: use write_script helper
  tests: add write_script helper function
2012-02-10 14:07:42 -08:00
Junio C Hamano 1e9d3e3663 Sync with maint 2012-02-10 14:07:00 -08:00
Junio C Hamano bf5cf766af Update draft release notes to 1.7.9.1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-02-10 14:04:20 -08:00
Junio C Hamano 4fed4c809a Merge branch 'jc/maint-request-pull-for-tag' into maint
* jc/maint-request-pull-for-tag:
  request-pull: explicitly ask tags/$name to be pulled
2012-02-10 13:59:02 -08:00
Junio C Hamano 184a7aa7bf Merge branch 'tr/grep-l-with-decoration' into maint
* tr/grep-l-with-decoration:
  grep: fix -l/-L interaction with decoration lines
2012-02-10 13:59:02 -08:00
Junio C Hamano 5febbda4e7 Merge branch 'jl/submodule-re-add' into maint
* jl/submodule-re-add:
  submodule add: fix breakage when re-adding a deep submodule
2012-02-10 13:59:01 -08:00
Junio C Hamano 38ca63f3c0 Merge branch 'da/maint-mergetool-twoway' into maint
* da/maint-mergetool-twoway:
  mergetool: Provide an empty file when needed
2012-02-10 13:59:01 -08:00
Namhyung Kim 43ccdf56ec ctype: implement islower/isupper macro
"perf" uses a the forked copy of this file, and wants to use these two
macros.

Signed-off-by: Namhyung Kim <namhyung.kim@lge.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-02-10 12:56:29 -08:00
Namhyung Kim 1a191a2295 ctype.c only wants git-compat-util.h
The implementation of sane ctype macros only depends on symbols in
git-compat-util.h not cache.h

Signed-off-by: Namhyung Kim <namhyung.kim@lge.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-02-10 12:53:55 -08:00
Michael Palimaka ace5e97ecd Explicitly set X to avoid potential build breakage
$X is appended to binary names for Windows builds (ie. git.exe).
Pollution from the environment can inadvertently trigger this behaviour,
resulting in 'git' turning into 'gitwhatever' without warning.

Signed-off-by: Michael Palimaka <kensington@astralcloak.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-02-09 14:31:48 -08:00
Junio C Hamano 3adab6f3a7 merge: do not launch an editor on "--no-edit $tag"
When the user explicitly asked us not to, don't launch an editor.

But do everything else the same way as the "edit" case, i.e. leave the
comment with verification result in the log template and record the
mergesig in the resulting merge commit for later inspection.

Based on initiail analysis by Jonathan Nieder.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-02-09 13:30:52 -08:00
Junio C Hamano 31fd8d72f2 tag: do not show non-tag contents with "-n"
"git tag -n" did not check the type of the object it is reading the top n
lines from. At least, avoid showing the beginning of trees and blobs when
dealing with lightweight tags that point at them.

As the payload of a tag and a commit look similar in that they both start
with a header block, which is skipped for the purpose of "-n" output,
followed by human readable text, allow the message of commit objects to be
shown just like the contents of tag objects. This avoids regression for
people who have been using "tag -n" to show the log messages of commits
that are pointed at by lightweight tags.

Test script is from Jeff King.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-02-08 20:44:39 -08:00
Junio C Hamano 12766861cd Update draft release notes to 1.7.10
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-02-07 13:01:56 -08:00
Junio C Hamano dc347e9f6a Merge branch 'jc/maint-request-pull-for-tag'
* jc/maint-request-pull-for-tag:
  request-pull: explicitly ask tags/$name to be pulled
2012-02-07 12:57:10 -08:00
Junio C Hamano 715d130460 Merge branch 'bl/gitweb-project-filter'
* bl/gitweb-project-filter:
  gitweb: Make project search respect project_filter
  gitweb: improve usability of projects search form
  gitweb: place links to parent directories in page header
  gitweb: show active project_filter in project_list page header
  gitweb: limit links to alternate forms of project_list to active project_filter
  gitweb: add project_filter to limit project list to a subdirectory
  gitweb: prepare git_get_projects_list for use outside 'forks'.
  gitweb: move hard coded .git suffix out of git_get_projects_list
2012-02-07 12:57:05 -08:00
Junio C Hamano 6f1ede8423 Merge branch 'jx/i18n-more-marking'
* jx/i18n-more-marking:
  i18n: format_tracking_info "Your branch is behind" message
  i18n: git-commit whence_s "merge/cherry-pick" message
2012-02-07 12:56:54 -08:00
Junio C Hamano 12b681c3d2 Merge branch 'jn/svn-fe'
* jn/svn-fe: (36 commits)
  vcs-svn: suppress a -Wtype-limits warning
  vcs-svn: allow import of > 4GiB files
  vcs-svn: rename check_overflow arguments for clarity
  vcs-svn/svndiff.c: squelch false "unused" warning from gcc
  vcs-svn: reset first_commit_done in fast_export_init
  vcs-svn: do not initialize report_buffer twice
  vcs-svn: avoid hangs from corrupt deltas
  vcs-svn: guard against overflow when computing preimage length
  vcs-svn: cap number of bytes read from sliding view
  test-svn-fe: split off "test-svn-fe -d" into a separate function
  vcs-svn: implement text-delta handling
  vcs-svn: let deltas use data from preimage
  vcs-svn: let deltas use data from postimage
  vcs-svn: verify that deltas consume all inline data
  vcs-svn: implement copyfrom_data delta instruction
  vcs-svn: read instructions from deltas
  vcs-svn: read inline data from deltas
  vcs-svn: read the preimage when applying deltas
  vcs-svn: parse svndiff0 window header
  vcs-svn: skeleton of an svn delta parser
  ...
2012-02-07 12:56:38 -08:00
Junio C Hamano 53828bb065 Merge branch 'rt/completion-branch-edit-desc'
* rt/completion-branch-edit-desc:
  completion: --edit-description option for git-branch
2012-02-07 12:56:33 -08:00
Junio C Hamano 3f6d56de5f commit: ignore intent-to-add entries instead of refusing
Originally, "git add -N" was introduced to help users from forgetting to
add new files to the index before they ran "git commit -a".  As an attempt
to help them further so that they do not forget to say "-a", "git commit"
to commit the index as-is was taught to error out, reminding the user that
they may have forgotten to add the final contents of the paths before
running the command.

This turned out to be a false "safety" that is useless.  If the user made
changes to already tracked paths and paths added with "git add -N", and
then ran "git add" to register the final contents of the paths added with
"git add -N", "git commit" will happily create a commit out of the index,
without including the local changes made to the already tracked paths. It
was not a useful "safety" measure to prevent "forgetful" mistakes from
happening.

It turns out that this behaviour is not just a useless false "safety", but
actively hurts use cases of "git add -N" that were discovered later and
have become popular, namely, to tell Git to be aware of these paths added
by "git add -N", so that commands like "git status" and "git diff" would
include them in their output, even though the user is not interested in
including them in the next commit they are going to make.

Fix this ancient UI mistake, and instead make a commit from the index
ignoring the paths added by "git add -N" without adding real contents.

Based on the work by Nguyễn Thái Ngọc Duy, and helped by injection of
sanity from Jonathan Nieder and others on the Git mailing list.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-02-07 12:14:40 -08:00
Johannes Schindelin 701825de23 add -e: do not show difference in a submodule that is merely dirty
When the HEAD of the submodule matches what is recorded in the index of
the superproject, and it has local changes or untracked files, the patch
offered by "git add -e" for editing shows a diff like this:

    diff --git a/submodule b/submodule
    <header>
    -deadbeef...
    +deadbeef...-dirty

Because applying such a patch has no effect to the index, this is a
useless noise.  Generate the patch with IGNORE_DIRTY_SUBMODULES flag to
prevent such a change from getting reported.

This patch also loses the "-dirty" suffix from the output when the HEAD of
the submodule is different from what is in the index of the superproject.
As such dirtiness expressed by the suffix does not affect the result of
the patch application at all, there is no information lost if we remove
it. The user could still run "git status" before "git add -e" if s/he
cares about the dirtiness.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-02-07 08:59:40 -08:00
Matthieu Moy 33e42de0d2 fsck: give accurate error message on empty loose object files
Since 3ba7a06552 (A loose object is not corrupt if it
cannot be read due to EMFILE), "git fsck" on a repository with an empty
loose object file complains with the error message

  fatal: failed to read object <sha1>: Invalid argument

This comes from a failure of mmap on this empty file, which sets errno to
EINVAL. Instead of calling xmmap on empty file, we display a clean error
message ourselves, and return a NULL pointer. The new message is

  error: object file .git/objects/09/<rest-of-sha1> is empty
  fatal: loose object <sha1> (stored in .git/objects/09/<rest-of-sha1>) is corrupt

The second line was already there before the regression in 3ba7a06552,
and the first is an additional message, that should help diagnosing the
problem for the user.

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-02-06 11:05:36 -08:00
Jeff King fb630e048c tag: die when listing missing or corrupt objects
We don't usually bother looking at tagged objects at all
when listing. However, if "-n" is specified, we open the
objects to read the annotations of the tags.  If we fail to
read an object, or if the object has zero length, we simply
silently return.

The first case is an indication of a broken or corrupt repo,
and we should notify the user of the error.

The second case is OK to silently ignore; however, the
existing code leaked the buffer returned by read_sha1_file.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-02-06 10:00:51 -08:00
Jeff King ca51699961 tag: fix output of "tag -n" when errors occur
When "git tag" is instructed to print lines from annotated
tags via "-n", it first prints the tag name, then attempts
to parse and print the lines of the tag object, and then
finally adds a trailing newline.

If an error occurs, we return early from the function and
never print the newline, screwing up the output for the next
tag. Let's factor the line-printing into its own function so
we can manage the early returns better, and make sure that
we always terminate the line.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-02-06 10:00:42 -08:00
Junio C Hamano 65da088244 Sync with maint 2012-02-06 00:04:47 -08:00
Junio C Hamano 2d1abfa8ee Prepare for 1.7.9.1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-02-06 00:03:18 -08:00
Adrian Weimann 2ff14e31bd completion: --edit and --no-edit for git-merge
Signed-off-by: Adrian Weimann <adrian.weimann@googlemail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-02-06 00:00:54 -08:00
Junio C Hamano f2120eb4db Merge branch 'sp/smart-http-failure-to-push' into maint
* sp/smart-http-failure-to-push:
  remote-curl: Fix push status report when all branches fail
2012-02-05 23:58:43 -08:00
Junio C Hamano e27d620e91 Merge branch 'jc/maint-log-first-parent-pathspec' into maint
* jc/maint-log-first-parent-pathspec:
  Making pathspec limited log play nicer with --first-parent
2012-02-05 23:58:42 -08:00
Junio C Hamano 4802997c75 Merge branch 'cb/push-quiet' into maint
* cb/push-quiet:
  t5541: avoid TAP test miscounting
  fix push --quiet: add 'quiet' capability to receive-pack
  server_supports(): parse feature list more carefully
2012-02-05 23:58:42 -08:00
Junio C Hamano 1c719ffc3d Merge branch 'cb/maint-kill-subprocess-upon-signal' into maint
* cb/maint-kill-subprocess-upon-signal:
  dashed externals: kill children on exit
  run-command: optionally kill children on exit
2012-02-05 23:58:42 -08:00
Junio C Hamano cc811d8d02 Sync with 1.7.6.6
* maint-1.7.8:
  Git 1.7.6.6
  imap-send: remove dead code
2012-02-05 23:53:21 -08:00
Junio C Hamano d0482e88a7 Sync with 1.7.6.6
* maint-1.7.7:
  Git 1.7.6.6
  imap-send: remove dead code
2012-02-05 23:52:53 -08:00
Junio C Hamano 110c511dbe Sync with 1.7.6.6
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-02-05 23:52:25 -08:00
Junio C Hamano f174a2583c Git 1.7.6.6
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-02-05 23:50:52 -08:00
Jeff King 28b22f8af9 imap-send: remove dead code
The imap-send code was adapted from another project, and
still contains many unused bits of code. One of these bits
contains a type "struct string_list" which bears no
resemblence to the "struct string_list" we use elsewhere in
git. This causes the compiler to complain if git's
string_list ever becomes part of cache.h.

Let's just drop the dead code.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-02-05 23:44:56 -08:00
Junio C Hamano c2d17ba3db branch --edit-description: protect against mistyped branch name
It is very easy to mistype the branch name when editing its description,
e.g.

	$ git checkout -b my-topic master
	: work work work
	: now we are at a good point to switch working something else
	$ git checkout master
	: ah, let's write it down before we forget what we were doing
	$ git branch --edit-description my-tpoic

The command does not notice that branch 'my-tpoic' does not exist.  It is
not lost (it becomes description of an unborn my-tpoic branch), but is not
very useful.  So detect such a case and error out to reduce the grief
factor from this common mistake.

This incidentally also errors out --edit-description when the HEAD points
at an unborn branch (immediately after "init", or "checkout --orphan"),
because at that point, you do not even have any commit that is part of
your history and there is no point in describing how this particular
branch is different from the branch it forked off of, which is the useful
bit of information the branch description is designed to capture.

We may want to special case the unborn case later, but that is outside the
scope of this patch to prevent more common mistakes before 1.7.9 series
gains too much widespread use.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-02-05 17:28:03 -08:00
Ben Walton cd4c4e2481 Drop system includes from inet_pton/inet_ntop compatibility wrappers
As both of these compatibility wrappers include git-compat-utils.h,
all of the system includes were redundant.

Dropping these system includes also makes git-compat-utils.h the first
include which avoids a compiler warning on Solaris due to the
redefinition of _FILE_OFFSET_BITS.

Signed-off-by: Ben Walton <bwalton@artsci.utoronto.ca>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-02-05 16:32:33 -08:00