]> asedeno.scripts.mit.edu Git - git.git/log
git.git
16 years agogit-rebase--interactive: auto amend only edited commit
Dmitry Potapov [Tue, 9 Sep 2008 12:05:26 +0000 (16:05 +0400)]
git-rebase--interactive: auto amend only edited commit

"git rebase --continue" issued after git rebase being stop by "edit"
command is trying to amend the last commit using stage changes. However,
if the last commit is not the commit that was marked as "edit" then it
can produce unexpected results.

For instance, after being stop by "edit", I have made some changes to
commit message using "git commit --amend". After that I realized that
I forgot to add some changes to some file. So, I said "git add file"
and the "git rebase --continue". Unfortunately, it caused that the new
commit message was lost.

Another problem is that after being stopped at "edit", the user adds new
commits. In this case, automatic amend behavior of git rebase triggered
by some stage changes causes that not only that the log message of the
last commit is lost but that it will contain also wrong Author and Date
information.

Therefore, this patch restrict automatic amend only to the situation
where HEAD is the commit at which git rebase stop by "edit" command.

Signed-off-by: Dmitry Potapov <dpotapov@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agoStart conforming code to "git subcmd" style part 2
Heikki Orsila [Tue, 9 Sep 2008 10:28:30 +0000 (13:28 +0300)]
Start conforming code to "git subcmd" style part 2

User notifications are presented as 'git cmd', and code comments
are presented as '"cmd"' or 'git's cmd', rather than 'git-cmd'.

Signed-off-by: Heikki Orsila <heikki.orsila@iki.fi>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agogit-rebase-interactive: do not squash commits on abort
Dmitry Potapov [Mon, 8 Sep 2008 20:42:48 +0000 (00:42 +0400)]
git-rebase-interactive: do not squash commits on abort

If git rebase interactive is stopped by "edit" command and then the user
said "git rebase --continue" while having some stage changes, git rebase
interactive is trying to amend the last commit by doing:
  git --soft reset && git commit

However, the user can abort commit for some reason by providing an empty
log message, and that would leave the last commit undone, while the user
being completely unaware about what happened. Now if the user tries to
continue, by issuing "git rebase --continue" that squashes two previous
commits.

Signed-off-by: Dmitry Potapov <dpotapov@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agorefs: improve comments about "reading" argument of "resolve_ref"
Christian Couder [Tue, 9 Sep 2008 05:10:56 +0000 (07:10 +0200)]
refs: improve comments about "reading" argument of "resolve_ref"

The existing in-code comment was misleading.  An access that is not
"reading" may often be "writing", but it does not have to be.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agot6023-merge-file: Work around non-portable sed usage
Arjen Laarhoven [Mon, 8 Sep 2008 18:29:18 +0000 (20:29 +0200)]
t6023-merge-file: Work around non-portable sed usage

OS X sed doesn't understand '\n' on the right side of a substitution.
Use a valid substitution character instead and use 'tr' to convert
those to a newline.

Signed-off-by: Arjen Laarhoven <arjen@yaph.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agoCorrect output of git-count-objects.
Mikael Magnusson [Mon, 8 Sep 2008 17:56:32 +0000 (19:56 +0200)]
Correct output of git-count-objects.

The non-verbose output was not changed in fdb2a2a (compat: introduce
on_disk_bytes(), 2008-08-18) which caused git-count-objects to claim 512
times too much space used for loose objects.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agoWindows: git-shell can be compiled again
Johannes Sixt [Mon, 8 Sep 2008 10:46:55 +0000 (12:46 +0200)]
Windows: git-shell can be compiled again

The reason that git-shell was excluded from the Windows build was that
our compatibility layer needed stuff that was removed when we tried to
link less of the git library into git-shell. Since 4cfc24a (shell: do
not play duplicated definition games to shrink the executable,
2008-08-19) the complete library is linked again, so we can build
git-shell on Windows as well. (This fixes 'make install', which depends
on that git-shell is always built.)

Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agot/t91XX git-svn tests: run "git svn" not "git-svn"
Nanako Shiraishi [Mon, 8 Sep 2008 10:02:08 +0000 (19:02 +0900)]
t/t91XX git-svn tests: run "git svn" not "git-svn"

This replaces 'git-svn' with 'git svn' in the tests.

Signed-off-by: Nanako Shiraishi <nanako3@lavabit.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agot/t91XX-svn: start removing use of "git-" from these tests
Nanako Shiraishi [Mon, 8 Sep 2008 10:02:05 +0000 (19:02 +0900)]
t/t91XX-svn: start removing use of "git-" from these tests

Subversion tests use too many "git-foo" form, so I am converting them
in two steps.

This first step replaces literal strings "remotes/git-svn" and "git-svn-id"
by introducing $remotes_git_svn and $git_svn_id constants defined as shell
variables.  This will reduce the number of false hits from "git grep".

Signed-off-by: Nanako Shiraishi <nanako3@lavabit.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agoMerge git://git.bogomips.org/git-svn
Junio C Hamano [Mon, 8 Sep 2008 21:15:17 +0000 (14:15 -0700)]
Merge git://git.bogomips.org/git-svn

* git://git.bogomips.org/git-svn:
  git-svn: fix handling of even funkier branch names

16 years agoMerge branch 'ar/autospell'
Junio C Hamano [Mon, 8 Sep 2008 06:52:16 +0000 (23:52 -0700)]
Merge branch 'ar/autospell'

* ar/autospell:
  Add help.autocorrect to enable/disable autocorrecting
  git wrapper: DWIM mistyped commands

16 years agoMerge branch 'jc/cc-ld-dynpath'
Junio C Hamano [Mon, 8 Sep 2008 06:45:56 +0000 (23:45 -0700)]
Merge branch 'jc/cc-ld-dynpath'

* jc/cc-ld-dynpath:
  configure: auto detect dynamic library path switches
  Makefile: Allow CC_LD_DYNPATH to be overriden

Conflicts:
Makefile
config.mak.in

16 years agoMerge branch 'jc/hide-cr-in-diff-from-less'
Junio C Hamano [Mon, 8 Sep 2008 06:45:40 +0000 (23:45 -0700)]
Merge branch 'jc/hide-cr-in-diff-from-less'

* jc/hide-cr-in-diff-from-less:
  diff: Help "less" hide ^M from the output

16 years agoMerge branch 'jc/maint-checkout-fix'
Junio C Hamano [Mon, 8 Sep 2008 05:44:45 +0000 (22:44 -0700)]
Merge branch 'jc/maint-checkout-fix'

* jc/maint-checkout-fix:
  checkout: do not check out unmerged higher stages randomly

Conflicts:
t/t7201-co.sh

16 years agowt-status: Teach how to discard changes in the working directory
Anders Melchiorsen [Sun, 7 Sep 2008 22:05:03 +0000 (00:05 +0200)]
wt-status: Teach how to discard changes in the working directory

This is a question that comes up a lot in #git.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agowt-status: Split header generation into three functions
Anders Melchiorsen [Sun, 7 Sep 2008 22:05:02 +0000 (00:05 +0200)]
wt-status: Split header generation into three functions

Reorganize header generation so that all header text related to each
block is in one place.

This adds a function, but makes it easier to see what is generated in
each case. It also allows for easy tweaking of individual headers.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agoTeach "git diff -p" to locate PHP class methods
Andreas Ericsson [Sun, 7 Sep 2008 20:15:29 +0000 (22:15 +0200)]
Teach "git diff -p" to locate PHP class methods

Otherwise it will always print the class-name rather
than the name of the function inside that class.

While we're at it, reorder the gitattributes manpage to
list the built-in funcname pattern names in alphabetical
order.

Signed-off-by: Andreas Ericsson <ae@op5.se>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agoDon't verify host name in SSL certs when GIT_SSL_NO_VERIFY is set
Junio C Hamano [Thu, 21 Feb 2008 23:10:37 +0000 (15:10 -0800)]
Don't verify host name in SSL certs when GIT_SSL_NO_VERIFY is set

Originally from Mike Hommey; earlier we were disabling SSL_VERIFYPEER
but SSL_VERIFYHOST was in effect even when the user asked not to with
the environment variable.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agogit-svn: fix handling of even funkier branch names
Eric Wong [Sun, 7 Sep 2008 03:18:18 +0000 (20:18 -0700)]
git-svn: fix handling of even funkier branch names

Apparently do_switch() tolerates the lack of escaping in less
funky branch names.  For the really strange and scary ones, we
need to escape them properly.  It strangely maintains compatible
with the existing handling of branch names with spaces and
exclamation marks.

Reported-by: m.skoric@web.de ($gmane/94677)
Signed-off-by: Eric Wong <normalperson@yhbt.net>
16 years agodaemon.c: avoid setlinebuf()
Junio C Hamano [Thu, 4 Sep 2008 03:33:29 +0000 (20:33 -0700)]
daemon.c: avoid setlinebuf()

This function is outside POSIX (Linux and recent BSD have it).  Replace it
with setvbuf() which is POSIX.

I am not sure about the value this patch passes as size argument to
setvbuf(), though.  I know the call this patch makes is equivalent to
calling setlinebuf() with GNU libc, but POSIX itself leaves what happens
to the size argument quite vague, saying only "otherwise [i.e. when buf is
a null pointer], size _may_ determine the size of a buffer allocated by
the setvbuf() function."  If passing size=0 causes stdio to allocate very
small buffer, and while stdio tries to line buffer the output, it might
make it to fail to buffer an entire line, causing early flushing of the
stream.

Even if that turns out to be a problem on minorority platforms, we won't
know it until the issue actually hurts them, so let's push this change out
and see what happens.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agobuiltin-merge: release the lockfile in try_merge_strategy()
Miklos Vajna [Sat, 6 Sep 2008 16:29:49 +0000 (18:29 +0200)]
builtin-merge: release the lockfile in try_merge_strategy()

Once we committed the locked index, we should release the lockfile. In
most cases this is done automatically when the process ends, but this is
not true in this case.

[jc: with additional tests from Eric Raible]

Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agoUpdate draft release notes for 1.6.1
Junio C Hamano [Sun, 7 Sep 2008 01:22:00 +0000 (18:22 -0700)]
Update draft release notes for 1.6.1

Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agoMerge git://git.bogomips.org/git-svn
Junio C Hamano [Sun, 7 Sep 2008 02:39:13 +0000 (19:39 -0700)]
Merge git://git.bogomips.org/git-svn

* git://git.bogomips.org/git-svn:
  git-svn: set auto_props when renaming files
  t9124: clean up chdir usage
  git-svn: fix 'info' tests for unknown items
  git-svn: match SVN 1.5 behaviour of info' on unknown item
  git svn info: always quote URLs in 'info' output
  git svn info: make info relative to the current directory
  git svn info: tests: fix ptouch argument order in setup
  git svn info: tests: use test_cmp instead of git-diff
  git svn info: tests: do not use set -e
  git svn info: tests: let 'init' test run with SVN 1.5
  git svn: catch lack of upstream info for dcommit earlier
  git-svn: check error code of send_txstream
  git-svn: Send deltas during commits
  git-svn: Introduce SVN::Git::Editor::_chg_file_get_blob
  git-svn: extract base blob in generate_diff

16 years agodiff --quiet: make it synonym to --exit-code >/dev/null
Junio C Hamano [Tue, 2 Sep 2008 06:20:26 +0000 (23:20 -0700)]
diff --quiet: make it synonym to --exit-code >/dev/null

The point of --quiet was to return the status as early as possible without
doing any extra processing.  Well behaved scripts, when they expect to run
many diff operations inside, are supposed to run "update-index --refresh"
upfront; we do not want them to pay the price of iterating over the index
and comparing the contents to fix the stat dirtiness, and we avoided most
of the processing in diffcore_std() when --quiet is in effect.

But scripts that adhere to the good practice won't have to pay any more
price than the necessary lstat(2) that will report stat cleanliness, as
long as only -q is given without any fancier diff options.

More importantly, users who do ask for "--quiet -M --filter=D" (in order
to notice only the deletion, not paths that disappeared only because they
have been renamed away) deserve to get the result they asked for, even it
means they have to pay the extra price; the alternative is to get a cheap
early return that gives a result they did not ask for, which is much
worse.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agodiff Porcelain: do not disable auto index refreshing on -C -C
Junio C Hamano [Sun, 7 Sep 2008 02:09:16 +0000 (19:09 -0700)]
diff Porcelain: do not disable auto index refreshing on -C -C

When we enabled the automatic refreshing of the index to "diff" Porcelain,
we disabled it when --find-copies-harder was asked, but there is no good
reason to do so.  In the following command sequence, the first "diff"
shows an "empty" diff exposing stat dirtyness, while the second one does
not.

    $ >foo
    $ git add foo
    $ touch foo
    $ git diff -C -C
    $ git diff -C

This fixes the inconsistency.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agogit-svn: set auto_props when renaming files
Paul Talacko [Sun, 7 Sep 2008 01:50:38 +0000 (18:50 -0700)]
git-svn: set auto_props when renaming files

Patch-by: Paul Talacko <gnuruandstuff@yahoo.co.uk>:
<http://article.gmane.org/gmane.comp.version-control.git/95006>
> Hello,
>
> There's an issue in git-svn as autoprops are not applied to
> renamed files, only to added files.
>
> This patch fixes the bug.

[ew: added test case]
Signed-off-by: Eric Wong <normalperson@yhbt.net>
16 years agogit-apply:--include=pathspec
Junio C Hamano [Mon, 25 Aug 2008 08:05:31 +0000 (01:05 -0700)]
git-apply:--include=pathspec

This allows --include=pathspec, similar to --exclude=pathspec.

The rule when one or both of these are used is that the include/exclude
patterns are examined in the order they are given on the command line, and
the first match determines if a patch to each path is used or not.  Hence:

    $ git apply --include='specific.h' --exclude='*.h' <diff

would apply the patch to specific.h header file, but all other patches in
the input file to other header files are ignored.  A patch to a path that
does not match any include/exclude pattern is used by default if there is
no include pattern on the command line, and ignored if there is any
include pattern.

This originally came from Joe Perches, but both the design of the
semantics and the implementation have been redone complately.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agot9124: clean up chdir usage
Eric Wong [Sun, 7 Sep 2008 01:29:12 +0000 (18:29 -0700)]
t9124: clean up chdir usage

Spawn subshells when running things in subdirectories instead of
chdir-ing to the path of an undefined variable, which is
confusing.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
16 years agoMerge updated git-gui and gitk that call each other
Junio C Hamano [Sun, 7 Sep 2008 01:06:39 +0000 (18:06 -0700)]
Merge updated git-gui and gitk that call each other

Merge git://repo.or.cz/git-gui and git://git.kernel.org/pub/scm/gitk/gitk

    * git://repo.or.cz/git-gui:
      git-gui: Show special diffs for complex conflict cases.
      git-gui: Make F5 reselect a diff, if an untracked file is selected.
      git-gui: Reimplement and enhance auto-selection of diffs.
      git-gui: Support conflict states _U & UT.
      git-gui: Support more merge tools.
      git-gui: Don't allow staging files with conflicts.
      git-gui: Support calling merge tools.
      git-gui: Support resolving conflicts via the diff context menu.
      git-gui: Mark forgotten strings for translation.
      git-gui: Allow specifying an initial line for git gui blame.
      git-gui: Better positioning in Blame Parent Commit
      git-gui: Support passing blame to a parent commit.
      git-gui: Support starting gitk from Gui Blame
      git-gui: Teach git gui about file type changes

    * git://git.kernel.org/pub/scm/gitk/gitk:
      gitk: Add menu item for calling git gui blame
      gitk: Add option to specify the default commit on command line

16 years agoMerge branch 'maint'
Junio C Hamano [Sat, 6 Sep 2008 23:47:32 +0000 (16:47 -0700)]
Merge branch 'maint'

* maint:
  Update draft release notes for 1.6.0.2
  stash: refresh the index before deciding if the work tree is dirty
  Mention the fact that 'git annotate' is only for backward compatibility.
  "blame -c" should be compatible with "annotate"
  git-gui: Fix diff parsing for lines starting with "--" or "++"
  git-gui: Fix string escaping in po2msg.sh
  git gui: show diffs with a minimum of 1 context line
  git-gui: update all remaining translations to French.
  git-gui: Update french translation

16 years agoUpdate draft release notes for 1.6.0.2
Junio C Hamano [Sat, 6 Sep 2008 23:18:31 +0000 (16:18 -0700)]
Update draft release notes for 1.6.0.2

Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agostash: refresh the index before deciding if the work tree is dirty
Junio C Hamano [Thu, 4 Sep 2008 09:41:22 +0000 (02:41 -0700)]
stash: refresh the index before deciding if the work tree is dirty

Unlike the case where the user does have a real change in the work tree,
refusing to work because of unclean stat information is not very helpful.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
Acked-by: Nanako Shiraishi <nanako3@lavabit.com>
16 years agoMerge branch 'maint' of git://repo.or.cz/git-gui into maint
Junio C Hamano [Sat, 6 Sep 2008 23:03:22 +0000 (16:03 -0700)]
Merge branch 'maint' of git://repo.or.cz/git-gui into maint

* 'maint' of git://repo.or.cz/git-gui:
  git-gui: Fix diff parsing for lines starting with "--" or "++"
  git-gui: Fix string escaping in po2msg.sh
  git gui: show diffs with a minimum of 1 context line
  git-gui: update all remaining translations to French.
  git-gui: Update french translation

16 years agofor-each-ref: `:short` format for `refname`
Bert Wesarg [Fri, 5 Sep 2008 21:16:23 +0000 (23:16 +0200)]
for-each-ref: `:short` format for `refname`

Tries to shorten the refname to a non-ambiguous name.

Szeder Gábor noticed that the git bash completion takes a
tremendous amount of time to strip leading components from
heads and tags refs (i.e. refs/heads, refs/tags, ...). He
proposed a new atom called 'refbasename' which removes at
most two leading components from the ref name.

I myself, proposed a more dynamic solution, which strips off
common leading components with the matched pattern.

But the current bash solution and both proposals suffer from
one mayor problem: ambiguous refs.

A ref is ambiguous, if it resolves to more than one full refs.
I.e. given the refs refs/heads/xyzzy and refs/tags/xyzzy. The
(short) ref xyzzy can point to both refs.

( Note: Its irrelevant whether the referenced objects are the
  same or not. )

This proposal solves this by checking for ambiguity of the
shorten ref name.

The shortening is done with the same rules for resolving refs
but in the reverse order. The short name is checked if it
resolves to a different ref.

To continue the above example, the output would be like this:

heads/xyzzy
xyzzy

So, if you want just tags, xyzzy is not ambiguous, because it
will resolve to a tag. If you need the heads you get a also
a non-ambiguous short form of the ref.

To integrate this new format into the bash completion to get
only non-ambiguous refs is beyond the scope of this patch.

Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agobisect: remove "checkout_done" variable used when checking merge bases
Christian Couder [Sat, 6 Sep 2008 05:27:03 +0000 (07:27 +0200)]
bisect: remove "checkout_done" variable used when checking merge bases

Using return values from the following functions:

- check_merge_bases
- check_good_are_ancestors_of_bad

seems simpler.

While at it, let's add some comments to better document the above
functions.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agogit-svn: fix 'info' tests for unknown items
Thomas Rast [Fri, 29 Aug 2008 13:42:49 +0000 (15:42 +0200)]
git-svn: fix 'info' tests for unknown items

The previous tests all expected the results from SVN and Git to be
identical, and expected both to return success.  This cannot be
guaranteed: SVN changed the message style between 1.4 and 1.5, and
in 1.5, sets a failure exit code.

Change the tests to verify that 'git svn info <item>' sets a failure
exit code, and that its output contains the file name.  This should
hopefully catch all other errors.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Acked-by: Eric Wong <normalperson@yhbt.net>
16 years agogit-svn: match SVN 1.5 behaviour of info' on unknown item
Thomas Rast [Fri, 29 Aug 2008 13:42:48 +0000 (15:42 +0200)]
git-svn: match SVN 1.5 behaviour of info' on unknown item

Previously 'git svn info unknown-file' only announced its failure (in
the SVN 1.4 style, "not a versioned resource"), and exited
successfully.

It is desirable to actually exit with failure, so change the code to
exit(1) under this condition.  Since that is already halfway SVN 1.5
compatibility, also change the error output to match 1.5.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Acked-by: Eric Wong <normalperson@yhbt.net>
16 years agogit svn info: always quote URLs in 'info' output
Thomas Rast [Tue, 26 Aug 2008 19:32:37 +0000 (21:32 +0200)]
git svn info: always quote URLs in 'info' output

Changes 'git svn info' to always URL-escape the 'URL' and 'Repository'
fields and --url output, like SVN (at least 1.5) does.

Note that reusing the escape_url() further down in Git::SVN::Ra is not
possible because it only triggers for http(s) URLs.  I did not know
whether extending it to all schemes would break SVN access anywhere,
so I made a new one that quotes in all schemes.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Acked-by: Eric Wong <normalperson@yhbt.net>
16 years agogit svn info: make info relative to the current directory
Thomas Rast [Tue, 26 Aug 2008 19:32:36 +0000 (21:32 +0200)]
git svn info: make info relative to the current directory

Previously 'git svn info <path>' would always treat the <path> as
relative to the working directory root, with a default of ".".  This
does not match the behaviour of 'svn info'.  Prepend $(git rev-parse
--show-prefix) to the path used inside cmd_info to make it relative to
the current working directory.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Acked-by: Eric Wong <normalperson@yhbt.net>
16 years agogit svn info: tests: fix ptouch argument order in setup
Thomas Rast [Tue, 26 Aug 2008 19:32:35 +0000 (21:32 +0200)]
git svn info: tests: fix ptouch argument order in setup

The arguments must be <gitwc-path> <svnwc-path>, otherwise it fails to
update the timestamps (without setting a failure exit code) and
results in bad test output later on.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Acked-by: Eric Wong <normalperson@yhbt.net>
16 years agogit svn info: tests: use test_cmp instead of git-diff
Thomas Rast [Tue, 26 Aug 2008 19:32:34 +0000 (21:32 +0200)]
git svn info: tests: use test_cmp instead of git-diff

git-diff does not appear to return the correct exit values, and gives
a false success for more than half (!) of the tests due to the space
in "trash directory" which git-svn fails to encode.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Acked-by: Eric Wong <normalperson@yhbt.net>
16 years agogit svn info: tests: do not use set -e
Thomas Rast [Tue, 26 Aug 2008 19:32:33 +0000 (21:32 +0200)]
git svn info: tests: do not use set -e

Exiting in the middle of a test confuses the test suite, which will
just say "FATAL: Unexpected exit with code 1" in response to a failed
test, instead of actually diagnosing failure and continuing with the
next test.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Acked-by: Eric Wong <normalperson@yhbt.net>
16 years agogit svn info: tests: let 'init' test run with SVN 1.5
Thomas Rast [Tue, 26 Aug 2008 19:32:32 +0000 (21:32 +0200)]
git svn info: tests: let 'init' test run with SVN 1.5

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Acked-by: Eric Wong <normalperson@yhbt.net>
16 years agogit svn: catch lack of upstream info for dcommit earlier
Thomas Rast [Sun, 31 Aug 2008 13:50:59 +0000 (15:50 +0200)]
git svn: catch lack of upstream info for dcommit earlier

Since 711521e 'git svn dcommit' attempts to use the upstream
information to determine the SVN URL, before it verifies that it even
found an upstream.  Move up the corresponding check.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Acked-by: Eric Wong <normalperson@yhbt.net>
16 years agogit-svn: check error code of send_txstream
Eric Wong [Mon, 1 Sep 2008 02:45:07 +0000 (19:45 -0700)]
git-svn: check error code of send_txstream

Not checking the error code of a function used to transform and
send data makes me nervous.  It currently returns "undef" on
success; so die if we get any result other than "undef" because
it's likely something went wrong somewhere.  I really wish this
function returned an MD5 like send_stream (or better yet, SHA1)
for verification.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
16 years agogit-svn: Send deltas during commits
Florian Weimer [Sun, 31 Aug 2008 15:47:09 +0000 (17:47 +0200)]
git-svn: Send deltas during commits

Signed-off-by: Florian Weimer <fw@deneb.enyo.de>
Acked-by: Eric Wong <normalperson@yhbt.net>
16 years agogit-svn: Introduce SVN::Git::Editor::_chg_file_get_blob
Florian Weimer [Sun, 31 Aug 2008 15:45:04 +0000 (17:45 +0200)]
git-svn: Introduce SVN::Git::Editor::_chg_file_get_blob

Signed-off-by: Florian Weimer <fw@deneb.enyo.de>
Acked-by: Eric Wong <normalperson@yhbt.net>
16 years agogit-svn: extract base blob in generate_diff
Florian Weimer [Sun, 31 Aug 2008 15:05:09 +0000 (17:05 +0200)]
git-svn: extract base blob in generate_diff

We need the base blob to compute a delta to be sent to the server.

Signed-off-by: Florian Weimer <fw@deneb.enyo.de>
Acked-by: Eric Wong <normalperson@yhbt.net>
16 years agodiff --dirstat-by-file: count changed files, not lines
Heikki Orsila [Fri, 5 Sep 2008 19:27:35 +0000 (22:27 +0300)]
diff --dirstat-by-file: count changed files, not lines

This new option --dirstat-by-file is the same as --dirstat, but it
counts "impacted files" instead of "impacted lines" (lines that are
added or removed).

Signed-off-by: Heikki Orsila <heikki.orsila@iki.fi>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agomerge-recursive: get rid of virtual_id
Miklos Vajna [Fri, 5 Sep 2008 17:26:42 +0000 (19:26 +0200)]
merge-recursive: get rid of virtual_id

We now just leave the object->sha1 field of virtual commits 0{40} as it
is initialized, as a unique hash is not necessary in case of virtual
commits.

Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agoMention the fact that 'git annotate' is only for backward compatibility.
Junio C Hamano [Fri, 5 Sep 2008 07:29:51 +0000 (00:29 -0700)]
Mention the fact that 'git annotate' is only for backward compatibility.

When somebody is reading git-blame.txt (or git-annotate.txt) for the first
time, the message we would like to send is:

 (1) Here is why you would want to use this command, what it can do
     (perhaps more than what you would have expected from "$scm blame"),
     and how you tell it to do what it does.

     This is obvious.

 (2) You might have heard of the command with the other name.  There is no
     difference between the two, except they differ in their default
     output formats.

     This is essential to answer: "git has both?  how are they different?"

 (3) We tend to encourage blame over annotate for new scripts and new
     people, but there is no reason to choose one over the other.

     This is not as important as (2), but would be useful to avoid
     repeated questions about "when will we start deprecating this?"

As long as we describe (2) on git-annotate page clearly enough, people who
read git-blame page first and get curious can refer to git-annotate page.
While at it, subtly hint (3) without being overly explicit.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years ago"blame -c" should be compatible with "annotate"
Junio C Hamano [Fri, 5 Sep 2008 07:57:35 +0000 (00:57 -0700)]
"blame -c" should be compatible with "annotate"

There is no reason to have a separate variable cmd_is_annotate;
OUTPUT_ANNOTATE_COMPAT option is supposed to produce the compatibility
output, and we should produce the same output even when the command was
not invoked as "annotate" but as "blame -c".

Noticed by Pasky.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agomerge-recursive: move current_{file,directory}_set to struct merge_options
Miklos Vajna [Wed, 3 Sep 2008 17:08:56 +0000 (19:08 +0200)]
merge-recursive: move current_{file,directory}_set to struct merge_options

Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
16 years agomerge-recursive: move the global obuf to struct merge_options
Miklos Vajna [Wed, 3 Sep 2008 00:30:03 +0000 (02:30 +0200)]
merge-recursive: move the global obuf to struct merge_options

Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
16 years agomerge-recursive: get rid of the index_only global variable
Miklos Vajna [Tue, 2 Sep 2008 21:53:47 +0000 (23:53 +0200)]
merge-recursive: get rid of the index_only global variable

struct merge_options already has a call_depth member, and index_only
global variable always equals to !!call_depth.

We always use index_only as a condition, so we can just
use call_depth instead of index_only.

Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
16 years agoMerge branch 'jc/maint-log-grep'
Junio C Hamano [Fri, 5 Sep 2008 05:30:44 +0000 (22:30 -0700)]
Merge branch 'jc/maint-log-grep'

* jc/maint-log-grep:
  log --author/--committer: really match only with name part
  diff --cumulative is a sub-option of --dirstat
  bash completion: Hide more plumbing commands

16 years agolog --author/--committer: really match only with name part
Junio C Hamano [Fri, 5 Sep 2008 05:15:02 +0000 (22:15 -0700)]
log --author/--committer: really match only with name part

When we tried to find commits done by AUTHOR, the first implementation
tried to pattern match a line with "^author .*AUTHOR", which later was
enhanced to strip leading caret and look for "^author AUTHOR" when the
search pattern was anchored at the left end (i.e. --author="^AUTHOR").

This had a few problems:

 * When looking for fixed strings (e.g. "git log -F --author=x --grep=y"),
   the regexp internally used "^author .*x" would never match anything;

 * To match at the end (e.g. "git log --author='google.com>$'"), the
   generated regexp has to also match the trailing timestamp part the
   commit header lines have.  Also, in order to determine if the '$' at
   the end means "match at the end of the line" or just a literal dollar
   sign (probably backslash-quoted), we would need to parse the regexp
   ourselves.

An earlier alternative tried to make sure that a line matches "^author "
(to limit by field name) and the user supplied pattern at the same time.
While it solved the -F problem by introducing a special override for
matching the "^author ", it did not solve the trailing timestamp nor tail
match problem.  It also would have matched every commit if --author=author
was asked for, not because the author's email part had this string, but
because every commit header line that talks about the author begins with
that field name, regardleses of who wrote it.

Instead of piling more hacks on top of hacks, this rethinks the grep
machinery that is used to look for strings in the commit header, and makes
sure that (1) field name matches literally at the beginning of the line,
followed by a SP, and (2) the user supplied pattern is matched against the
remainder of the line, excluding the trailing timestamp data.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agoMerge branch 'maint'
Shawn O. Pearce [Fri, 5 Sep 2008 04:53:06 +0000 (21:53 -0700)]
Merge branch 'maint'

* maint:
  git-gui: Fix diff parsing for lines starting with "--" or "++"

16 years agogit-gui: Fix diff parsing for lines starting with "--" or "++"
Shawn O. Pearce [Fri, 5 Sep 2008 04:46:56 +0000 (21:46 -0700)]
git-gui: Fix diff parsing for lines starting with "--" or "++"

Languages like Lua and SQL use "--" to mark a line as commented out.
If this appears at column 0 and is part of the pre-image we may see
"--- foo" in the diff, indicating that the line whose content is
 "-- foo" has been removed from the new version.

git-gui was incorrectly parsing "--- foo" as the old file name
in the file header, causing it to generate a bad patch file when
the user tried to stage or unstage a hunk or the selected line.
We need to keep track of where we are in the parsing so that we do
not misread a deletion or addition record as part of the header.

Reported-by: Alexander Gladysh <agladysh@gmail.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
16 years agogit-gui: Show special diffs for complex conflict cases.
Alexander Gavrilov [Sat, 30 Aug 2008 21:05:22 +0000 (01:05 +0400)]
git-gui: Show special diffs for complex conflict cases.

Add special handling for displaying diffs of modified/deleted,
and symlink/mode conflicts. Currently the display is completely
unusable for deciding how to resolve the conflict.

New display modes:

1) Deleted/Modified conflict: e.g.
LOCAL: deleted
REMOTE:
[diff :1:$path :3:$path]

2) Conflict involving symlinks:
LOCAL:
[diff :1:$path :2:$path]
REMOTE:
[diff :1:$path :3:$path]

In order to be able to display multiple diffs, this
patch adds a queue of commands to call.

Signed-off-by: Alexander Gavrilov <angavrilov@gmail.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
16 years agogit-gui: Make F5 reselect a diff, if an untracked file is selected.
Alexander Gavrilov [Sat, 30 Aug 2008 21:04:10 +0000 (01:04 +0400)]
git-gui: Make F5 reselect a diff, if an untracked file is selected.

If an untracked file is selected, F5 and other manual rescan synonyms
would try to select a tracked file instead. Also, clicking on an icon
in the unstaged changes list skips over untracked files, unless the
file clicked is untracked itself.

The objective is to make it easier to ignore untracked files showing
up in the Unstaged Changes list, and ensure that no modifications
to tracked objects are left unstaged.

Signed-off-by: Alexander Gavrilov <angavrilov@gmail.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
16 years agogit-gui: Reimplement and enhance auto-selection of diffs.
Alexander Gavrilov [Sat, 30 Aug 2008 21:02:56 +0000 (01:02 +0400)]
git-gui: Reimplement and enhance auto-selection of diffs.

Generalize the next_diff system, and implement auto-reselection
for merge tool resolution and reshow_diff. Also add auto-selection
of diffs after rescan, if no diff is already selected.

New auto-select rules:

- Rescan auto-selects the first conflicting file, or if none
  a modified tracked file, if nothing was selected previously.
- Resolving a conflict auto-selects the nearest conflicting
  file, or nothing if everything is resolved.
- Staging the last remaining hunk auto-selects the nearest
  modified staged file.
- Staging a file through its icon auto-selects the nearest file.

Signed-off-by: Alexander Gavrilov <angavrilov@gmail.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
16 years agogit-gui: Support conflict states _U & UT.
Alexander Gavrilov [Sat, 30 Aug 2008 21:00:49 +0000 (01:00 +0400)]
git-gui: Support conflict states _U & UT.

Support _U (local deleted, remote modified) and
UT (file type changed in conflict) modes.

Note that 'file type changed' does not refer to
changes in the executable bit, instead it denotes
replacing a file with a link, or vice versa.

Signed-off-by: Alexander Gavrilov <angavrilov@gmail.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
16 years agogit-gui: Support more merge tools.
Alexander Gavrilov [Sat, 30 Aug 2008 20:59:47 +0000 (00:59 +0400)]
git-gui: Support more merge tools.

Add native support for Araxis Merge, WinMerge and Perforce merge.

Custom merge tools are not implemented by mergetool.tcl; besides,
native support allows constructing the command lines in a more
intelligent way.

Signed-off-by: Alexander Gavrilov <angavrilov@gmail.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
16 years agogit-gui: Don't allow staging files with conflicts.
Alexander Gavrilov [Sat, 30 Aug 2008 20:54:19 +0000 (00:54 +0400)]
git-gui: Don't allow staging files with conflicts.

Prevent staging files with conflict markers by clicking
on the icon in the 'Unstaged Changes' list. Instead, pretend
that the user clicked the name, and show the diff.

Originally it made some sense to allow staging conflicting
files, because git-gui did not provide any tools to resolve
them from within the GUI. But now that we have added mergetool
capabilities, it is more likely to cause accidental and
non-undoable errors.

Signed-off-by: Alexander Gavrilov <angavrilov@gmail.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
16 years agogit-gui: Support calling merge tools.
Alexander Gavrilov [Sat, 30 Aug 2008 20:56:51 +0000 (00:56 +0400)]
git-gui: Support calling merge tools.

Adds an item to the diff context menu in conflict mode,
which invokes a merge tool for the selected file. Tool
command-line handling code was ported from git-mergetool.

Automatic default tool selection and custom merge tools
are not supported. If merge.tool is not set, git-gui
defaults to meld.

This implementation uses a checkout-index hack in order
to retrieve all stages with autocrlf and filters properly
applied. It requires temporarily moving the original
conflict file out of the way.

Signed-off-by: Alexander Gavrilov <angavrilov@gmail.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
16 years agogit-gui: Support resolving conflicts via the diff context menu.
Alexander Gavrilov [Sat, 30 Aug 2008 20:55:45 +0000 (00:55 +0400)]
git-gui: Support resolving conflicts via the diff context menu.

If the file has merge conflicts, show a special version of the
diff context menu, which includes conflict resolution commands
instead of Stage Hunk/Line. This patch only supports resolving
by discarding all sides except one.

Discarding is the only way to resolve conflicts involving symlinks
and/or deletion, excluding manual editing.

Signed-off-by: Alexander Gavrilov <angavrilov@gmail.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
16 years agogit-gui: Mark forgotten strings for translation.
Christian Stimming [Thu, 4 Sep 2008 09:50:53 +0000 (11:50 +0200)]
git-gui: Mark forgotten strings for translation.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
16 years agoadd '%d' pretty format specifier to show decoration
René Scharfe [Thu, 4 Sep 2008 21:40:03 +0000 (23:40 +0200)]
add '%d' pretty format specifier to show decoration

Add a new format placeholder, %d, which expands to a ref name decoration
(think git log --decorate).  It expands to an empty string if the commit
has no decoration, or otherwise to a comma (and space) separated list of
decorations, surrounded by parentheses and a leading space.

Michael Dressel implemented an initial version and chose the letter d,
Junio suggested to add a leading space and parentheses.

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agomove load_ref_decorations() to log-tree.c and export it
René Scharfe [Thu, 4 Sep 2008 21:39:21 +0000 (23:39 +0200)]
move load_ref_decorations() to log-tree.c and export it

log-tree.c is the ideal place for load_ref_decorations() and its
helper functions to live in, because the variable name_decoration
they're operating on is already located there, so move them thither.

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agolog: add load_ref_decorations()
René Scharfe [Thu, 4 Sep 2008 21:38:08 +0000 (23:38 +0200)]
log: add load_ref_decorations()

Move the loading of all ref names for decoration into its own function.
A static variable prevents loading twice, because it's quite expensive.
We can do it this way because we currently never unload decorations.

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agoFix AsciiDoc errors in merge documentation
Johan Herland [Thu, 4 Sep 2008 21:48:48 +0000 (23:48 +0200)]
Fix AsciiDoc errors in merge documentation

In the section on conflict markers, the "<<<<<<<" sequence is compiled by
AsciiDoc into invalid XML. A way to resolve this is by inserting something
between the last two characters in that sequence (i.e. between '<' and '"').

This patch encloses the conflict markers in backticks, which renders them
in a monospace font (in the HTML version; the manual page is unaffected),
and with the pleasant side-effect that it also fixes the AsciiDoc compile
problem.

Signed-off-by: Johan Herland <johan@herland.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agodiff --cumulative is a sub-option of --dirstat
Junio C Hamano [Wed, 3 Sep 2008 00:28:59 +0000 (17:28 -0700)]
diff --cumulative is a sub-option of --dirstat

The option used to be implemented as if it is a totally independent one,
but "git diff --cumulative" would not mean anything without "--dirstat".

This makes --cumulative imply --dirstat.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agosafe_create_leading_directories(): make it about "leading" directories
Junio C Hamano [Tue, 2 Sep 2008 21:10:15 +0000 (14:10 -0700)]
safe_create_leading_directories(): make it about "leading" directories

We used to allow callers to pass "foo/bar/" to make sure both "foo" and
"foo/bar" exist and have good permissions, but this interface is too error
prone.  If a caller mistakenly passes a path with trailing slashes
(perhaps it forgot to verify the user input) even when it wants to later
mkdir "bar" itself, it will find that it cannot mkdir "bar".  If such a
caller does not bother to check the error for EEXIST, it may even
errorneously die().

Because we have no existing callers to use that obscure feature, this
patch removes it to avoid confusion.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agobash completion: Hide more plumbing commands
Petr Baudis [Tue, 26 Aug 2008 17:11:44 +0000 (19:11 +0200)]
bash completion: Hide more plumbing commands

git <tab><tab> still shows way too many commands, some of them
are clearly plumbing. This patch hides the plumbing commands
liberally (that is, in special cases, users still might want to
call one of the hidden commands, a *normal* workflow should never
involve these, though - and if it does, we have a UI problem anyway).

Signed-off-by: Petr Baudis <pasky@suse.cz>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agomerge-recursive: move call_depth to struct merge_options
Miklos Vajna [Tue, 2 Sep 2008 21:30:09 +0000 (23:30 +0200)]
merge-recursive: move call_depth to struct merge_options

Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
16 years agoUpdate draft release notes for 1.6.1
Junio C Hamano [Wed, 3 Sep 2008 23:27:59 +0000 (16:27 -0700)]
Update draft release notes for 1.6.1

Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agoMerge branch 'maint'
Junio C Hamano [Wed, 3 Sep 2008 23:08:23 +0000 (16:08 -0700)]
Merge branch 'maint'

* maint:
  Start 1.6.0.2 maintenance cycle
  tests: use "git xyzzy" form (t7200 - t9001)
  tests: use "git xyzzy" form (t7000 - t7199)
  Fix passwd(5) ref and reflect that commit doens't use commit-tree
  improve handling of sideband message display
  tests: use "git xyzzy" form (t3600 - t6999)
  tests: use "git xyzzy" form (t0000 - t3599)
  checkout: fix message when leaving detached HEAD
  clone: fix creation of explicitly named target directory
  'git foo' program identifies itself without dash in die() messages
  setup_git_directory(): fix move to worktree toplevel directory
  update-index: fix worktree setup
  Start conforming code to "git subcmd" style
  read-tree: setup worktree if merge is required
  grep: fix worktree setup
  diff*: fix worktree setup

Conflicts:
RelNotes
t/t3900-i18n-commit.sh
t/t7003-filter-branch.sh

16 years agoStart 1.6.0.2 maintenance cycle
Junio C Hamano [Wed, 3 Sep 2008 22:39:19 +0000 (15:39 -0700)]
Start 1.6.0.2 maintenance cycle

Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agoMerge branch 'nd/worktree' into maint
Junio C Hamano [Wed, 3 Sep 2008 22:35:37 +0000 (15:35 -0700)]
Merge branch 'nd/worktree' into maint

* nd/worktree:
  setup_git_directory(): fix move to worktree toplevel directory
  update-index: fix worktree setup
  read-tree: setup worktree if merge is required
  grep: fix worktree setup
  diff*: fix worktree setup

16 years agoMerge branch 'ho/dashless' into maint
Junio C Hamano [Wed, 3 Sep 2008 21:51:56 +0000 (14:51 -0700)]
Merge branch 'ho/dashless' into maint

* ho/dashless:
  tests: use "git xyzzy" form (t7200 - t9001)
  tests: use "git xyzzy" form (t7000 - t7199)
  tests: use "git xyzzy" form (t3600 - t6999)
  tests: use "git xyzzy" form (t0000 - t3599)
  'git foo' program identifies itself without dash in die() messages
  Start conforming code to "git subcmd" style

16 years agotests: use "git xyzzy" form (t7200 - t9001)
Nanako Shiraishi [Wed, 3 Sep 2008 08:59:33 +0000 (17:59 +0900)]
tests: use "git xyzzy" form (t7200 - t9001)

Converts tests between t7201-t9001.

Signed-off-by: Nanako Shiraishi <nanako3@lavabit.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agotests: use "git xyzzy" form (t7000 - t7199)
Nanako Shiraishi [Wed, 3 Sep 2008 08:59:31 +0000 (17:59 +0900)]
tests: use "git xyzzy" form (t7000 - t7199)

Converts tests between t7001-t7103.

Signed-off-by: Nanako Shiraishi <nanako3@lavabit.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agoFix passwd(5) ref and reflect that commit doens't use commit-tree
Jonas Fonseca [Wed, 3 Sep 2008 08:50:43 +0000 (10:50 +0200)]
Fix passwd(5) ref and reflect that commit doens't use commit-tree

Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agoimprove handling of sideband message display
Nicolas Pitre [Wed, 3 Sep 2008 19:13:42 +0000 (15:13 -0400)]
improve handling of sideband message display

Currently the code looks for line break characters in order to prepend
"remote: " to every line received as many lines can be sent in a single
chunk.  However the opposite might happen too, i.e. a single message
line split amongst multiple chunks.  This patch adds support for the
later case to avoid displays like:

remote: Compressing objeremote: cts: 100% (313/313), done.

Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agotests: use "git xyzzy" form (t3600 - t6999)
Nanako Shiraishi [Wed, 3 Sep 2008 08:59:29 +0000 (17:59 +0900)]
tests: use "git xyzzy" form (t3600 - t6999)

Converts tests between t3600-t6300.

Signed-off-by: Nanako Shiraishi <nanako3@lavabit.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agotests: use "git xyzzy" form (t0000 - t3599)
Nanako Shiraishi [Wed, 3 Sep 2008 08:59:27 +0000 (17:59 +0900)]
tests: use "git xyzzy" form (t0000 - t3599)

Converts tests between t0050-t3903.

Signed-off-by: Nanako Shiraishi <nanako3@lavabit.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agocheckout: fix message when leaving detached HEAD
Jeff King [Wed, 3 Sep 2008 18:07:26 +0000 (14:07 -0400)]
checkout: fix message when leaving detached HEAD

The shell version of git checkout would print:

  Previous HEAD position was 1234abcd... commit subject line

when leaving a detached HEAD for another commit. Ths C
version attempted to implement this, but got the condition
wrong such that the behavior never triggered.

This patch simplifies the conditions for showing the message
to the ones used by the shell version: any time we are
leaving a detached HEAD and the new and old commits are not
the same (this suppresses it for the "git checkout -b new"
case recommended when you enter the detached state).

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agoclone: fix creation of explicitly named target directory
Clemens Buchacher [Wed, 3 Sep 2008 18:55:55 +0000 (20:55 +0200)]
clone: fix creation of explicitly named target directory

'git clone <repo> path/' (note the trailing slash) fails, because the
entire path is interpreted as leading directories. So when mkdir tries to
create the actual path, it already exists.

This makes sure trailing slashes are removed.

Signed-off-by: Clemens Buchacher <drizzd@aon.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agoMerge branch 'tr/filter-branch'
Junio C Hamano [Wed, 3 Sep 2008 00:47:13 +0000 (17:47 -0700)]
Merge branch 'tr/filter-branch'

* tr/filter-branch:
  revision --simplify-merges: make it a no-op without pathspec
  revision --simplify-merges: do not leave commits unprocessed
  revision --simplify-merges: use decoration instead of commit->util field
  Documentation: rev-list-options: move --simplify-merges documentation
  filter-branch: use --simplify-merges
  filter-branch: fix ref rewriting with --subdirectory-filter
  filter-branch: Extend test to show rewriting bug
  Topo-sort before --simplify-merges
  revision traversal: show full history with merge simplification
  revision.c: whitespace fix

16 years agoMerge branch 'np/maint-safer-pack'
Junio C Hamano [Wed, 3 Sep 2008 00:46:48 +0000 (17:46 -0700)]
Merge branch 'np/maint-safer-pack'

* np/maint-safer-pack:
  fixup_pack_header_footer(): use nicely aligned buffer sizes
  index-pack: use fixup_pack_header_footer()'s validation mode
  pack-objects: use fixup_pack_header_footer()'s validation mode
  improve reliability of fixup_pack_header_footer()
  pack-objects: improve returned information from write_one()

16 years agoMerge branch 'rf/man-env'
Junio C Hamano [Wed, 3 Sep 2008 00:45:41 +0000 (17:45 -0700)]
Merge branch 'rf/man-env'

* rf/man-env:
  builtin-help: fallback to GIT_MAN_VIEWER before man

16 years agoMerge branch 'jc/author-nickname'
Junio C Hamano [Wed, 3 Sep 2008 00:45:28 +0000 (17:45 -0700)]
Merge branch 'jc/author-nickname'

* jc/author-nickname:
  git commit --author=$name: look $name up in existing commits

16 years agoMerge branch 'dp/pid-uintmax'
Junio C Hamano [Wed, 3 Sep 2008 00:45:25 +0000 (17:45 -0700)]
Merge branch 'dp/pid-uintmax'

* dp/pid-uintmax:
  cast pid_t's to uintmax_t to improve portability

16 years agogitweb: ref markers link to named shortlogs
Giuseppe Bilotta [Tue, 2 Sep 2008 19:47:05 +0000 (21:47 +0200)]
gitweb: ref markers link to named shortlogs

This patch turns ref markers for tags and heads into links to
appropriate views for the ref name, depending on current context.

For annotated tags, we link to the tag view, unless that's the current
view, in which case we switch to shortlog. For other refs, we prefer the
current view if it's history or (short)log, and default to shortlog
otherwise.

Appropriate changes are made in the CSS to prevent ref markers from
being annoyingly blue and underlined, unless hovered. A visual
indication of the target view difference is also implemented by making
annotated tags show up in italic.

Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
Acked-by: Petr Baudis <pasky@suse.cz>
Acked-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agoMerge branch 'maint'
Junio C Hamano [Wed, 3 Sep 2008 00:10:08 +0000 (17:10 -0700)]
Merge branch 'maint'

* maint:
  Makefile: add merge_recursive.h to LIB_H
  Improve documentation for --dirstat diff option
  Bring local clone's origin URL in line with that of a remote clone
  Documentation: minor cleanup in a use case in 'git stash' manual
  Documentation: fix disappeared lines in 'git stash' manpage
  Documentation: fix reference to a for-each-ref option

16 years agot5300: improve SHA1 collision test
Nicolas Pitre [Tue, 2 Sep 2008 14:22:22 +0000 (10:22 -0400)]
t5300: improve SHA1 collision test

Make sure the reason for the command failure is actually due to
the detection of SHA1 collision.

Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agopack-objects: don't include missing preferred base objects
Nicolas Pitre [Tue, 2 Sep 2008 14:22:21 +0000 (10:22 -0400)]
pack-objects: don't include missing preferred base objects

This improves commit 6d6f9cddbe a bit by simply not including missing
bases in the list of objects to process at all.

Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agosha1write: don't copy full sized buffers
Nicolas Pitre [Tue, 2 Sep 2008 14:22:20 +0000 (10:22 -0400)]
sha1write: don't copy full sized buffers

No need to memcpy() source buffer data when we might just process the
data in place instead of accumulating it into a separate buffer.
This is the case when a whole buffer would have been copied, summed,
written out and then discarded right away.

Also move the CRC32 processing within the loop so the data is more likely
to remain in the L1 CPU cache between the CRC32 sum, SHA1 sum and the
write call.

Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agoMerge branch 'np/maint-safer-pack' into np/pack
Junio C Hamano [Wed, 3 Sep 2008 00:05:44 +0000 (17:05 -0700)]
Merge branch 'np/maint-safer-pack' into np/pack

* np/maint-safer-pack:
  fixup_pack_header_footer(): use nicely aligned buffer sizes
  index-pack: use fixup_pack_header_footer()'s validation mode
  pack-objects: use fixup_pack_header_footer()'s validation mode
  improve reliability of fixup_pack_header_footer()
  pack-objects: improve returned information from write_one()