Junio C Hamano [Sat, 29 Aug 2009 21:52:03 +0000 (14:52 -0700)]
Sync with 1.6.4.2
Junio C Hamano [Sat, 29 Aug 2009 21:31:01 +0000 (14:31 -0700)]
GIT 1.6.4.2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
René Scharfe [Sat, 29 Aug 2009 09:05:00 +0000 (11:05 +0200)]
UI consistency: allow --force for where -f means force
git branch, checkout, clean, mv and tag all have an option -f to override
certain checks. This patch makes them accept the long option --force as
a synonym.
While we're at it, document that checkout support --quiet as synonym for
its short option -q.
Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
René Scharfe [Sat, 29 Aug 2009 09:04:52 +0000 (11:04 +0200)]
update-server-info: make builtin, use parseopt
Convert git update-server-info to a built-in command and use parseopt.
Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Nanako Shiraishi [Sat, 29 Aug 2009 07:49:32 +0000 (00:49 -0700)]
Remove unused t/t8005/iso8859-5.txt
This file is no longer used since
54bc13c (t8005: Nobody writes Russian in
shift_jis, 2009-06-18).
Signed-off-by: Nanako Shiraishi <nanako3@lavabit.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Sat, 29 Aug 2009 02:48:56 +0000 (19:48 -0700)]
Draft release notes to 1.6.5 before -rc0
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Sat, 29 Aug 2009 02:39:26 +0000 (19:39 -0700)]
Merge branch 'mm/reset-report'
* mm/reset-report:
reset: make the reminder output consistent with "checkout"
Rename REFRESH_SAY_CHANGED to REFRESH_IN_PORCELAIN.
Junio C Hamano [Sat, 29 Aug 2009 02:39:07 +0000 (19:39 -0700)]
Merge branch 'jk/maint-1.6.3-checkout-unborn'
* jk/maint-1.6.3-checkout-unborn:
checkout: do not imply "-f" on unborn branches
Junio C Hamano [Sat, 29 Aug 2009 02:38:56 +0000 (19:38 -0700)]
Merge branch 'np/maint-1.6.3-deepen'
* np/maint-1.6.3-deepen:
fix simple deepening of a repo
Conflicts:
t/t5500-fetch-pack.sh
Junio C Hamano [Sat, 29 Aug 2009 02:38:19 +0000 (19:38 -0700)]
Merge branch 'jc/shortstatus'
* jc/shortstatus:
git commit --dry-run -v: show diff in color when asked
Documentation/git-commit.txt: describe --dry-run
wt-status: collect untracked files in a separate "collect" phase
Make git_status_config() file scope static to builtin-commit.c
wt-status: move wt_status_colors[] into wt_status structure
wt-status: move many global settings to wt_status structure
commit: --dry-run
status: show worktree status of conflicted paths separately
wt-status.c: rework the way changes to the index and work tree are summarized
diff-index: keep the original index intact
diff-index: report unmerged new entries
Junio C Hamano [Sat, 29 Aug 2009 02:37:57 +0000 (19:37 -0700)]
Merge branch 'maint'
* maint:
http.c: set slot callback members to NULL when releasing object
Junio C Hamano [Sat, 29 Aug 2009 02:34:16 +0000 (19:34 -0700)]
Merge branch 'rc/maint-http-fix' into maint
* rc/maint-http-fix:
http.c: don't assume that urls don't end with slash
Tay Ray Chuan [Wed, 26 Aug 2009 12:20:53 +0000 (20:20 +0800)]
http.c: set slot callback members to NULL when releasing object
Set the members callback_func and callback_data of freq->slot to NULL
when releasing a http_object_request. release_active_slot() is also
invoked on the slot to remove the curl handle associated with the slot
from the multi stack (CURLM *curlm in http.c).
These prevent the callback function and data from being used in http
methods (like http.c::finish_active_slot()) after a
http_object_request has been free'd.
Noticed by Ali Polatel, who later tested this patch to verify that it
fixes the problem he saw; Dscho helped to identify the problem spot.
Signed-off-by: Tay Ray Chuan <rctay89@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Brandon Casey [Fri, 28 Aug 2009 22:32:41 +0000 (17:32 -0500)]
t/test-lib.sh: provide a shell implementation of the 'yes' utility
Some platforms (IRIX 6.5, Solaris 7) do not provide the 'yes' utility.
Currently, some tests, including t7610 and t9001, try to call this program.
Due to the way the tests are structured, the tests still pass even though
this program is missing. Rather than succeeding by chance, let's provide
an implementation of the simple 'yes' utility in shell for all platforms to
use.
Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Fri, 28 Aug 2009 05:01:01 +0000 (22:01 -0700)]
Merge branch 'maint'
* maint:
Fix overridable written with an extra 'e'
Documentation: git-archive: mark --format as optional in summary
Round-down years in "years+months" relative date view
Junio C Hamano [Fri, 28 Aug 2009 03:42:42 +0000 (20:42 -0700)]
Merge branch 'maint-1.6.3' into maint
* maint-1.6.3:
Fix overridable written with an extra 'e'
Documentation: git-archive: mark --format as optional in summary
Round-down years in "years+months" relative date view
Junio C Hamano [Fri, 28 Aug 2009 03:42:38 +0000 (20:42 -0700)]
Merge branch 'maint-1.6.2' into maint-1.6.3
* maint-1.6.2:
Fix overridable written with an extra 'e'
Documentation: git-archive: mark --format as optional in summary
Round-down years in "years+months" relative date view
Conflicts:
Documentation/git-archive.txt
Nanako Shiraishi [Fri, 28 Aug 2009 03:18:49 +0000 (12:18 +0900)]
Fix overridable written with an extra 'e'
Signed-off-by: Nanako Shiraishi <nanako3@lavabit.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Fri, 28 Aug 2009 03:41:37 +0000 (20:41 -0700)]
Merge branch 'maint-1.6.1' into maint-1.6.2
* maint-1.6.1:
Documentation: git-archive: mark --format as optional in summary
Junio C Hamano [Fri, 28 Aug 2009 03:41:31 +0000 (20:41 -0700)]
Merge branch 'maint-1.6.0' into maint-1.6.1
* maint-1.6.0:
Documentation: git-archive: mark --format as optional in summary
Wesley J. Landaker [Fri, 28 Aug 2009 02:55:43 +0000 (20:55 -0600)]
Documentation: git-archive: mark --format as optional in summary
The --format option was made optional in
8ff21b1 (git-archive: make
tar the default format, 2007-04-09), but it was not marked as optional
in the summary. This trival patch just changes the summary to match
the rest of the documentation.
Signed-off-by: Wesley J. Landaker <wjl@icecavern.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Fri, 28 Aug 2009 03:03:35 +0000 (20:03 -0700)]
Merge branch 'maint-1.5.6' into maint-1.6.0
* maint-1.5.6:
revision traversal and pack: notice and die on missing commit
David Reiss [Thu, 27 Aug 2009 23:39:38 +0000 (16:39 -0700)]
Round-down years in "years+months" relative date view
Previously, a commit from 1 year and 7 months ago would display as
"2 years, 7 months ago".
Signed-off-by: David Reiss <dreiss@facebook.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Fri, 28 Aug 2009 00:00:35 +0000 (17:00 -0700)]
Merge branch 'lt/block-sha1'
* lt/block-sha1:
remove ARM and Mozilla SHA1 implementations
block-sha1: guard gcc extensions with __GNUC__
make sure byte swapping is optimal for git
block-sha1: make the size member first in the context struct
Junio C Hamano [Thu, 27 Aug 2009 23:59:56 +0000 (16:59 -0700)]
Merge branch 'as/maint-graph-interesting-fix'
* as/maint-graph-interesting-fix:
Add tests for rev-list --graph with options that simplify history
graph API: fix bug in graph_is_interesting()
Junio C Hamano [Thu, 27 Aug 2009 23:59:25 +0000 (16:59 -0700)]
Merge branch 'jh/submodule-foreach'
* jh/submodule-foreach:
git clone: Add --recursive to automatically checkout (nested) submodules
t7407: Use 'rev-parse --short' rather than bash's substring expansion notation
git submodule status: Add --recursive to recurse into nested submodules
git submodule update: Introduce --recursive to update nested submodules
git submodule foreach: Add --recursive to recurse into nested submodules
git submodule foreach: test access to submodule name as '$name'
Add selftest for 'git submodule foreach'
git submodule: Cleanup usage string and add option parsing to cmd_foreach()
git submodule foreach: Provide access to submodule name, as '$name'
Conflicts:
Documentation/git-submodule.txt
git-submodule.sh
Junio C Hamano [Thu, 27 Aug 2009 23:59:08 +0000 (16:59 -0700)]
Merge branch 'jc/maint-unpack-objects-strict'
* jc/maint-unpack-objects-strict:
Fix "unpack-objects --strict"
Conflicts:
builtin-unpack-objects.c
Junio C Hamano [Thu, 27 Aug 2009 23:57:34 +0000 (16:57 -0700)]
Merge branch 'wl/insta-mongoose'
* wl/insta-mongoose:
Add support for the Mongoose web server.
Junio C Hamano [Thu, 27 Aug 2009 23:56:33 +0000 (16:56 -0700)]
Merge branch 'nd/sparse' (early part)
* 'nd/sparse' (early part):
Prevent diff machinery from examining assume-unchanged entries on worktree
Brandon Casey [Thu, 27 Aug 2009 16:16:34 +0000 (11:16 -0500)]
commit.c: rename variable named 'n' which masks previous declaration
The variable named 'n' was initially declared to be of type int. The name
'n' was reused inside inner blocks as a different type. Rename the uses
within inner blocks to avoid confusion and give them a slightly more
descriptive name.
Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Brandon Casey [Thu, 27 Aug 2009 16:16:33 +0000 (11:16 -0500)]
abspath.c: move declaration of 'len' into inner block and use appropriate type
The 'len' variable was declared at the beginning of the make_absolute_path
function and also in an inner 'if' block which masked the outer declaration.
It is only used in two 'if' blocks, so remove the outer declaration and
make a new declaration inside the other 'if' block that uses 'len'.
Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Brandon Casey [Thu, 27 Aug 2009 15:35:46 +0000 (10:35 -0500)]
Makefile: remove pointless conditional assignment in SunOS section
It is true that NEEDS_RESOLV is needed on SunOS if NO_IPV6 is set since
hstrerror() resides in libresolv, but performing this test at its current
location is not very useful. It will only have any effect if the user
modifies the make variables from the make command line, and will have no
effect if a config.mak file is used. A better location for this
conditional would have been further down in the Makefile after the
config.mak and config.mak.autogen had been parsed. Rather than adding
clutter to the Makefile for a conditional that will likely never be
triggered, just remove it, and any user on SunOS that manually sets NO_IPV6
can also set NEEDS_RESOLV.
Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Wed, 26 Aug 2009 19:15:15 +0000 (12:15 -0700)]
Merge branch 'maint'
* maint:
git-log: allow --decorate[=short|full]
Minor improvement to the write-tree documentation
git-bisect: call the found commit "*the* first bad commit"
Lars Hjemli [Sat, 15 Aug 2009 14:23:12 +0000 (16:23 +0200)]
git-log: allow --decorate[=short|full]
Commit
de435ac0 changed the behavior of --decorate from printing the
full ref (e.g., "refs/heads/master") to a shorter, more human-readable
version (e.g., just "master"). While this is nice for human readers,
external tools using the output from "git log" may prefer the full
version.
This patch introduces an extension to --decorate to allow the caller to
specify either the short or the full versions.
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Acked-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
David Kågedal [Wed, 26 Aug 2009 14:04:54 +0000 (16:04 +0200)]
Minor improvement to the write-tree documentation
Signed-off-by: David Kågedal <davidk@lysator.liu.se>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Nanako Shiraishi [Wed, 26 Aug 2009 08:38:50 +0000 (17:38 +0900)]
git-bisect: call the found commit "*the* first bad commit"
Signed-off-by: Nanako Shiraishi <nanako3@lavabit.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Wed, 26 Aug 2009 19:05:57 +0000 (12:05 -0700)]
Merge branch 'js/maint-cover-letter-non-ascii' into maint
* js/maint-cover-letter-non-ascii:
Correctly mark cover letters' encodings if they are not pure ASCII
Expose the has_non_ascii() function
Junio C Hamano [Wed, 26 Aug 2009 19:05:57 +0000 (12:05 -0700)]
Merge branch 'jc/maint-clean-nested-dir-safety' into maint
* jc/maint-clean-nested-dir-safety:
clean: require double -f options to nuke nested git repository and work tree
Junio C Hamano [Wed, 26 Aug 2009 19:05:57 +0000 (12:05 -0700)]
Merge branch 'jk/maint-merge-msg-fix' into maint
* jk/maint-merge-msg-fix:
merge: indicate remote tracking branches in merge message
merge: fix incorrect merge message for ambiguous tag/branch
add tests for merge message headings
Junio C Hamano [Wed, 26 Aug 2009 19:05:57 +0000 (12:05 -0700)]
Merge branch 'jc/apply-epoch-patch' into maint
* jc/apply-epoch-patch:
apply: notice creation/removal patches produced by GNU diff
Junio C Hamano [Wed, 26 Aug 2009 19:05:57 +0000 (12:05 -0700)]
Merge branch 'jp/symlink-dirs' into maint
* jp/symlink-dirs:
t6035-merge-dir-to-symlink depends on SYMLINKS prerequisite
git-checkout: be careful about untracked symlinks
lstat_cache: guard against full match of length of 'name' parameter
Demonstrate bugs when a directory is replaced with a symlink
Junio C Hamano [Wed, 26 Aug 2009 19:05:57 +0000 (12:05 -0700)]
Merge branch 'maint-1.6.3' into maint
* maint-1.6.3:
add -p: do not attempt to coalesce mode changes
git add -p: demonstrate failure when staging both mode and hunk
Junio C Hamano [Wed, 26 Aug 2009 18:22:00 +0000 (11:22 -0700)]
Merge branch 'tr/maint-1.6.3-add-p-modeonly-fix' into maint-1.6.3
* tr/maint-1.6.3-add-p-modeonly-fix:
add -p: do not attempt to coalesce mode changes
git add -p: demonstrate failure when staging both mode and hunk
Junio C Hamano [Tue, 25 Aug 2009 21:48:15 +0000 (14:48 -0700)]
Merge branch 'aj/fix-read-tree-from-scratch'
* aj/fix-read-tree-from-scratch:
read-tree: Fix regression with creation of a new index file.
Junio C Hamano [Tue, 25 Aug 2009 21:47:56 +0000 (14:47 -0700)]
Merge branch 'jc/maint-checkout-index-to-prefix'
* jc/maint-checkout-index-to-prefix:
check_path(): allow symlinked directories to checkout-index --prefix
Junio C Hamano [Tue, 25 Aug 2009 21:46:43 +0000 (14:46 -0700)]
Merge branch 'jl/submodule-summary-diff-files'
* jl/submodule-summary-diff-files:
Documentaqtion/git-submodule.txt: Typofix
git submodule summary: add --files option
Junio C Hamano [Tue, 25 Aug 2009 21:46:12 +0000 (14:46 -0700)]
Merge branch 'lh/short-decorate'
* lh/short-decorate:
git-log: allow --decorate[=short|full]
Junio C Hamano [Tue, 25 Aug 2009 21:46:04 +0000 (14:46 -0700)]
Merge branch 'oa/stash-na'
* oa/stash-na:
git stash: Give friendlier errors when there is nothing to apply
Nanako Shiraishi [Sat, 22 Aug 2009 00:45:18 +0000 (09:45 +0900)]
Documentation: consistently refer to check-ref-format
Change the <name> placeholder to <tagname> in the SYNOPSIS section of
git-tag documentation, and describe it in the OPTIONS section in a way
similar to how documentation for git-branch does.
Add SEE ALSO section to list the other documentation pages these two pages
refer to.
Signed-off-by: Nanako Shiraishi <nanako3@lavabit.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jeff King [Tue, 25 Aug 2009 03:03:16 +0000 (23:03 -0400)]
checkout: do not imply "-f" on unborn branches
When checkout sees that HEAD points to a non-existent ref,
it currently acts as if "-f" was given; this behavior dates
back to
5a03e7f, which enabled checkout from unborn branches
in the shell version of "git-checkout". The reasoning given
is to avoid the code path which tries to merge the tree
contents. When checkout was converted to C, this code
remained intact.
The unfortunate side effect of this strategy is that the
"force" code path will overwrite working tree and index
state that may be precious to the user. Instead of enabling
"force", this patch uses the normal "merge" codepath for an
unborn branch, but substitutes the empty tree for the "old"
commit.
This means that in the absence of an index, any files in the
working tree will be treated as untracked files, and a
checkout which would overwrite them is aborted. Similarly,
any paths in the index will be merged with an empty entry
as the base, meaning that unless the new branch's content is
identical to what's in the index, there will be a conflict
and the checkout will be aborted.
The user is then free to correct the situation or proceed
with "-f" as appropriate.
This patch also removes the "warning: you are on a branch
yet to be born" message. Its function was to warn the user
that we were enabling the "-f" option. Since we are no
longer doing that, there is no reason for the user to care
whether we are switching away from an unborn branch.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Nicolas Pitre [Mon, 24 Aug 2009 04:04:09 +0000 (00:04 -0400)]
fix simple deepening of a repo
If all refs sent by the remote repo during a fetch are reachable
locally, then no further conversation is performed with the remote. This
check is skipped when the --depth argument is provided to allow the
deepening of a shallow clone which corresponding remote repo has no
changed.
However, some additional filtering was added in commit
c29727d5 to
remove those refs which are equal on both sides. If the remote repo has
not changed, then the list of refs to give the remote process becomes
empty and simply attempting to deepen a shallow repo always fails.
Let's stop being smart in that case and simply send the whole list over
when that condition is met. The remote will do the right thing anyways.
Test cases for this issue are also provided.
Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Adam Simpkins [Fri, 21 Aug 2009 18:20:34 +0000 (11:20 -0700)]
Add tests for rev-list --graph with options that simplify history
These tests help make sure graph_is_interesting() is doing the right
thing.
Signed-off-by: Adam Simpkins <simpkins@facebook.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Mon, 24 Aug 2009 00:19:19 +0000 (17:19 -0700)]
Merge branch 'jc/verify-pack-stat'
* jc/verify-pack-stat:
verify-pack --stat-only: show histogram without verifying
Junio C Hamano [Mon, 24 Aug 2009 00:19:06 +0000 (17:19 -0700)]
Merge branch 'mr/gitweb-xz'
* mr/gitweb-xz:
gitweb: add support for XZ compressed snapshots
gitweb: update INSTALL regarding specific snapshot settings
gitweb: support to globally disable a snapshot format
Junio C Hamano [Mon, 24 Aug 2009 00:18:52 +0000 (17:18 -0700)]
Merge branch 'ld/p4'
* ld/p4:
git-p4: stream from perforce to speed up clones
Wilhansen Li [Fri, 21 Aug 2009 14:24:48 +0000 (22:24 +0800)]
Add support for the Mongoose web server.
Mongoose (http://code.google.com/p/mongoose/) is a lightweight web
server. It's just a single binary so it's a lot simpler to configure and
install.
Signed-off-by: Wilhansen Li <wil@nohakostudios.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Giuseppe Bilotta [Sun, 23 Aug 2009 08:28:09 +0000 (10:28 +0200)]
gitweb: pull ref markes pull out of subject <a> element
Since
4afbaef (gitweb: ref markers link to named shortlogs, 2008-09-02),
ref markers that accompany the subject in views such as shortlog and
history point to something different from the subject itself. Therefore,
they should not be included in the same <a> element.
Benefits of the change are:
* better compliance to the XHTML standards, that forbid links within
links even though the restriction cannot be imposed via DTD; this also
benefits visualization in some older browsers;
* when hovering the subject, only the subject itself is underlined; when
hovering the ref markers, only the text in the hovered ref marker is
underlined; previously, hovering any written part of the subject column
led to complete underlying of everything at the same time, with
unpleasing effects.
Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
Acked-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Matthieu Moy [Fri, 21 Aug 2009 08:57:59 +0000 (10:57 +0200)]
reset: make the reminder output consistent with "checkout"
git reset without argument displays a summary of the local modification,
like this:
$ git reset
Makefile: locally modified
Some people have problems with this; they look like an error message.
This patch makes its output mimic how "git checkout $another_branch"
reports the paths with local modifications. "git add --refresh --verbose"
is changed in the same way.
It also adds a header to make it clear that the output is informative,
and not an error.
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Matthieu Moy [Fri, 21 Aug 2009 08:57:58 +0000 (10:57 +0200)]
Rename REFRESH_SAY_CHANGED to REFRESH_IN_PORCELAIN.
The change in the output is going to become more general than just saying
"changed", so let's make the variable name more general too.
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Sat, 22 Aug 2009 03:23:10 +0000 (20:23 -0700)]
Sync with 1.6.4.1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Fri, 21 Aug 2009 19:02:25 +0000 (12:02 -0700)]
GIT 1.6.4.1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Sat, 22 Aug 2009 01:51:30 +0000 (18:51 -0700)]
Merge branch 'bc/maint-am-email' into maint
* bc/maint-am-email:
git-am: print fair error message when format detection fails
am: allow individual e-mail files as input
Junio C Hamano [Fri, 21 Aug 2009 22:13:21 +0000 (15:13 -0700)]
compat/snprintf.c: clarify SNPRINTF_SIZE_CORR
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Sat, 22 Aug 2009 01:47:53 +0000 (18:47 -0700)]
Merge branch 'cc/replace'
* cc/replace:
t6050: check pushing something based on a replaced commit
Documentation: add documentation for "git replace"
Add git-replace to .gitignore
builtin-replace: use "usage_msg_opt" to give better error messages
parse-options: add new function "usage_msg_opt"
builtin-replace: teach "git replace" to actually replace
Add new "git replace" command
environment: add global variable to disable replacement
mktag: call "check_sha1_signature" with the replacement sha1
replace_object: add a test case
object: call "check_sha1_signature" with the replacement sha1
sha1_file: add a "read_sha1_file_repl" function
replace_object: add mechanism to replace objects found in "refs/replace/"
refs: add a "for_each_replace_ref" function
Junio C Hamano [Sat, 22 Aug 2009 01:47:48 +0000 (18:47 -0700)]
Merge branch 'gb/apply-ignore-whitespace'
* gb/apply-ignore-whitespace:
git apply: option to ignore whitespace differences
Junio C Hamano [Sat, 22 Aug 2009 01:47:44 +0000 (18:47 -0700)]
Merge branch 'bc/mailsplit-cr-at-eol'
* bc/mailsplit-cr-at-eol:
Allow mailsplit (and hence git-am) to handle mails with CRLF line-endings
builtin-mailsplit.c: remove read_line_with_nul() since it is no longer used
builtin-mailinfo,builtin-mailsplit: use strbufs
strbuf: add new function strbuf_getwholeline()
Adam Simpkins [Wed, 19 Aug 2009 02:34:33 +0000 (19:34 -0700)]
graph API: fix bug in graph_is_interesting()
Previously, graph_is_interesting() did not behave quite the same way as
the code in get_revision(). As a result, it would sometimes think
commits were uninteresting, even though get_revision() would return
them. This resulted in incorrect lines in the graph output.
This change creates a get_commit_action() function, which
graph_is_interesting() and simplify_commit() both now use to determine
if a commit will be shown. It is identical to the old simplify_commit()
behavior, except that it never calls rewrite_parents().
This problem was reported by Santi Béjar. The following command
would exhibit the problem before, but now works correctly:
git log --graph --simplify-by-decoration --oneline v1.6.3.3
Previously git graph did not display the output for this command
correctly between
f29ac4f and
66996ec, among other places.
Signed-off-by: Adam Simpkins <simpkins@facebook.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Fri, 21 Aug 2009 18:34:24 +0000 (11:34 -0700)]
Merge branch 'jc/maint-merge-recursive-fix' into maint
* jc/maint-merge-recursive-fix:
merge-recursive: don't segfault while handling rename clashes
Junio C Hamano [Fri, 21 Aug 2009 18:34:17 +0000 (11:34 -0700)]
Merge branch 'zf/maint-gitweb-acname' into maint
* zf/maint-gitweb-acname:
gitweb: parse_commit_text encoding fix
Junio C Hamano [Fri, 21 Aug 2009 18:34:02 +0000 (11:34 -0700)]
Merge branch 'np/maint-limit-delta-cache' into maint
* np/maint-limit-delta-cache:
don't let the delta cache grow unbounded in 'git repack'
Junio C Hamano [Fri, 21 Aug 2009 18:33:54 +0000 (11:33 -0700)]
Merge branch 'jk/maint-show-tag' into maint
* jk/maint-show-tag:
show: add space between multiple items
show: suppress extra newline when showing annotated tag
Junio C Hamano [Fri, 21 Aug 2009 18:33:08 +0000 (11:33 -0700)]
Merge branch 'sb/maint-pull-rebase' into maint
* sb/maint-pull-rebase:
pull: support rebased upstream + fetch + pull --rebase
t5520-pull: Test for rebased upstream + fetch + pull --rebase
Johannes Sixt [Fri, 21 Aug 2009 08:32:25 +0000 (10:32 +0200)]
Make test number t7406- unique
We skip t7407 because a patch series is cooking that uses is.
Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Johan Herland [Wed, 19 Aug 2009 23:07:43 +0000 (01:07 +0200)]
git clone: Add --recursive to automatically checkout (nested) submodules
Many projects using submodules expect all submodules to be checked out
in order to build/work correctly. A common command sequence for
developers on such projects is:
git clone url/to/project
cd project
git submodule update --init (--recursive)
This patch introduces the --recursive option to git-clone. The new
option causes git-clone to recursively clone and checkout all
submodules of the cloned project. Hence, the above command sequence
can be reduced to:
git clone --recursive url/to/project
--recursive is ignored if no checkout is done by the git-clone.
The patch also includes documentation and a selftest.
Signed-off-by: Johan Herland <johan@herland.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Johan Herland [Thu, 20 Aug 2009 09:24:54 +0000 (11:24 +0200)]
t7407: Use 'rev-parse --short' rather than bash's substring expansion notation
The substring expansion notation is a bashism that we have not so far
adopted. Use 'git rev-parse --short' instead, as this also handles
the case where the unique abbreviation is longer than 7 characters.
Also fix the typo; the object name for submodule #2 was copied from
submodule #1's by mistake.
Suggested-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Johan Herland <johan@herland.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Brandon Casey [Thu, 20 Aug 2009 01:27:08 +0000 (20:27 -0500)]
git-compat-util.h: remove superfluous test for __sun__
This 'ifndef' macro is entered only when __sun__ is not defined. This test
will never fail since it is located inside of the 'else' branch of an 'if'
macro which tests whether __sun__ is defined. It has had no effect since
the merge at
436f66b7.
Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Wed, 19 Aug 2009 06:33:16 +0000 (23:33 -0700)]
Merge branch 'rc/maint-http-fix'
* rc/maint-http-fix:
http.c: don't assume that urls don't end with slash
Junio C Hamano [Wed, 19 Aug 2009 06:32:58 +0000 (23:32 -0700)]
Merge branch 'tr/maint-1.6.3-add-p-modeonly-fix'
* tr/maint-1.6.3-add-p-modeonly-fix:
add -p: do not attempt to coalesce mode changes
git add -p: demonstrate failure when staging both mode and hunk
Adam Simpkins [Tue, 18 Aug 2009 21:41:12 +0000 (14:41 -0700)]
graph API: use a new color when starting a brand new column
Use a new color for commits that don't have any previously printed
children. The following command demonstrates the changes:
git log --graph --pretty=tformat:'%h %s%n' -7
481c7a6 18b0793
Now the two independent lines of development are displayed with
different colors, instead of both using the same color.
Signed-off-by: Adam Simpkins <simpkins@facebook.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Johan Herland [Wed, 19 Aug 2009 01:45:24 +0000 (03:45 +0200)]
git submodule status: Add --recursive to recurse into nested submodules
In very large and hierarchically structured projects, one may encounter
nested submodules. In these situations, it is valuable to not only show
status for all the submodules in the current repo (which is what is
currently done by 'git submodule status'), but also to show status for
all submodules at all levels (i.e. recursing into nested submodules as
well).
This patch teaches the new --recursive option to the 'git submodule status'
command. The patch also includes documentation and selftests.
Signed-off-by: Johan Herland <johan@herland.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Johan Herland [Wed, 19 Aug 2009 01:45:23 +0000 (03:45 +0200)]
git submodule update: Introduce --recursive to update nested submodules
In very large and hierarchically structured projects, one may encounter
nested submodules. In these situations, it is valuable to not only update
the submodules in the current repo (which is what is currently done by
'git submodule update'), but also to operate on all submodules at all
levels (i.e. recursing into nested submodules as well).
This patch teaches the new --recursive option to the 'git submodule update'
command. The patch also includes documentation and selftests.
Signed-off-by: Johan Herland <johan@herland.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Johan Herland [Wed, 19 Aug 2009 01:45:22 +0000 (03:45 +0200)]
git submodule foreach: Add --recursive to recurse into nested submodules
In very large and hierarchically structured projects, one may encounter
nested submodules. In these situations, it is valuable to not only operate
on all the submodules in the current repo (which is what is currently done
by 'git submodule foreach'), but also to operate on all submodules at all
levels (i.e. recursing into nested submodules as well).
This patch teaches the new --recursive option to the 'git submodule foreach'
command. The patch also includes documentation and selftests.
Signed-off-by: Johan Herland <johan@herland.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Johan Herland [Wed, 19 Aug 2009 01:45:21 +0000 (03:45 +0200)]
git submodule foreach: test access to submodule name as '$name'
Add verification of the behaviour of '$name' to the git submodule
foreach selftest.
Signed-off-by: Johan Herland <johan@herland.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Johan Herland [Wed, 19 Aug 2009 01:45:20 +0000 (03:45 +0200)]
Add selftest for 'git submodule foreach'
The selftest verifies that:
- only checked out submodules are visited by 'git submodule foreach'
- the $path, and $sha1 variables are set correctly for each submodule
Signed-off-by: Johan Herland <johan@herland.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Johan Herland [Wed, 19 Aug 2009 01:45:19 +0000 (03:45 +0200)]
git submodule: Cleanup usage string and add option parsing to cmd_foreach()
Signed-off-by: Johan Herland <johan@herland.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Karthik R [Tue, 18 Aug 2009 23:54:40 +0000 (18:54 -0500)]
git-svn: Use GIT_SSH setting if SVN_SSH is not set
If SVN_SSH is defined, it will be used. Else value in
GIT_SSH is copied to SVN_SSH & then, only on Windows,
the \s are escaped.
On Windows, the shell-variables must be set as follows
GIT_SSH="C:\Program Files\PuTTY\plink.exe"
SVN_SSH="C:\\Program Files\\PuTTY\\plink.exe"
See http://code.google.com/p/msysgit/issues/detail?id=305
[ew: fixed indentation to use tabs]
Acked-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Karthik Rajagopalan <karthikr@fastmail.fm>
Eric Wong [Sun, 16 Aug 2009 21:22:12 +0000 (14:22 -0700)]
svn: assume URLs from the command-line are URI-encoded
And then unescape them when writing to $GIT_CONFIG.
SVN has different rules for repository URLs (usually the root)
and for paths within that repository (below the HTTP layer).
Thus, for the request URI path at the HTTP level, the URI needs
to be encoded. However, in the body of the HTTP request (the
with underlying SVN XML protocol), those paths should not be
URI-encoded[1]. For non-HTTP(S) requests, SVN appears to be
more flexible and will except weird characters in the URL as
well as URI-encoded ones.
Since users are used to using URLs being entirely URI-encoded,
git svn will now attempt to unescape the path portion of URLs
while leaving the actual repository URL untouched.
This change will be reflected in newly-created $GIT_CONFIG files
only. This allows users to switch between svn(+ssh)://, file://
and http(s):// urls without changing the fetch/branches/tags
config keys. This won't affect existing imports at all (since
things didn't work before this commit anyways), and will allow
users to force escaping into repository paths that look like
they're escaped (but are not).
Thanks to Mike Smullin for the original bug report and Björn
Steinbrink for summarizing it into testable cases for me.
[1] Except when committing copies/renames, see
commit
29633bb91c7bcff31ff3bb59378709e3e3ef627d
Signed-off-by: Eric Wong <normalperson@yhbt.net>
Tuomas Suutari [Fri, 14 Aug 2009 08:11:58 +0000 (11:11 +0300)]
git-svn.txt: Fix location of parent argument
The note about interoperating in different timezones and such is about
localtime argument, not parent.
Signed-off-by: Tuomas Suutari <tuomas.suutari@gmail.com>
Acked-by: Eric Wong <normalperson@yhbt.net>
Junio C Hamano [Tue, 18 Aug 2009 21:40:10 +0000 (14:40 -0700)]
Merge branch 'maint'
* maint:
filter-branch: make the usage string fit on 80 chars terminals.
filter-branch: add an example how to add ACKs to a range of commits
docs: describe impact of repack on "clone -s"
Nicolas Pitre [Tue, 18 Aug 2009 00:09:56 +0000 (20:09 -0400)]
remove ARM and Mozilla SHA1 implementations
They are both slower than the new BLK_SHA1 implementation, so it is
pointless to keep them around.
Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Nicolas Pitre [Tue, 18 Aug 2009 19:37:22 +0000 (15:37 -0400)]
block-sha1: guard gcc extensions with __GNUC__
With this, the code should now be portable to any C compiler.
Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Nicolas Pitre [Tue, 18 Aug 2009 19:26:55 +0000 (15:26 -0400)]
make sure byte swapping is optimal for git
We rely on ntohl() and htonl() to perform byte swapping in many places.
However, some platforms have libraries providing really poor
implementations of those which might cause significant performance
issues, especially with the block-sha1 code.
Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Tay Ray Chuan [Mon, 17 Aug 2009 09:09:43 +0000 (17:09 +0800)]
http.c: don't assume that urls don't end with slash
Make append_remote_object_url() (and by implication,
get_remote_object_url) use end_url_with_slash() to ensure that the url
ends with a slash.
Previously, they assumed that the url did not end with a slash and
as a result appended a slash, sometimes errorneously.
This fixes an issue introduced in
5424bc5 ("http*: add helper methods
for fetching objects (loose)"), where the append_remote_object_url()
implementation in http-push.c, which assumed that urls end with a
slash, was replaced by another one in http.c, which assumed urls did
not end with a slash.
The above issue was raised by Thomas Schlichter:
http://marc.info/?l=git&m=
125043105231327
Signed-off-by: Tay Ray Chuan <rctay89@gmail.com>
Tested-by: Thomas Schlichter <thomas.schlichter@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Matthieu Moy [Tue, 18 Aug 2009 09:51:00 +0000 (11:51 +0200)]
filter-branch: make the usage string fit on 80 chars terminals.
It used to be a single, huge line, badly wrapped by xterm.
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Lars Hjemli [Sat, 15 Aug 2009 14:23:12 +0000 (16:23 +0200)]
git-log: allow --decorate[=short|full]
Commit
de435ac0 changed the behavior of --decorate from printing the
full ref (e.g., "refs/heads/master") to a shorter, more human-readable
version (e.g., just "master"). While this is nice for human readers,
external tools using the output from "git log" may prefer the full
version.
This patch introduces an extension to --decorate to allow the caller to
specify either the short or the full versions.
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Acked-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Johan Herland [Sun, 16 Aug 2009 01:10:08 +0000 (03:10 +0200)]
git submodule foreach: Provide access to submodule name, as '$name'
The argument to 'git submodule foreach' already has access to the variables
'$path' (the path to the submodule, relative to the superproject) and '$sha1'
(the submodule commit recorded by the superproject).
This patch adds another variable -- '$name' -- which contains the name of the
submodule, as recorded in the superproject's .gitmodules file.
Signed-off-by: Johan Herland <johan@herland.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Nicolas Pitre [Tue, 18 Aug 2009 00:18:23 +0000 (20:18 -0400)]
block-sha1: make the size member first in the context struct
This is a 64-bit value, hence having it first provides a better
alignment.
Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Johannes Schindelin [Mon, 17 Aug 2009 20:38:46 +0000 (22:38 +0200)]
filter-branch: add an example how to add ACKs to a range of commits
When you have to add certain lines like ACKs (or for that matter,
Signed-off-by:s) to a range of commits starting with HEAD, you might
be tempted to use 'git rebase -i -10', but that is a waste of your
time.
It is better to use 'git filter-branch' with an appropriate message
filter, and this commit adds an example how to do so to
filter-branch's man page.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Mon, 17 Aug 2009 06:53:12 +0000 (23:53 -0700)]
check_path(): allow symlinked directories to checkout-index --prefix
Merlyn noticed that Documentation/install-doc-quick.sh no longer correctly
removes old installed documents when the target directory has a leading
path that is a symlink. It turns out that "checkout-index --prefix" was
broken by recent
b6986d8 (git-checkout: be careful about untracked
symlinks, 2009-07-29).
I suspect has_symlink_leading_path() could learn the third parameter
(prefix that is allowed to be symlinked directories) to allow us to retire
a similar function has_dirs_only_path().
Another avenue of fixing this I considered was to get rid of base_dir and
base_dir_len from "struct checkout", and instead make "git checkout-index"
when run with --prefix mkdir the leading path and chdir in there. It
might be the best longer term solution to this issue, as the base_dir
feature is used only by that rather obscure codepath as far as I know.
But at least this patch should fix this breakage.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Alexandre Julliard [Mon, 17 Aug 2009 15:35:44 +0000 (17:35 +0200)]
read-tree: Fix regression with creation of a new index file.
Reading the index into an empty file has been broken by
5a56da58060e50980fab0f4c38203a25440d1530, since it causes the existing
index to always be loaded first, and dies if it's an empty file:
$ GIT_INDEX_FILE=`mktemp` git read-tree master
fatal: index file smaller than expected
It breaks for instance committing from git.el. This patch reverts to the
previous behavior of only loading the index when merging it.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>