]> asedeno.scripts.mit.edu Git - git.git/log
git.git
16 years agoDoc fix for git-reflog: mention @{...} syntax, and <ref> in synopsys.
Matthieu Moy [Mon, 19 Nov 2007 18:25:11 +0000 (19:25 +0100)]
Doc fix for git-reflog: mention @{...} syntax, and <ref> in synopsys.

The HEAD@{...} syntax was documented in git-rev-parse manpage, which
is hard to find by someone looking for the documentation of porcelain.
git-reflog is probably the place where one expects to find this.

While I'm there, "git revlog show whatever" was also undocumented.

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agoconfig: clarify compression defaults
Brian Downing [Mon, 19 Nov 2007 16:58:51 +0000 (10:58 -0600)]
config: clarify compression defaults

* Clarify that core.compression provides a system-wide default to
  other compression parameters.

* Explain that the default for pack.compression, -1, is "a default
  compromise between speed and compression (currently equivalent
  to level 6)" according to zlib.h.

Signed-off-by: Brian Downing <bdowning@lavos.net>
Acked-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agoconfig: correct core.loosecompression documentation
Brian Downing [Mon, 19 Nov 2007 16:58:50 +0000 (10:58 -0600)]
config: correct core.loosecompression documentation

* core.loosecompression stated that the default was "0 (best speed)",
  when in fact 0 is "no compression", and the default is Z_BEST_SPEED,
  which is 1.

Signed-off-by: Brian Downing <bdowning@lavos.net>
Acked-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agogitview: import only one of gtksourceview and gtksourceview2
Anton Gyllenberg [Mon, 19 Nov 2007 10:37:16 +0000 (12:37 +0200)]
gitview: import only one of gtksourceview and gtksourceview2

Importing both gtksourceview and gtksourceview2 will make python segfault
on my system (ubuntu 7.10). Change so that gtksourceview is only imported
if importing gtksourceview2 fails. This should be safe as gtksourceview
is only used if gtksourceview2 is not available.

Signed-off-by: Anton Gyllenberg <anton@iki.fi>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agogit-send-email: show all headers when sending mail
David D. Kilzer [Mon, 19 Nov 2007 04:14:55 +0000 (20:14 -0800)]
git-send-email: show all headers when sending mail

As a git newbie, it was confusing to set an In-Reply-To header but then
not see it printed when the git-send-email command was run.

This patch prints all headers that would be sent to sendmail or an SMTP
server instead of only printing From, Subject, Cc, To.  It also removes
the now-extraneous Date header after the "Log says" line.

Added test to t/t9001-send-email.sh.

Signed-off-by: David D. Kilzer <ddkilzer@kilzer.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agoMerge branch 'maint'
Junio C Hamano [Mon, 19 Nov 2007 08:19:15 +0000 (00:19 -0800)]
Merge branch 'maint'

* maint:
  Documentation: Fix references to deprecated commands
  user-manual: mention "..." in "Generating diffs", etc.
  user-manual: Add section "Why bisecting merge commits can be harder ..."
  git-remote.txt: fix example url

16 years agoFurther clarify clean.requireForce changes
Wincent Colaiuta [Mon, 19 Nov 2007 08:06:31 +0000 (09:06 +0100)]
Further clarify clean.requireForce changes

Mention the -f switch in the release notes for clean.requireForce to avoid
possible misunderstandings.

Signed-off-by: Wincent Colaiuta <win@wincent.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agoMerge branch 'maint' of git://linux-nfs.org/~bfields/git into maint
Junio C Hamano [Mon, 19 Nov 2007 07:56:01 +0000 (23:56 -0800)]
Merge branch 'maint' of git://linux-nfs.org/~bfields/git into maint

* 'maint' of git://linux-nfs.org/~bfields/git:
  Documentation: Fix references to deprecated commands
  user-manual: mention "..." in "Generating diffs", etc.
  user-manual: Add section "Why bisecting merge commits can be harder ..."
  git-remote.txt: fix example url

16 years agoMake builtin-tag.c use parse_options.
Carlos Rica [Fri, 9 Nov 2007 13:42:56 +0000 (14:42 +0100)]
Make builtin-tag.c use parse_options.

Also, this removes those tests ensuring that repeated
-m options don't allocate memory more than once, because now
this is done after parsing options, using the last one
when more are given. The same for -F.

Signed-off-by: Carlos Rica <jasampler@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agoTeach git clean to use setup_standard_excludes()
Shawn Bohrer [Thu, 15 Nov 2007 05:00:54 +0000 (23:00 -0600)]
Teach git clean to use setup_standard_excludes()

Signed-off-by: Shawn Bohrer <shawn.bohrer@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agogit-clean: Fix error message if clean.requireForce is not set.
Junio C Hamano [Tue, 13 Nov 2007 05:13:05 +0000 (21:13 -0800)]
git-clean: Fix error message if clean.requireForce is not set.

It was distracting to see this error message:

     clean.requireForce set and -n or -f not given; refusing to clean

even though clean.requireForce was not set at all. This patch distinguishes
the cases and gives a different message depending on whether the
configuration variable is not set or set to true.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agoMake git-clean a builtin
Shawn Bohrer [Mon, 12 Nov 2007 01:48:47 +0000 (19:48 -0600)]
Make git-clean a builtin

This replaces git-clean.sh with builtin-clean.c, and moves
git-clean.sh to the examples.

This also introduces a change in behavior when removing directories
explicitly specified as a path.  For example currently:

1. When dir has only untracked files, these two behave differently:

    $ git clean -n dir
    $ git clean -n dir/

the former says "Would not remove dir/", while the latter would say
"Would remove dir/untracked" for all paths under it, but not the
directory itself.

With -d, the former would stop refusing, however since the user
explicitly asked to remove the directory the -d is no longer required.

2. When there are more parameters:

    $ git clean -n dir foo
    $ git clean -n dir/ foo

both cases refuse to remove dir/ unless -d is specified.  Once again
since both cases requested to remove dir the -d is no longer required.

Thanks to Johannes Schindelin for the conversion to using the
parse-options API.

Signed-off-by: Shawn Bohrer <shawn.bohrer@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agoMove gitk to its own subdirectory
Junio C Hamano [Sat, 17 Nov 2007 18:51:16 +0000 (10:51 -0800)]
Move gitk to its own subdirectory

This is to prepare for gitk i18n effort that makes gitk not a single file
project anymore.  We may use subproject to bind git.git and gitk.git more
loosely in the future, but we do not want to require everybody to have
subproject aware git to be able to pull from git.git yet.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agoDocumentation: Fix references to deprecated commands
J. Bruce Fields [Mon, 19 Nov 2007 01:50:57 +0000 (20:50 -0500)]
Documentation: Fix references to deprecated commands

... by changing git-tar-tree reference to git-archive and removing
seemingly unrelevant footnote about git-ssh-{fetch,upload}.

Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
16 years agoBisect: use "$GIT_DIR/BISECT_NAMES" to check if we are bisecting.
Christian Couder [Sun, 18 Nov 2007 15:34:03 +0000 (16:34 +0100)]
Bisect: use "$GIT_DIR/BISECT_NAMES" to check if we are bisecting.

Previously we tested if the "$GIT_DIR/refs/bisect" directory
existed, to check if we were bisecting.

Now with packed refs, it is simpler to check if the file
"$GIT_DIR/BISECT_NAMES" exists, as it is already created when
starting bisection and removed when reseting bisection.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agoUpdate draft release notes for 1.5.4
Junio C Hamano [Mon, 19 Nov 2007 00:24:14 +0000 (16:24 -0800)]
Update draft release notes for 1.5.4

Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agouser-manual: mention "..." in "Generating diffs", etc.
J. Bruce Fields [Mon, 19 Nov 2007 00:18:27 +0000 (19:18 -0500)]
user-manual: mention "..." in "Generating diffs", etc.

We should mention the use of the "..." syntax for git-diff here.  The
note about the difference between diff and the combined output of
git-format-patch then no longer fits so well, so remove it.  Add a
reference to the git-format-patch[1] manpage.

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
16 years agoMerge branch 'lt/rev-list-gitlink'
Junio C Hamano [Mon, 19 Nov 2007 00:16:37 +0000 (16:16 -0800)]
Merge branch 'lt/rev-list-gitlink'

* lt/rev-list-gitlink:
  Fix rev-list when showing objects involving submodules

16 years agoMerge branch 'ds/checkout-upper'
Junio C Hamano [Mon, 19 Nov 2007 00:04:17 +0000 (16:04 -0800)]
Merge branch 'ds/checkout-upper'

* ds/checkout-upper:
  git-checkout: Test for relative path use.
  git-checkout: Support relative paths containing "..".

16 years agoMerge branch 'sh/p4'
Junio C Hamano [Mon, 19 Nov 2007 00:03:58 +0000 (16:03 -0800)]
Merge branch 'sh/p4'

* sh/p4:
  git-p4: Fix direct import from perforce after fetching changes through git from origin

16 years agoMerge branch 'lt/rev-list-interactive'
Junio C Hamano [Mon, 19 Nov 2007 00:03:24 +0000 (16:03 -0800)]
Merge branch 'lt/rev-list-interactive'

* lt/rev-list-interactive:
  Fix parent rewriting in --early-output
  revision walker: mini clean-up
  Enhance --early-output format
  Add "--early-output" log flag for interactive GUI use
  Simplify topo-sort logic

16 years agoMerge branch 'ph/diffopts'
Junio C Hamano [Sun, 18 Nov 2007 23:50:16 +0000 (15:50 -0800)]
Merge branch 'ph/diffopts'

* ph/diffopts:
  Reorder diff_opt_parse options more logically per topics.
  Make the diff_options bitfields be an unsigned with explicit masks.
  Use OPT_BIT in builtin-pack-refs
  Use OPT_BIT in builtin-for-each-ref
  Use OPT_SET_INT and OPT_BIT in builtin-branch
  parse-options new features.

16 years agoDraft release notes: fix clean.requireForce description
Junio C Hamano [Sun, 18 Nov 2007 23:22:51 +0000 (15:22 -0800)]
Draft release notes: fix clean.requireForce description

Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agoMerge branch 'maint' to synchronize with 1.5.3.6
Junio C Hamano [Sun, 18 Nov 2007 23:15:47 +0000 (15:15 -0800)]
Merge branch 'maint' to synchronize with 1.5.3.6

* maint:
  GIT 1.5.3.6
  grep -An -Bm: fix invocation of external grep command

Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agouser-manual: Add section "Why bisecting merge commits can be harder ..."
Steffen Prohaska [Sat, 10 Nov 2007 13:49:54 +0000 (14:49 +0100)]
user-manual: Add section "Why bisecting merge commits can be harder ..."

This commit adds a discussion of the challenge of bisecting
merge commits to the user manual.  The original author is
Junio C Hamano <gitster@pobox.com>, who posted the text to
the mailing list <http://marc.info/?l=git&m=119403257315527&w=2>.
His email was adapted for the manual.

The discussion is added to "Rewriting history and maintainig
patch series".  The text added requires good understanding of
merging and rebasing.  Therefore it should not be placed too
early in the manual.  Right after the section on "Problems with
rewriting history", the discussion of bisect gives another reason
for linearizing as much of the history as possible.

The text includes suggestions and fixes by
Ralf Wildenhues <Ralf.Wildenhues@gmx.de> and
Benoit Sigoure <tsuna@lrde.epita.fr>.

Signed-off-by: Steffen Prohaska <prohaska@zib.de>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
16 years agoGIT 1.5.3.6 v1.5.3.6
Junio C Hamano [Sun, 18 Nov 2007 22:00:38 +0000 (14:00 -0800)]
GIT 1.5.3.6

16 years agoUse compat mkdtemp() on Solaris boxes
Guido Ostkamp [Fri, 16 Nov 2007 18:59:58 +0000 (19:59 +0100)]
Use compat mkdtemp() on Solaris boxes

Define NO_MKDTEMP for all variants of SunOS; Solaris 10 does not
have mkdtemp() and all the other versions our Makefile knows
about don't have it either.

NO_{SETENV,UNSETENV,C99_FORMAT,STRTOUMAX} definitions cannot be
unified across versions.  Beginning with Solaris 10, the C-library
provides unsetenv(), setenv() and strtoumax().  Also 'z'/'t' formats
are supported.  However, older versions of Solaris do not support
these.

Signed-off-by: Guido Ostkamp <git@ostkamp.fastmail.fm>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agosend-pack: fix "everything up-to-date" message
Jeff King [Sun, 18 Nov 2007 08:08:22 +0000 (03:08 -0500)]
send-pack: fix "everything up-to-date" message

This has always been slightly inaccurate, since it used the
new_refs counter, which really meant "did we send any
objects," so deletions were not counted.

It has gotten even worse with recent patches, since we no
longer look at the 'ret' value, meaning we would say "up to
date" if non-ff pushes were rejected.

Instead, we now claim up to date iff every ref is either
unmatched or up to date. Any other case should already have
generated a status line.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agosend-pack: tighten remote error reporting
Jeff King [Sun, 18 Nov 2007 07:16:52 +0000 (02:16 -0500)]
send-pack: tighten remote error reporting

Previously, we set all ref pushes to 'OK', and then marked
them as errors if the remote reported so. This has the
problem that if the remote dies or fails to report a ref, we
just assume it was OK.

Instead, we use a new non-OK state to indicate that we are
expecting status (if the remote doesn't support the
report-status feature, we fall back on the old behavior).
Thus we can flag refs for which we expected a status, but
got none (conversely, we now also print a warning for refs
for which we get a status, but weren't expecting one).

This also allows us to simplify the receive_status exit
code, since each ref is individually marked with failure
until we get a success response. We can just print the usual
status table, so the user still gets a sense of what we were
trying to do when the failure happened.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agomake "find_ref_by_name" a public function
Jeff King [Sun, 18 Nov 2007 07:13:10 +0000 (02:13 -0500)]
make "find_ref_by_name" a public function

This was a static in remote.c, but is generally useful.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agoFix warning about bitfield in struct ref
Shawn O. Pearce [Sun, 18 Nov 2007 09:31:37 +0000 (04:31 -0500)]
Fix warning about bitfield in struct ref

cache.h:503: warning: type of bit-field 'force' is a GCC extension
cache.h:504: warning: type of bit-field 'merge' is a GCC extension
cache.h:505: warning: type of bit-field 'nonfastforward' is a GCC extension
cache.h:506: warning: type of bit-field 'deletion' is a GCC extension

So we change it to an 'unsigned int' which is not a GCC extension.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agoMerge branch 'ph/parseopt-sh'
Junio C Hamano [Sun, 18 Nov 2007 05:39:37 +0000 (21:39 -0800)]
Merge branch 'ph/parseopt-sh'

* ph/parseopt-sh:
  git-quiltimport.sh fix --patches handling
  git-am: -i does not take a string parameter.
  sh-setup: don't let eval output to be shell-expanded.
  git-sh-setup: fix parseopt `eval` string underquoting
  Give git-am back the ability to add Signed-off-by lines.
  git-rev-parse --parseopt
  scripts: Add placeholders for OPTIONS_SPEC
  Migrate git-repack.sh to use git-rev-parse --parseopt
  Migrate git-quiltimport.sh to use git-rev-parse --parseopt
  Migrate git-checkout.sh to use git-rev-parse --parseopt --keep-dashdash
  Migrate git-instaweb.sh to use git-rev-parse --parseopt
  Migrate git-merge.sh to use git-rev-parse --parseopt
  Migrate git-am.sh to use git-rev-parse --parseopt
  Migrate git-clone to use git-rev-parse --parseopt
  Migrate git-clean.sh to use git-rev-parse --parseopt.
  Update git-sh-setup(1) to allow transparent use of git-rev-parse --parseopt
  Add a parseopt mode to git-rev-parse to bring parse-options to shell scripts.

16 years agogrep -An -Bm: fix invocation of external grep command
Junio C Hamano [Sun, 18 Nov 2007 05:18:14 +0000 (21:18 -0800)]
grep -An -Bm: fix invocation of external grep command

When building command line to invoke external grep, the
arguments to -A/-B/-C options were placd in randarg[] buffer,
but the code forgot that snprintf() does not count terminating
NUL in its return value.  This caused "git grep -A1 -B2" to
invoke external grep with "-B21 -A1".

Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agofetch-pack: Prepare for a side-band demultiplexer in a thread.
Johannes Sixt [Sat, 17 Nov 2007 22:09:28 +0000 (23:09 +0100)]
fetch-pack: Prepare for a side-band demultiplexer in a thread.

get_pack() receives a pair of file descriptors that communicate with
upload-pack at the remote end. In order to support the case where the
side-band demultiplexer runs in a thread, and, hence, in the same process
as the main routine, we must not close the readable file descriptor early.

The handling of the readable fd is changed in the case where upload-pack
supports side-band communication: The old code closed the fd after it was
inherited to the side-band demultiplexer process. Now we do not close it.
The caller (do_fetch_pack) will close it later anyway. The demultiplexer
is the only reader, it does not matter that the fd remains open in the
main process as well as in unpack-objects/index-pack, which inherits it.

The writable fd is not needed in get_pack(), hence, the old code closed
the fd. For symmetry with the readable fd, we now do not close it; the
caller (do_fetch_pack) will close it later anyway. Therefore, the new
behavior is that the channel now remains open during the entire
conversation, but this has no ill effects because upload-pack does not read
from it once it has begun to send the pack data. For the same reason it
does not matter that the writable fd is now inherited to the demultiplexer
and unpack-objects/index-pack processes.

Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agogit-remote.txt: fix example url
J. Bruce Fields [Sat, 3 Nov 2007 02:54:31 +0000 (22:54 -0400)]
git-remote.txt: fix example url

If I'm going to use a real example as a URL, I suppose I should get it
right....

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
16 years agoMerge git://git.bogomips.org/git-svn
Junio C Hamano [Sun, 18 Nov 2007 00:40:03 +0000 (16:40 -0800)]
Merge git://git.bogomips.org/git-svn

* git://git.bogomips.org/git-svn:
  git-svn: Fix a typo and add a comma in an error message in git-svn
  git-svn log: handle unreachable revisions like "svn log"
  git-svn log: include commit log for the smallest revision in a range
  git-svn log: fix ascending revision ranges
  git-svn's dcommit must use subversion's config
  git-svn: add tests for command-line usage of init and clone commands

16 years agogit-svn: Fix a typo and add a comma in an error message in git-svn
David Reiss [Tue, 13 Nov 2007 21:47:26 +0000 (13:47 -0800)]
git-svn: Fix a typo and add a comma in an error message in git-svn

Signed-off-by: David Reiss <dreiss@facebook.com>
Acked-by: Eric Wong <normalperson@yhbt.net>
16 years agogit-svn log: handle unreachable revisions like "svn log"
David D Kilzer [Mon, 12 Nov 2007 06:56:52 +0000 (22:56 -0800)]
git-svn log: handle unreachable revisions like "svn log"

When unreachable revisions are given to "svn log", it displays all commit
logs in the given range that exist in the current tree.  (If no commit
logs are found in the current tree, it simply prints a single commit log
separator.)  This patch makes "git-svn log" behave the same way.

Ten tests added to t/t9116-git-svn-log.sh.

Signed-off-by: David D Kilzer <ddkilzer@kilzer.net>
Acked-by: Eric Wong <normalperson@yhbt.net>
16 years agogit-svn log: include commit log for the smallest revision in a range
David D Kilzer [Sun, 11 Nov 2007 06:10:34 +0000 (22:10 -0800)]
git-svn log: include commit log for the smallest revision in a range

The "svn log -rM:N" command shows commit logs inclusive in the range [M,N].
Previously "git-svn log" always excluded the commit log for the smallest
revision in a range, whether the range was ascending or descending.  With
this patch, the smallest revision in a range is always shown.

Updated tests for ascending and descending revision ranges.

Signed-off-by: David D Kilzer <ddkilzer@kilzer.net>
Acked-by: Eric Wong <normalperson@yhbt.net>
16 years agogit-svn log: fix ascending revision ranges
David D Kilzer [Sun, 11 Nov 2007 06:10:33 +0000 (22:10 -0800)]
git-svn log: fix ascending revision ranges

Fixed typo in Git::SVN::Log::git_svn_log_cmd().  Previously a command like
"git-svn log -r1:4" would only show a commit log separator.

Added tests for ascending and descending revision ranges.

Signed-off-by: David D Kilzer <ddkilzer@kilzer.net>
Acked-by: Eric Wong <normalperson@yhbt.net>
16 years agogit-svn's dcommit must use subversion's config
Konstantin V. Arkhipov [Wed, 14 Nov 2007 00:52:02 +0000 (03:52 +0300)]
git-svn's dcommit must use subversion's config

When doing dcommit git-svn must use subversion's config or newly created
files will not include svn's properties
(defined in [auto-props] with 'enable-auto-props = yes').

Signed-off-by: Konstantin V. Arkhipov <voxus@onphp.org>
Acked-by: Eric Wong <normalperson@yhbt.net>
16 years agogit-svn: add tests for command-line usage of init and clone commands
Eric Wong [Sat, 17 Nov 2007 20:47:16 +0000 (12:47 -0800)]
git-svn: add tests for command-line usage of init and clone commands

Some patches broke these commands in certain cases and were only
caught by manual testing.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
16 years agosend-pack: assign remote errors to each ref
Jeff King [Sat, 17 Nov 2007 12:56:03 +0000 (07:56 -0500)]
send-pack: assign remote errors to each ref

This lets us show remote errors (e.g., a denied hook) along
with the usual push output.

There is a slightly clever optimization in receive_status
that bears explanation. We need to correlate the returned
status and our ref objects, which naively could be an O(m*n)
operation. However, since the current implementation of
receive-pack returns the errors to us in the same order that
we sent them, we optimistically look for the next ref to be
looked up to come after the last one we have found. So it
should be an O(m+n) merge if the receive-pack behavior
holds, but we fall back to a correct but slower behavior if
it should change.

Signed-off-by: Jeff King <peff@peff.net>
Acked-by: Daniel Barkalow <barkalow@iabervon.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agosend-pack: check ref->status before updating tracking refs
Jeff King [Sat, 17 Nov 2007 12:55:15 +0000 (07:55 -0500)]
send-pack: check ref->status before updating tracking refs

Previously, we manually checked the 'NONE' and 'UPTODATE'
conditions. Now that we have ref->status, we can easily
say "only update if we pushed successfully".

This adds a test for and fixes a regression introduced in
ed31df31 where deleted refs did not have their tracking
branches removed. This was due to a bogus per-ref error test
that is superseded by the more accurate ref->status flag.

Signed-off-by: Jeff King <peff@peff.net>
Completely-Acked-By: Alex "Sleepy" Riesen <raa.lkml@gmail.com>
Acked-by: Daniel Barkalow <barkalow@iabervon.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agosend-pack: track errors for each ref
Jeff King [Sat, 17 Nov 2007 12:54:27 +0000 (07:54 -0500)]
send-pack: track errors for each ref

Instead of keeping the 'ret' variable, we instead have a
status flag for each ref that tracks what happened to it.
We then print the ref status after all of the refs have
been examined.

This paves the way for three improvements:
  - updating tracking refs only for non-error refs
  - incorporating remote rejection into the printed status
  - printing errors in a different order than we processed
    (e.g., consolidating non-ff errors near the end with
    a special message)

Signed-off-by: Jeff King <peff@peff.net>
Acked-by: Alex Riesen <raa.lkml@gmail.com>
Acked-by: Daniel Barkalow <barkalow@iabervon.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agoBisect visualize: use "for-each-ref" to list all good refs.
Christian Couder [Sat, 17 Nov 2007 13:35:25 +0000 (14:35 +0100)]
Bisect visualize: use "for-each-ref" to list all good refs.

In bisect_visualize, "cd $GIT_DIR/refs && echo bisect/good-*" was
still used instead of "git for-each-ref". This patch fix it.

We now pass "refs/bisect/bad" and "--not refs/bisect/good-<rev>"
instead of "bisect/bad" and "--not bisect/good-<rev>" to gitk,
but it seems to work.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agoUpdate draft release notes for 1.5.4
Junio C Hamano [Sat, 17 Nov 2007 05:47:59 +0000 (21:47 -0800)]
Update draft release notes for 1.5.4

Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agoFix and improve t7004 (git-tag tests)
Mike Hommey [Fri, 16 Nov 2007 22:02:08 +0000 (23:02 +0100)]
Fix and improve t7004 (git-tag tests)

Brown paper bag fix to avoid using non portable sed syntax. The
test by itself didn't catch what it was supposed to, anyways.

The new test first checks if git-tag correctly errors out when
the user exited the editor without editing the file.  Then it
checks if what the user was presented in the editor was any
useful, which we define as the following:

 * It begins with a single blank line, where the invoked editor
   would typically place the editing curser at, so that the user
   can immediately start typing;

 * It has some instruction but that comes after that initial
   blank line, all lines prefixed with "#".  We specifically do
   not check for the wording of this instruction.

 * And it has nothing else, as the expected behaviour is "Hey
   you did not leave any message".

Signed-off-by: Mike Hommey <mh@glandium.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agoDocumentation: fix git-clone manpage not to refer to itself
Sergei Organov [Fri, 16 Nov 2007 18:43:16 +0000 (21:43 +0300)]
Documentation: fix git-clone manpage not to refer to itself

Signed-off-by: Sergei Organov <osv@javad.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agouser-manual.txt: minor clarification.
Sergei Organov [Fri, 16 Nov 2007 11:28:57 +0000 (14:28 +0300)]
user-manual.txt: minor clarification.

Signed-off-by: Sergei Organov <osv@javad.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agoFix rev-list when showing objects involving submodules
Linus Torvalds [Sun, 11 Nov 2007 23:35:23 +0000 (23:35 +0000)]
Fix rev-list when showing objects involving submodules

The function mark_tree_uninteresting() assumed that the tree entries
are blob when they are not trees.  This is not so.  Since we do
not traverse into submodules (yet), the gitlinks should be ignored.

In general, we should try to start moving away from using the
"S_ISLNK()" like things for internal git state. It was a mistake to
just assume the numbers all were same across all systems in the first
place.  This implementation converts to the "object_type", and then
uses a case statement.

Noticed by Ilari on IRC.
Test script taken from an earlier version by Dscho.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agoMerge branch 'maint'
Junio C Hamano [Sat, 17 Nov 2007 05:30:06 +0000 (21:30 -0800)]
Merge branch 'maint'

* maint:
  Update draft release notes for 1.5.3.6
  Fix per-directory exclude handing for "git add"
  core.excludesfile clean-up
  Fix t9101 test failure caused by Subversion "auto-props"
  git-send-email: add charset header if we add encoded 'From'

16 years agoUpdate draft release notes for 1.5.3.6
Junio C Hamano [Sat, 17 Nov 2007 02:44:06 +0000 (18:44 -0800)]
Update draft release notes for 1.5.3.6

Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agoMerge branch 'ds/maint-deflatebound' into maint
Junio C Hamano [Sat, 17 Nov 2007 05:14:17 +0000 (21:14 -0800)]
Merge branch 'ds/maint-deflatebound' into maint

* ds/maint-deflatebound:
  Improve accuracy of check for presence of deflateBound.

16 years agoFix per-directory exclude handing for "git add"
Junio C Hamano [Fri, 16 Nov 2007 09:15:41 +0000 (01:15 -0800)]
Fix per-directory exclude handing for "git add"

In "dir_struct", each exclusion element in the exclusion stack records a
base string (pointer to the beginning with length) so that we can tell
where it came from, but this pointer is just pointing at the parameter
that is given by the caller to the push_exclude_per_directory()
function.

While read_directory_recursive() runs, calls to excluded() makes use
the data in the exclusion elements, including this base string.  The
caller of read_directory_recursive() is not supposed to free the
buffer it gave to push_exclude_per_directory() earlier, until it
returns.

The test case Bruce Stephens gave in the mailing list discussion
was simplified and added to the t3700 test.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agocore.excludesfile clean-up
Junio C Hamano [Sat, 17 Nov 2007 01:05:02 +0000 (17:05 -0800)]
core.excludesfile clean-up

There are inconsistencies in the way commands currently handle
the core.excludesfile configuration variable.  The problem is
the variable is too new to be noticed by anything other than
git-add and git-status.

 * git-ls-files does not notice any of the "ignore" files by
   default, as it predates the standardized set of ignore files.
   The calling scripts established the convention to use
   .git/info/exclude, .gitignore, and later core.excludesfile.

 * git-add and git-status know about it because they call
   add_excludes_from_file() directly with their own notion of
   which standard set of ignore files to use.  This is just a
   stupid duplication of code that need to be updated every time
   the definition of the standard set of ignore files is
   changed.

 * git-read-tree takes --exclude-per-directory=<gitignore>,
   not because the flexibility was needed.  Again, this was
   because the option predates the standardization of the ignore
   files.

 * git-merge-recursive uses hardcoded per-directory .gitignore
   and nothing else.  git-clean (scripted version) does not
   honor core.* because its call to underlying ls-files does not
   know about it.  git-clean in C (parked in 'pu') doesn't either.

We probably could change git-ls-files to use the standard set
when no excludes are specified on the command line and ignore
processing was asked, or something like that, but that will be a
change in semantics and might break people's scripts in a subtle
way.  I am somewhat reluctant to make such a change.

On the other hand, I think it makes perfect sense to fix
git-read-tree, git-merge-recursive and git-clean to follow the
same rule as other commands.  I do not think of a valid use case
to give an exclude-per-directory that is nonstandard to
read-tree command, outside a "negative" test in the t1004 test
script.

This patch is the first step to untangle this mess.

The next step would be to teach read-tree, merge-recursive and
clean (in C) to use setup_standard_excludes().

Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agoFix t9101 test failure caused by Subversion "auto-props"
Wincent Colaiuta [Fri, 16 Nov 2007 13:25:10 +0000 (14:25 +0100)]
Fix t9101 test failure caused by Subversion "auto-props"

If a user has an "auto-prop" in his/her ~/.subversion/config file for
automatically setting the svn:keyword Id property on all ".c" files
(a reasonably common configuration in the Subversion world) then one
of the "svn propset" operations in the very first test would become a
no-op, which in turn would make the next commit a no-op.

This then caused the 25th test ('test propget') to fail because it
expects a certain number of commits to have taken place but the actual
number of commits was off by one.

Björn Steinbrink identified the "auto-prop" feature as the cause
of the failure. This patch avoids it by passing the "--no-auto-prop"
flag to "svn import" when setting up the test repository, thus ensuring
that the "svn propset" operation is no longer a no-op, regardless of the
users' settings in their config.

Signed-off-by: Wincent Colaiuta <win@wincent.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agogit-send-email: add charset header if we add encoded 'From'
Jeff King [Fri, 16 Nov 2007 10:49:09 +0000 (05:49 -0500)]
git-send-email: add charset header if we add encoded 'From'

We sometimes pick out the original rfc822 'From' header and
include it in the body of the message. If the original
author's name needs encoding, then we should specify that in
the content-type header.

If we already had a content-type header in the mail, then we
may need to re-encode. The logic is there to detect
this case, but it doesn't actually do the re-encoding.

Signed-off-by: Jeff King <peff@peff.net>
Acked-by: Uwe Kleine-König <Uwe.Kleine-Koenig@digi.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agogit-bisect: modernize branch shuffling hack
Junio C Hamano [Thu, 15 Nov 2007 08:47:53 +0000 (00:47 -0800)]
git-bisect: modernize branch shuffling hack

When switching to a new rev, we first made "new-bisect" branch to
point at the chosen commit, attempt to switch to it, and then
finally renamed the new-bisect branch to bisect by hand when
successful.  This is so that we can catch checkout failure (your
local modification may interfere with switching to the chosen
version) without losing information on which commit the next
attempt should be made.

Rewrite it using a more modern form but without breaking the
safety.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agogit-bisect: use update-ref to mark good/bad commits
Junio C Hamano [Thu, 15 Nov 2007 08:42:04 +0000 (00:42 -0800)]
git-bisect: use update-ref to mark good/bad commits

This removes the last instance of making a ref by hand with
"echo SHA1 >.git/refs/$refname" from the script and replaces it
with update-ref.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agogit-bisect: war on "sed"
Junio C Hamano [Thu, 15 Nov 2007 08:39:57 +0000 (00:39 -0800)]
git-bisect: war on "sed"

We do not need to pipe "echo" to "sed" only to strip refs/heads/
from the beginning.  We are assuming not-so-ancient shells these
days.

Also there is no need to avoid assuming \012 is the LF; we do
not run on EBCDIC, sorry.  Other parts of the script already
uses tr to convert separator to LF that way.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agoBisect reset: remove bisect refs that may have been packed.
Christian Couder [Thu, 15 Nov 2007 07:18:07 +0000 (08:18 +0100)]
Bisect reset: remove bisect refs that may have been packed.

If refs were ever packed in the middle of bisection, the bisect
refs were not removed from the "packed-refs" file.

This patch fixes this problem by using "git update-ref -d $ref $hash"
in "bisect_clean_state".

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agogit-p4: Fix direct import from perforce after fetching changes through git from origin
Simon Hausmann [Thu, 15 Nov 2007 09:38:45 +0000 (10:38 +0100)]
git-p4: Fix direct import from perforce after fetching changes through git from origin

When using an existing git repository to cache the perforce import we don't
fetch the branch mapping from perforce as that is a slow operation. However
the origin repository may not be fully up-to-date and therefore it may be
necessary to import more changes directly from Perforce.

Such a direct import needs self.knownBranches to be set up though, so
initialize it from the existing p4/* git branches.

Signed-off-by: Simon Hausmann <simon@lst.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agoFix per-directory exclude handing for "git add"
Junio C Hamano [Fri, 16 Nov 2007 09:15:41 +0000 (01:15 -0800)]
Fix per-directory exclude handing for "git add"

In "dir_struct", each exclusion element in the exclusion stack records a
base string (pointer to the beginning with length) so that we can tell
where it came from, but this pointer is just pointing at the parameter
that is given by the caller to the push_exclude_per_directory()
function.

While read_directory_recursive() runs, calls to excluded() makes use
the data in the exclusion elements, including this base string.  The
caller of read_directory_recursive() is not supposed to free the
buffer it gave to push_exclude_per_directory() earlier, until it
returns.

The test case Bruce Stephens gave in the mailing list discussion
was simplified and added to the t3700 test.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agoDocumentation: customize diff-options depending on particular command
Sergei Organov [Thu, 15 Nov 2007 13:19:29 +0000 (16:19 +0300)]
Documentation: customize diff-options depending on particular command

Customize diff-options depending on particular command as follows,
mostly to make git-diff and git-format-patch manuals less confusing:

* git-format-patch:

  - Mark --patch-with-stat as being the default.

  - Change -p description so that it matches what it actually does and
    so that it doesn't refer to absent "section on generating
    patches".

* git-diff: mark -p as being the default.

* git-diff-index/git-diff-files/git-diff-tree: mark --raw as being
  the default.

Signed-off-by: Sergei Organov <osv@javad.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agogit-ls-files: add --exclude-standard
Jeff King [Thu, 15 Nov 2007 07:04:30 +0000 (02:04 -0500)]
git-ls-files: add --exclude-standard

This provides a way for scripts to get at the new standard exclude
function.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agoRemove unreachable statements
Guido Ostkamp [Thu, 15 Nov 2007 22:19:11 +0000 (23:19 +0100)]
Remove unreachable statements

Solaris Workshop Compiler found a few unreachable statements.

Signed-off-by: Guido Ostkamp <git@ostkamp.fastmail.fm>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agorehabilitate some t5302 tests on 32-bit off_t machines
Nicolas Pitre [Thu, 15 Nov 2007 17:24:17 +0000 (12:24 -0500)]
rehabilitate some t5302 tests on 32-bit off_t machines

Commit 8ed2fca458d085f12c3c6808ef4ddab6aa40ef14 was a bit draconian in
skipping certain tests which should be perfectly valid even on platform
with a 32-bit off_t.

Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agorefs.c: Remove unused get_ref_sha1()
Johannes Sixt [Thu, 15 Nov 2007 16:33:44 +0000 (17:33 +0100)]
refs.c: Remove unused get_ref_sha1()

Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agoAllow ETC_GITCONFIG to be a relative path.
Johannes Sixt [Tue, 13 Nov 2007 20:05:06 +0000 (21:05 +0100)]
Allow ETC_GITCONFIG to be a relative path.

If ETC_GITCONFIG is not an absolute path, interpret it relative to
--exec-dir. This makes the installed binaries relocatable because the
prefix is not compiled-in.

Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agoIntroduce git_etc_gitconfig() that encapsulates access of ETC_GITCONFIG.
Johannes Sixt [Tue, 13 Nov 2007 20:05:05 +0000 (21:05 +0100)]
Introduce git_etc_gitconfig() that encapsulates access of ETC_GITCONFIG.

In a subsequent patch the path to the system-wide config file will be
computed. This is a preparation for that change. It turns all accesses
of ETC_GITCONFIG into function calls. There is no change in behavior.

As a consequence, config.c is the only file that needs the definition of
ETC_GITCONFIG. Hence, -DETC_GITCONFIG is removed from the CFLAGS and a
special build rule for config.c is introduced. As a side-effect, changing
the defintion of ETC_GITCONFIG (e.g. in config.mak) does not trigger a
complete rebuild anymore.

Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agoAllow a relative builtin template directory.
Johannes Sixt [Tue, 13 Nov 2007 20:05:04 +0000 (21:05 +0100)]
Allow a relative builtin template directory.

In order to make git relocatable (i.e. not have the prefix compiled-in)
the template directory must depend on the location where this git instance
is found, which is GIT_EXEC_DIR.

The exec path is prepended only if the compiled-in default template
directory is to be used and that is relative. Any relative directories
that are specified via environment variable or the --exec-dir switch are
taken as is.

Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agoClose files opened by lock_file() before unlinking.
Johannes Schindelin [Tue, 13 Nov 2007 20:05:03 +0000 (21:05 +0100)]
Close files opened by lock_file() before unlinking.

This is needed on Windows since open files cannot be unlinked.

Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agobuiltin run_command: do not exit with -1.
Johannes Sixt [Tue, 13 Nov 2007 20:05:02 +0000 (21:05 +0100)]
builtin run_command: do not exit with -1.

There are shells that do not correctly detect an exit code of -1 as a
failure. We simply truncate the status code to the lower 8 bits.

Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agoMove #include <sys/select.h> and <sys/ioctl.h> to git-compat-util.h.
Johannes Sixt [Tue, 13 Nov 2007 20:05:01 +0000 (21:05 +0100)]
Move #include <sys/select.h> and <sys/ioctl.h> to git-compat-util.h.

... since all system headers are pulled in via git-compat-util.h

Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agoUse is_absolute_path() in sha1_file.c.
Johannes Sixt [Tue, 13 Nov 2007 20:05:00 +0000 (21:05 +0100)]
Use is_absolute_path() in sha1_file.c.

There are some places that test for an absolute path. Use the helper
function to ease porting.

Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agoSkip t3902-quoted.sh if the file system does not support funny names.
Johannes Sixt [Tue, 13 Nov 2007 20:04:59 +0000 (21:04 +0100)]
Skip t3902-quoted.sh if the file system does not support funny names.

Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agot5302-pack-index: Skip tests of 64-bit offsets if necessary.
Johannes Sixt [Tue, 13 Nov 2007 20:04:58 +0000 (21:04 +0100)]
t5302-pack-index: Skip tests of 64-bit offsets if necessary.

There are platforms where off_t is not 64 bits wide. In this case many tests
are doomed to fail. Let's skip them.

Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agot7501-commit.sh: Not all seds understand option -i
Johannes Sixt [Tue, 13 Nov 2007 20:04:57 +0000 (21:04 +0100)]
t7501-commit.sh: Not all seds understand option -i

Use mv instead.

Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agot5300-pack-object.sh: Split the big verify-pack test into smaller parts.
Johannes Sixt [Tue, 13 Nov 2007 20:04:56 +0000 (21:04 +0100)]
t5300-pack-object.sh: Split the big verify-pack test into smaller parts.

This makes it easier to spot which of the tests failed.

Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agocore.excludesfile clean-up
Junio C Hamano [Wed, 14 Nov 2007 08:05:00 +0000 (00:05 -0800)]
core.excludesfile clean-up

There are inconsistencies in the way commands currently handle
the core.excludesfile configuration variable.  The problem is
the variable is too new to be noticed by anything other than
git-add and git-status.

 * git-ls-files does not notice any of the "ignore" files by
   default, as it predates the standardized set of ignore files.
   The calling scripts established the convention to use
   .git/info/exclude, .gitignore, and later core.excludesfile.

 * git-add and git-status know about it because they call
   add_excludes_from_file() directly with their own notion of
   which standard set of ignore files to use.  This is just a
   stupid duplication of code that need to be updated every time
   the definition of the standard set of ignore files is
   changed.

 * git-read-tree takes --exclude-per-directory=<gitignore>,
   not because the flexibility was needed.  Again, this was
   because the option predates the standardization of the ignore
   files.

 * git-merge-recursive uses hardcoded per-directory .gitignore
   and nothing else.  git-clean (scripted version) does not
   honor core.* because its call to underlying ls-files does not
   know about it.  git-clean in C (parked in 'pu') doesn't either.

We probably could change git-ls-files to use the standard set
when no excludes are specified on the command line and ignore
processing was asked, or something like that, but that will be a
change in semantics and might break people's scripts in a subtle
way.  I am somewhat reluctant to make such a change.

On the other hand, I think it makes perfect sense to fix
git-read-tree, git-merge-recursive and git-clean to follow the
same rule as other commands.  I do not think of a valid use case
to give an exclude-per-directory that is nonstandard to
read-tree command, outside a "negative" test in the t1004 test
script.

This patch is the first step to untangle this mess.

The next step would be to teach read-tree, merge-recursive and
clean (in C) to use setup_standard_excludes().

Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agoMerge branch 'sp/fetch-fix'
Junio C Hamano [Wed, 14 Nov 2007 22:26:04 +0000 (14:26 -0800)]
Merge branch 'sp/fetch-fix'

* sp/fetch-fix:
  git-fetch: avoid local fetching from alternate (again)
  rev-list: Introduce --quiet to avoid /dev/null redirects
  run-command: Support sending stderr to /dev/null
  git-fetch: Always fetch tags if the object they reference exists

16 years agoMerge branch 'bs/maint-commit-options'
Junio C Hamano [Wed, 14 Nov 2007 22:25:46 +0000 (14:25 -0800)]
Merge branch 'bs/maint-commit-options'

* bs/maint-commit-options:
  git-commit: Add tests for invalid usage of -a/--interactive with paths
  git-commit.sh: Fix usage checks regarding paths given when they do not make sense

16 years agoMerge branch 'rv/maint-index-commit'
Junio C Hamano [Wed, 14 Nov 2007 22:25:33 +0000 (14:25 -0800)]
Merge branch 'rv/maint-index-commit'

* rv/maint-index-commit:
  Make GIT_INDEX_FILE apply to git-commit

16 years agoMerge branch 'bs/maint-t7005'
Junio C Hamano [Wed, 14 Nov 2007 22:25:19 +0000 (14:25 -0800)]
Merge branch 'bs/maint-t7005'

* bs/maint-t7005:
  t7005-editor.sh: Don't invoke real vi when it is in GIT_EXEC_PATH

16 years agoMerge branch 'jc/maint-add-sync-stat'
Junio C Hamano [Wed, 14 Nov 2007 22:15:40 +0000 (14:15 -0800)]
Merge branch 'jc/maint-add-sync-stat'

* jc/maint-add-sync-stat:
  t2200: test more cases of "add -u"
  git-add: make the entry stat-clean after re-adding the same contents
  ce_match_stat, run_diff_files: use symbolic constants for readability

Conflicts:

builtin-add.c

16 years agoMerge branch 'mh/retag'
Junio C Hamano [Wed, 14 Nov 2007 22:06:09 +0000 (14:06 -0800)]
Merge branch 'mh/retag'

* mh/retag:
  Add tests for git tag
  Reuse previous annotation when overwriting a tag

16 years agoMerge branch 'jc/stash-create'
Junio C Hamano [Wed, 14 Nov 2007 22:05:47 +0000 (14:05 -0800)]
Merge branch 'jc/stash-create'

* jc/stash-create:
  git-stash: Fix listing stashes
  git-merge: no reason to use cpio anymore
  Revert "rebase: allow starting from a dirty tree."
  rebase: allow starting from a dirty tree.
  stash: implement "stash create"

16 years agoMerge branch 'bg/format-patch-N'
Junio C Hamano [Wed, 14 Nov 2007 22:04:25 +0000 (14:04 -0800)]
Merge branch 'bg/format-patch-N'

* bg/format-patch-N:
  Rearrange git-format-patch synopsis to improve clarity.
  format-patch: Test --[no-]numbered and format.numbered
  format-patch: Add configuration and off switch for --numbered

16 years agoMerge branch 'np/progress'
Junio C Hamano [Wed, 14 Nov 2007 22:04:19 +0000 (14:04 -0800)]
Merge branch 'np/progress'

* np/progress:
  nicer display of thin pack completion
  make display of total transferred fully accurate
  remove dead code from the csum-file interface
  git-fetch: be even quieter.
  make display of total transferred more accurate
  sideband.c: ESC is spelled '\033' not '\e' for portability.
  fix display overlap between remote and local progress

16 years agoMerge branch 'js/rebase-detached'
Junio C Hamano [Wed, 14 Nov 2007 22:04:06 +0000 (14:04 -0800)]
Merge branch 'js/rebase-detached'

* js/rebase-detached:
  rebase: fix "rebase --continue" breakage
  rebase: operate on a detached HEAD

16 years agoMerge branch 'rs/pretty'
Junio C Hamano [Wed, 14 Nov 2007 22:03:50 +0000 (14:03 -0800)]
Merge branch 'rs/pretty'

* rs/pretty:
  Fix preprocessor logic that determines the availablity of strchrnul().
  Simplify strchrnul() compat code
  --format=pretty: avoid calculating expensive expansions twice
  add strbuf_adddup()
  --pretty=format: parse commit message only once
  --pretty=format: on-demand format expansion
  Add strchrnul()

16 years agoMerge branch 'rr/cvsexportcommit-w'
Junio C Hamano [Wed, 14 Nov 2007 22:03:40 +0000 (14:03 -0800)]
Merge branch 'rr/cvsexportcommit-w'

* rr/cvsexportcommit-w:
  cvsexportcommit: Add switch to specify CVS workdir

16 years agoMerge branch 'gh/cvsimport-user'
Junio C Hamano [Wed, 14 Nov 2007 22:03:27 +0000 (14:03 -0800)]
Merge branch 'gh/cvsimport-user'

* gh/cvsimport-user:
  git-cvsimport: fix handling of user name when it is not set in CVSROOT

16 years agouser-manual: minor rewording for clarity.
Sergei Organov [Wed, 14 Nov 2007 20:08:15 +0000 (12:08 -0800)]
user-manual: minor rewording for clarity.

Junio screwed up when applying the previous round of the patch;
rewording from "previous" to "old" does make the description
clearer.

Also revert the rewording from head to branch.  The description
is talking about the branch's tip commit and using the word head
is clearer.

Based on input from Sergei and Bruce.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agoFix parent rewriting in --early-output
Linus Torvalds [Tue, 13 Nov 2007 07:16:08 +0000 (23:16 -0800)]
Fix parent rewriting in --early-output

We cannot tell a node that has been checked and found not to be
interesting (which does not have the TREECHANGE flag) from a
node that hasn't been checked if it is interesting or not,
without relying on something else, such as object->parsed.

But an object can get the "parsed" flag for other reasons.
Which means that "TREECHANGE" has the wrong polarity.

This changes the way how the path pruning logic marks an
uninteresting commits.  From now on, we consider a commit
interesting by default, and explicitly mark the ones we decided
to prune.  The flag is renamed to "TREESAME".

Then, this fixes the logic to show the early output with
incomplete pruning.  It basically says "a commit that has
TREESAME set is kind-of-UNINTERESTING", but obviously in a
different way than an outright UNINTERESTING commit.  Until we
parse and examine enough parents to determine if a commit
becomes surely "kind-of-UNINTERESTING", we avoid rewriting
the ancestry so that later rounds can fix things up.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agoFix rev-list when showing objects involving submodules
Linus Torvalds [Sun, 11 Nov 2007 23:35:23 +0000 (23:35 +0000)]
Fix rev-list when showing objects involving submodules

The function mark_tree_uninteresting() assumed that the tree entries
are blob when they are not trees.  This is not so.  Since we do
not traverse into submodules (yet), the gitlinks should be ignored.

In general, we should try to start moving away from using the
"S_ISLNK()" like things for internal git state. It was a mistake to
just assume the numbers all were same across all systems in the first
place.  This implementation converts to the "object_type", and then
uses a case statement.

Noticed by Ilari on IRC.
Test script taken from an earlier version by Dscho.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agoMerge branch 'maint'
Junio C Hamano [Wed, 14 Nov 2007 11:37:18 +0000 (03:37 -0800)]
Merge branch 'maint'

* maint:
  git-clean: honor core.excludesfile
  Documentation: Fix man page breakage with DocBook XSL v1.72
  git-remote.txt: fix typo
  core-tutorial.txt: Fix argument mistake in an example.
  replace reference to git-rm with git-reset in git-commit doc
  Grammar fixes for gitattributes documentation
  Don't allow fast-import tree delta chains to exceed maximum depth
  revert/cherry-pick: allow starting from dirty work tree.
  t/t3404: fix test for a bogus todo file.

Conflicts:

fast-import.c

16 years agoMerge branch 'aw/mirror-push' into jk/send-pack
Junio C Hamano [Wed, 14 Nov 2007 11:13:30 +0000 (03:13 -0800)]
Merge branch 'aw/mirror-push' into jk/send-pack

* aw/mirror-push:
  git-push: add documentation for the newly added --mirror mode
  Add tests for git push'es mirror mode
  git-push: plumb in --mirror mode
  Teach send-pack a mirror mode
  send-pack: segfault fix on forced push
  send-pack: require --verbose to show update of tracking refs
  receive-pack: don't mention successful updates
  more terse push output

Conflicts:

transport.c
transport.h

16 years agoMerge branch 'ar/send-pack-remote-track' into jk/send-pack
Junio C Hamano [Wed, 14 Nov 2007 11:11:37 +0000 (03:11 -0800)]
Merge branch 'ar/send-pack-remote-track' into jk/send-pack

* ar/send-pack-remote-track:
  Update the tracking references only if they were succesfully updated on remote
  Add a test checking if send-pack updated local tracking branches correctly