]> git.ipfire.org Git - thirdparty/git.git/log
thirdparty/git.git
10 years agoapply, entry: speak of submodules instead of subprojects
Thomas Rast [Thu, 18 Jul 2013 12:26:55 +0000 (14:26 +0200)] 
apply, entry: speak of submodules instead of subprojects

There are only four (with some generous rounding) instances in the
current source code where we speak of "subproject" instead of
"submodule".  They are as follows:

* one error message in git-apply and two in entry.c

* the patch format for submodule changes

The latter was introduced in 0478675 (Expose subprojects as special
files to "git diff" machinery, 2007-04-15), apparently before the
terminology was settled.  We can of course not change the patch
format.

Let's at least change the error messages to consistently call them
"submodule".

Signed-off-by: Thomas Rast <trast@inf.ethz.ch>
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agoGit 1.8.3.3 v1.8.3.3
Junio C Hamano [Mon, 15 Jul 2013 17:39:43 +0000 (10:39 -0700)] 
Git 1.8.3.3

Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agoMerge branch 'tr/maint-apply-non-git-patch-parsefix' into maint
Junio C Hamano [Mon, 15 Jul 2013 17:36:14 +0000 (10:36 -0700)] 
Merge branch 'tr/maint-apply-non-git-patch-parsefix' into maint

"git apply" parsed patches that add new files, generated by programs
other than Git, incorrectly.  This is an old breakage in v1.7.11.

* tr/maint-apply-non-git-patch-parsefix:
  apply: carefully strdup a possibly-NULL name

10 years agoMerge branch 'bc/http-keep-memory-given-to-curl' into maint
Junio C Hamano [Mon, 15 Jul 2013 17:36:01 +0000 (10:36 -0700)] 
Merge branch 'bc/http-keep-memory-given-to-curl' into maint

Older cURL wanted piece of memory we call it with to be stable, but
we updated the auth material after handing it to a call.

* bc/http-keep-memory-given-to-curl:
  http.c: don't rewrite the user:passwd string multiple times

10 years agoMerge branch 'jk/pull-into-dirty-unborn' into maint
Junio C Hamano [Mon, 15 Jul 2013 17:35:43 +0000 (10:35 -0700)] 
Merge branch 'jk/pull-into-dirty-unborn' into maint

"git pull" into nothing trashed "local changes" that were in the
index.

* jk/pull-into-dirty-unborn:
  pull: merge into unborn by fast-forwarding from empty tree
  pull: update unborn branch tip after index

10 years agoMerge branch 'fg/submodule-non-ascii-path' into maint
Junio C Hamano [Mon, 15 Jul 2013 17:35:17 +0000 (10:35 -0700)] 
Merge branch 'fg/submodule-non-ascii-path' into maint

Many "git submodule" operations did not work on a submodule at a
path whose name is not in ASCII.

* fg/submodule-non-ascii-path:
  t7400: test of UTF-8 submodule names pass under Mac OS
  handle multibyte characters in name

10 years agoMerge branch 'fc/sequencer-plug-leak' into maint
Junio C Hamano [Mon, 15 Jul 2013 17:35:04 +0000 (10:35 -0700)] 
Merge branch 'fc/sequencer-plug-leak' into maint

"cherry-pick" had a small leak in its error codepath.

* fc/sequencer-plug-leak:
  sequencer: avoid leaking message buffer when refusing to create an empty commit
  sequencer: remove useless indentation

10 years agoMerge branch 'mt/send-email-cc-match-fix' into maint
Junio C Hamano [Mon, 15 Jul 2013 17:34:36 +0000 (10:34 -0700)] 
Merge branch 'mt/send-email-cc-match-fix' into maint

Logic used by git-send-email to suppress cc mishandled names like "A
U. Thor" <author@example.xz>, where the human readable part needs to
be quoted (the user input may not have the double quotes around the
name, and comparison was done between quoted and unquoted strings).
It also mishandled names that need RFC2047 quoting.

* mt/send-email-cc-match-fix:
  send-email: sanitize author when writing From line
  send-email: add test for duplicate utf8 name
  test-send-email: test for pre-sanitized self name
  t/send-email: test suppress-cc=self with non-ascii
  t/send-email: add test with quoted sender
  send-email: make --suppress-cc=self sanitize input
  t/send-email: test suppress-cc=self on cccmd
  send-email: fix suppress-cc=self on cccmd
  t/send-email.sh: add test for suppress-cc=self

10 years agofixup-builtins: retire an old transition helper script
Ramkumar Ramachandra [Fri, 28 Jun 2013 15:46:19 +0000 (21:16 +0530)] 
fixup-builtins: retire an old transition helper script

This script was added in 36e5e70 (Start deprecating "git-command" in
favor of "git command", 2007-06-30) with the intent of aiding the
transition away from dashed forms.

It has already been used to help the transision and served its
purpose, and is no longer very useful for follow-up work, because
the majority of remaining matches it finds are false positives.

Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Reviewed-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agoUpdate draft release notes to 1.8.3.3
Junio C Hamano [Wed, 3 Jul 2013 22:43:41 +0000 (15:43 -0700)] 
Update draft release notes to 1.8.3.3

Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agoMerge branch 'rr/diffcore-pickaxe-doc' into maint
Junio C Hamano [Wed, 3 Jul 2013 22:41:17 +0000 (15:41 -0700)] 
Merge branch 'rr/diffcore-pickaxe-doc' into maint

* rr/diffcore-pickaxe-doc:
  diffcore-pickaxe doc: document -S and -G properly
  diffcore-pickaxe: make error messages more consistent

10 years agoMerge branch 'cr/git-work-tree-sans-git-dir' into maint
Junio C Hamano [Wed, 3 Jul 2013 22:41:05 +0000 (15:41 -0700)] 
Merge branch 'cr/git-work-tree-sans-git-dir' into maint

* cr/git-work-tree-sans-git-dir:
  git.txt: remove stale comment regarding GIT_WORK_TREE

10 years agoMerge branch 'fc/do-not-use-the-index-in-add-to-index' into maint
Junio C Hamano [Wed, 3 Jul 2013 22:40:38 +0000 (15:40 -0700)] 
Merge branch 'fc/do-not-use-the-index-in-add-to-index' into maint

* fc/do-not-use-the-index-in-add-to-index:
  read-cache: trivial style cleanups
  read-cache: fix wrong 'the_index' usage

10 years agoMerge branch 'dm/unbash-subtree' into maint
Junio C Hamano [Wed, 3 Jul 2013 22:39:37 +0000 (15:39 -0700)] 
Merge branch 'dm/unbash-subtree' into maint

* dm/unbash-subtree:
  contrib/git-subtree: Use /bin/sh interpreter instead of /bin/bash

10 years agoMerge branch 'jc/core-checkstat' into maint
Junio C Hamano [Wed, 3 Jul 2013 22:39:15 +0000 (15:39 -0700)] 
Merge branch 'jc/core-checkstat' into maint

* jc/core-checkstat:
  deprecate core.statinfo at Git 2.0 boundary

10 years agoMerge branch 'jc/t5551-posix-sed-bre' into maint
Junio C Hamano [Wed, 3 Jul 2013 22:37:58 +0000 (15:37 -0700)] 
Merge branch 'jc/t5551-posix-sed-bre' into maint

* jc/t5551-posix-sed-bre:
  t5551: do not use unportable sed '\+'

10 years agoMerge branch 'vv/help-unknown-ref' into maint
Junio C Hamano [Wed, 3 Jul 2013 22:37:50 +0000 (15:37 -0700)] 
Merge branch 'vv/help-unknown-ref' into maint

* vv/help-unknown-ref:
  merge: use help_unknown_ref()
  help: add help_unknown_ref()

10 years agoMerge branch 'rs/empty-archive' into maint
Junio C Hamano [Wed, 3 Jul 2013 22:36:54 +0000 (15:36 -0700)] 
Merge branch 'rs/empty-archive' into maint

* rs/empty-archive:
  t5004: resurrect original empty tar archive test
  t5004: avoid using tar for checking emptiness of archive

Conflicts:
t/t5004-archive-corner-cases.sh

10 years agoMerge branch 'rh/merge-options-doc-fix' into maint
Junio C Hamano [Wed, 3 Jul 2013 22:36:30 +0000 (15:36 -0700)] 
Merge branch 'rh/merge-options-doc-fix' into maint

* rh/merge-options-doc-fix:
  Documentation/merge-options.txt: restore `-e` option

10 years agoMerge branch 'an/diff-index-doc' into maint
Junio C Hamano [Wed, 3 Jul 2013 22:35:55 +0000 (15:35 -0700)] 
Merge branch 'an/diff-index-doc' into maint

* an/diff-index-doc:
  Documentation/diff-index: mention two modes of operation

10 years agoMerge branch 'cm/gitweb-project-list-persistent-cgi-fix' into maint
Junio C Hamano [Wed, 3 Jul 2013 22:31:36 +0000 (15:31 -0700)] 
Merge branch 'cm/gitweb-project-list-persistent-cgi-fix' into maint

"gitweb" forgot to clear a global variable $search_regexp upon each
request, mistakenly carrying over the previous search to a new one
when used as a persistent CGI.

* cm/gitweb-project-list-persistent-cgi-fix:
  gitweb: fix problem causing erroneous project list

10 years agoMerge branch 'ar/wildmatch-foldcase' into maint
Junio C Hamano [Wed, 3 Jul 2013 22:31:27 +0000 (15:31 -0700)] 
Merge branch 'ar/wildmatch-foldcase' into maint

The wildmatch engine did not honor WM_CASEFOLD option correctly.

* ar/wildmatch-foldcase:
  wildmatch: properly fold case everywhere

10 years agoMerge branch 'cb/log-follow-with-combined' into maint
Junio C Hamano [Wed, 3 Jul 2013 22:30:59 +0000 (15:30 -0700)] 
Merge branch 'cb/log-follow-with-combined' into maint

"git log -c --follow $path" segfaulted upon hitting the commit that
renamed the $path being followed.

* cb/log-follow-with-combined:
  fix segfault with git log -c --follow

10 years agoMerge branch 'rr/die-on-missing-upstream' into maint
Junio C Hamano [Wed, 3 Jul 2013 22:30:24 +0000 (15:30 -0700)] 
Merge branch 'rr/die-on-missing-upstream' into maint

When a reflog notation is used for implicit "current branch", we did
not say which branch, and worse said "branch ''".

* rr/die-on-missing-upstream:
  sha1_name: fix error message for @{<N>}, @{<date>}
  sha1_name: fix error message for @{u}

10 years agoMerge branch 'maint-1.8.2' into maint
Junio C Hamano [Wed, 3 Jul 2013 22:27:19 +0000 (15:27 -0700)] 
Merge branch 'maint-1.8.2' into maint

* maint-1.8.2:
  git-config: update doc for --get with multiple values

10 years agoMerge branch 'maint-1.8.1' into maint-1.8.2
Junio C Hamano [Wed, 3 Jul 2013 22:26:53 +0000 (15:26 -0700)] 
Merge branch 'maint-1.8.1' into maint-1.8.2

* maint-1.8.1:
  git-config: update doc for --get with multiple values

10 years agogit-config: update doc for --get with multiple values
John Keeping [Wed, 3 Jul 2013 18:27:39 +0000 (19:27 +0100)] 
git-config: update doc for --get with multiple values

Since commit 00b347d (git-config: do not complain about duplicate
entries, 2012-10-23), "git config --get" does not exit with an error if
there are multiple values for the specified key but instead returns the
last value.  Update the documentation to reflect this.

Signed-off-by: John Keeping <john@keeping.me.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agot7500: fix flipped actual/expect
Andrew Pimlott [Mon, 1 Jul 2013 16:20:36 +0000 (09:20 -0700)] 
t7500: fix flipped actual/expect

Signed-off-by: Andrew Pimlott <andrew@pimlott.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agolib-rebase: document exec_ in FAKE_LINES
Andrew Pimlott [Mon, 1 Jul 2013 16:20:35 +0000 (09:20 -0700)] 
lib-rebase: document exec_ in FAKE_LINES

Signed-off-by: Andrew Pimlott <andrew@pimlott.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agoStart preparing for 1.8.3.3
Junio C Hamano [Sun, 30 Jun 2013 22:36:03 +0000 (15:36 -0700)] 
Start preparing for 1.8.3.3

Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agoMerge branch 'fc/macos-x-clipped-write' into maint
Junio C Hamano [Sun, 30 Jun 2013 22:33:40 +0000 (15:33 -0700)] 
Merge branch 'fc/macos-x-clipped-write' into maint

Mac OS X does not like to write(2) more than INT_MAX number of
bytes; work it around by chopping write(2) into smaller pieces.

* fc/macos-x-clipped-write:
  compate/clipped-write.c: large write(2) fails on Mac OS X/XNU

10 years agoMerge branch 'da/darwin' into maint
Junio C Hamano [Sun, 30 Jun 2013 22:33:13 +0000 (15:33 -0700)] 
Merge branch 'da/darwin' into maint

Newer MacOS X encourages the programs to compile and link with their
CommonCrypto, not with OpenSSL.

* da/darwin:
  imap-send: eliminate HMAC deprecation warnings on Mac OS X
  cache.h: eliminate SHA-1 deprecation warnings on Mac OS X
  Makefile: add support for Apple CommonCrypto facility
  Makefile: fix default regex settings on Darwin

10 years agocheck-ignore doc: fix broken link to ls-files page
Ramkumar Ramachandra [Sun, 30 Jun 2013 12:05:28 +0000 (17:35 +0530)] 
check-ignore doc: fix broken link to ls-files page

Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agotest: spell 'ls-files --delete' option correctly in test descriptions
SZEDER Gábor [Sun, 30 Jun 2013 10:45:25 +0000 (12:45 +0200)] 
test: spell 'ls-files --delete' option correctly in test descriptions

The option is spelled '--deleted'.

Signed-off-by: SZEDER Gábor <szeder@ira.uka.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agoGit 1.8.3.2 v1.8.3.2
Junio C Hamano [Fri, 28 Jun 2013 21:56:30 +0000 (14:56 -0700)] 
Git 1.8.3.2

Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agoconfigure: fix option help message for --disable-pthreads
Stefano Lattarini [Fri, 28 Jun 2013 17:19:42 +0000 (19:19 +0200)] 
configure: fix option help message for --disable-pthreads

The configure option to disable threading is '--disable-pthreads',
not '--without-pthreads'.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agoMerge branch 'nd/clone-connectivity-shortcut' (early part) into maint
Junio C Hamano [Fri, 28 Jun 2013 17:00:00 +0000 (10:00 -0700)] 
Merge branch 'nd/clone-connectivity-shortcut' (early part) into maint

Cloning with "git clone --depth N" while fetch.fsckobjects (or
transfer.fsckobjects) is set to true did not tell the cut-off points
of the shallow history to the process that validates the objects and
the history received, causing the validation to fail.

* 'nd/clone-connectivity-shortcut' (early part):
  fetch-pack: prepare updated shallow file before fetching the pack
  clone: let the user know when check_everything_connected is run

10 years agoStart preparing for 1.8.3.2
Junio C Hamano [Thu, 27 Jun 2013 21:48:14 +0000 (14:48 -0700)] 
Start preparing for 1.8.3.2

Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agoMerge branch 'ks/difftool-dir-diff-copy-fix' into maint
Junio C Hamano [Thu, 27 Jun 2013 21:38:22 +0000 (14:38 -0700)] 
Merge branch 'ks/difftool-dir-diff-copy-fix' into maint

* ks/difftool-dir-diff-copy-fix:
  difftool --dir-diff: allow changing any clean working tree file

10 years agoMerge branch 'rr/push-head' into maint
Junio C Hamano [Thu, 27 Jun 2013 21:38:17 +0000 (14:38 -0700)] 
Merge branch 'rr/push-head' into maint

* rr/push-head:
  push: make push.default = current use resolved HEAD
  push: fail early with detached HEAD and current
  push: factor out the detached HEAD error message

10 years agoMerge branch 'fc/show-branch-in-rebase-am' into maint
Junio C Hamano [Thu, 27 Jun 2013 21:38:16 +0000 (14:38 -0700)] 
Merge branch 'fc/show-branch-in-rebase-am' into maint

* fc/show-branch-in-rebase-am:
  prompt: fix for simple rebase

10 years agoMerge branch 'tg/maint-zsh-svn-remote-prompt' into maint
Junio C Hamano [Thu, 27 Jun 2013 21:38:14 +0000 (14:38 -0700)] 
Merge branch 'tg/maint-zsh-svn-remote-prompt' into maint

* tg/maint-zsh-svn-remote-prompt:
  prompt: fix show upstream with svn and zsh

10 years agoMerge branch 'nd/urls-doc-no-file-hyperlink-fix' into maint
Junio C Hamano [Thu, 27 Jun 2013 21:38:12 +0000 (14:38 -0700)] 
Merge branch 'nd/urls-doc-no-file-hyperlink-fix' into maint

* nd/urls-doc-no-file-hyperlink-fix:
  urls.txt: avoid auto converting to hyperlink

10 years agoMerge branch 'tr/push-no-verify-doc' into maint
Junio C Hamano [Thu, 27 Jun 2013 21:38:09 +0000 (14:38 -0700)] 
Merge branch 'tr/push-no-verify-doc' into maint

* tr/push-no-verify-doc:
  Document push --no-verify

10 years agoMerge branch 'rs/commit-m-no-edit' into maint
Junio C Hamano [Thu, 27 Jun 2013 21:38:07 +0000 (14:38 -0700)] 
Merge branch 'rs/commit-m-no-edit' into maint

* rs/commit-m-no-edit:
  commit: don't start editor if empty message is given with -m

10 years agoMerge branch 'jc/strbuf-branchname-fix' into maint
Junio C Hamano [Thu, 27 Jun 2013 21:38:02 +0000 (14:38 -0700)] 
Merge branch 'jc/strbuf-branchname-fix' into maint

* jc/strbuf-branchname-fix:
  strbuf_branchname(): do not double-expand @{-1}~22

10 years agoMerge branch 'mk/combine-diff-context-horizon-fix' into maint
Junio C Hamano [Thu, 27 Jun 2013 21:37:55 +0000 (14:37 -0700)] 
Merge branch 'mk/combine-diff-context-horizon-fix' into maint

* mk/combine-diff-context-horizon-fix:
  combine-diff.c: Fix output when changes are exactly 3 lines apart

10 years agoMerge branch 'kb/ancestry-path-threedots' into maint
Junio C Hamano [Thu, 27 Jun 2013 21:37:52 +0000 (14:37 -0700)] 
Merge branch 'kb/ancestry-path-threedots' into maint

* kb/ancestry-path-threedots:
  revision.c: treat A...B merge bases as if manually specified
  t6019: demonstrate --ancestry-path A...B breakage

10 years agoMerge branch 'jk/subtree-do-not-push-if-split-fails' into maint
Junio C Hamano [Thu, 27 Jun 2013 21:37:44 +0000 (14:37 -0700)] 
Merge branch 'jk/subtree-do-not-push-if-split-fails' into maint

* jk/subtree-do-not-push-if-split-fails:
  contrib/subtree: don't delete remote branches if split fails

10 years agoMerge branch 'mh/fetch-into-shallow' into maint
Junio C Hamano [Thu, 27 Jun 2013 21:37:41 +0000 (14:37 -0700)] 
Merge branch 'mh/fetch-into-shallow' into maint

* mh/fetch-into-shallow:
  t5500: add test for fetching with an unknown 'shallow'
  upload-pack: ignore 'shallow' lines with unknown obj-ids

10 years agoMerge branch 'jh/checkout-auto-tracking' into maint
Junio C Hamano [Thu, 27 Jun 2013 21:37:21 +0000 (14:37 -0700)] 
Merge branch 'jh/checkout-auto-tracking' into maint

* jh/checkout-auto-tracking:
  glossary: Update and rephrase the definition of a remote-tracking branch
  branch.c: Validate tracking branches with refspecs instead of refs/remotes/*
  t9114.2: Don't use --track option against "svn-remote"-tracking branches
  t7201.24: Add refspec to keep --track working
  t3200.39: tracking setup should fail if there is no matching refspec.
  checkout: Use remote refspecs when DWIMming tracking branches
  t2024: Show failure to use refspec when DWIMming remote branch names
  t2024: Add tests verifying current DWIM behavior of 'git checkout <branch>'

10 years agocompletion: complete diff --word-diff
Ramkumar Ramachandra [Tue, 18 Jun 2013 19:24:05 +0000 (00:54 +0530)] 
completion: complete diff --word-diff

Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agoapply: carefully strdup a possibly-NULL name
Thomas Rast [Fri, 21 Jun 2013 11:38:00 +0000 (13:38 +0200)] 
apply: carefully strdup a possibly-NULL name

2901bbe (apply: free patch->{def,old,new}_name fields, 2012-03-21)
cleaned up the memory management of filenames in the patches, but
forgot that find_name_traditional() can return NULL as a way of saying
"I couldn't find a name".

That NULL unfortunately gets passed into xstrdup() next, resulting in
a segfault.  Use null_strdup() so as to safely propagate the null,
which will let us emit the correct error message.

Reported-by: DevHC on #git
Signed-off-by: Thomas Rast <trast@inf.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agopull: merge into unborn by fast-forwarding from empty tree
Thomas Rast [Thu, 20 Jun 2013 22:38:28 +0000 (18:38 -0400)] 
pull: merge into unborn by fast-forwarding from empty tree

The logic for pulling into an unborn branch was originally
designed to be used on a newly-initialized repository
(d09e79c, git-pull: allow pulling into an empty repository,
2006-11-16).  It thus did not initially deal with
uncommitted changes in the unborn branch.  The case of an
_unstaged_ untracked file was fixed by 4b3ffe5 (pull: do not
clobber untracked files on initial pull, 2011-03-25).
However, it still clobbered existing staged files, both when
the file exists in the merged commit (it will be
overwritten), and when it does not (it will be deleted).

We fix this by doing a two-way merge, where the "current"
side of the merge is an empty tree, and the "target" side is
HEAD (already updated to FETCH_HEAD at this point).  This
amounts to claiming that all work in the index was done vs.
an empty tree, and thus all content of the index is
precious.

Note that this use of read-tree just gives us protection
against overwriting index and working tree changes. It will
not actually result in a 3-way merge conflict in the index.
This is fine, as this is a rare situation, and the conflict
would not be interesting anyway (it must, by definition, be
an add/add conflict with the whole content conflicting). And
it makes it simpler for the user to recover, as they have no
HEAD to "git reset" back to.

Reported-by: Stefan Schüßler <mail@stefanschuessler.de>
Signed-off-by: Thomas Rast <trast@inf.ethz.ch>
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agopull: update unborn branch tip after index
Jeff King [Thu, 20 Jun 2013 22:36:31 +0000 (18:36 -0400)] 
pull: update unborn branch tip after index

When commit d09e79c taught git to pull into an unborn
branch, it first updated the unborn branch to point at the
pulled commit, and then used read-tree to update the index
and working tree. That ordering made sense, since any
failure of the latter step would be due to filesystem
errors, and one could then recover with "git reset --hard".

Later, commit 4b3ffe5 added extra safety for existing files
in the working tree by asking read-tree to bail out when it
would overwrite such a file. This error mode is much less
"your pull failed due to random errors" and more like "we
reject this pull because it would lose data". In that case,
it makes sense not to update the HEAD ref, just as a regular
rejected merge would do.

This patch reverses the order of the update-ref and
read-tree calls, so that we do not touch the HEAD ref at all if a
merge is rejected. This also means that we would not update
HEAD in case of a transient filesystem error, but those are
presumably less rare (and one can still recover by repeating
the pull, or by accessing FETCH_HEAD directly).

While we're reorganizing the code, we can drop the "exit 1"
from the end of our command chain. We exit immediately
either way, and just calling exit without an argument will
use the exit code from the last command.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agot7400: test of UTF-8 submodule names pass under Mac OS
Torsten Bögershausen [Thu, 20 Jun 2013 14:58:48 +0000 (16:58 +0200)] 
t7400: test of UTF-8 submodule names pass under Mac OS

submodules with names using UTF-8 need core.precomposeunicode true
under Mac OS X, set it in the test case.

Improve the portability:

  - Not all shells on all OS may understand literal UTF-8 strings.
  - Use a help variable filled by printf, as we do it in e.g. t0050.

"strange names" can be called UTF-8, rephrase the heading.

While at it, unbreak &&-chain in the test, and use test_config.

Signed-off-by: Torsten Bögershausen <tboegi@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agosend-email: sanitize author when writing From line
Michael S. Tsirkin [Tue, 18 Jun 2013 12:49:26 +0000 (15:49 +0300)] 
send-email: sanitize author when writing From line

sender is now sanitized, but we didn't sanitize author when checking
whether From: line is needed in the message body.

As a result git started writing duplicate From: lines when author
matched sender and has utf8 characters.

Reported-by: SZEDER Gábor <szeder@ira.uka.de>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Tested-by: SZEDER Gábor <szeder@ira.uka.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agosend-email: add test for duplicate utf8 name
Michael S. Tsirkin [Tue, 18 Jun 2013 12:49:29 +0000 (15:49 +0300)] 
send-email: add test for duplicate utf8 name

Verify that author name is not duplicated if it matches sender, even
if it is in utf8 (the test expects a failure that will be fixed in
the next patch).

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agohttp.c: don't rewrite the user:passwd string multiple times
Brandon Casey [Wed, 19 Jun 2013 02:43:49 +0000 (19:43 -0700)] 
http.c: don't rewrite the user:passwd string multiple times

Curl older than 7.17 (RHEL 4.X provides 7.12 and RHEL 5.X provides
7.15) requires that we manage any strings that we pass to it as
pointers.  So, we really shouldn't be modifying this strbuf after we
have passed it to curl.

Our interaction with curl is currently safe (before or after this
patch) since the pointer that is passed to curl is never invalidated;
it is repeatedly rewritten with the same sequence of characters but
the strbuf functions never need to allocate a larger string, so the
same memory buffer is reused.

This "guarantee" of safety is somewhat subtle and could be overlooked
by someone who may want to add a more complex handling of the username
and password.  So, let's stop modifying this strbuf after we have
passed it to curl, but also leave a note to describe the assumptions
that have been made about username/password lifetime and to draw
attention to the code.

Signed-off-by: Brandon Casey <drafnel@gmail.com>
Acked-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agohandle multibyte characters in name
Fredrik Gustafsson [Fri, 14 Jun 2013 00:26:02 +0000 (02:26 +0200)] 
handle multibyte characters in name

Many "git submodule" operations do not work on a submodule at a path whose
name is not in ASCII.

This is because "git ls-files" is used to find which paths are bound to
submodules to the current working tree, and the output is C-quoted by default
for non ASCII pathnames.

Tell "git ls-files" to not C-quote its output, which is easier than unwrapping
C-quote ourselves.

Signed-off-by: Fredrik Gustafsson <iveqy@iveqy.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agoMerge branch 'maint-1.8.2' into maint
Junio C Hamano [Tue, 11 Jun 2013 21:24:56 +0000 (14:24 -0700)] 
Merge branch 'maint-1.8.2' into maint

* maint-1.8.2:
  t0070 "mktemp to unwritable directory" needs SANITY
  pre-push.sample: Make the script executable

10 years agot0070 "mktemp to unwritable directory" needs SANITY
Torsten Bögershausen [Sat, 8 Jun 2013 12:17:49 +0000 (14:17 +0200)] 
t0070 "mktemp to unwritable directory" needs SANITY

Use the SANITY prerequisite when testing if a temp file can
be created in a read only directory.
Skip the test under CYGWIN, or skip it under Unix/Linux when
it is run as root.

Signed-off-by: Torsten Bögershausen <tboegi@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agopre-push.sample: Make the script executable
Wieland Hoffmann [Tue, 11 Jun 2013 12:14:56 +0000 (14:14 +0200)] 
pre-push.sample: Make the script executable

githooks(5) says that "[...]the .sample files are executable by default"
which was not true.

Signed-off-by: Wieland Hoffmann <themineo@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agoGit 1.8.3.1 v1.8.3.1
Junio C Hamano [Mon, 10 Jun 2013 00:16:20 +0000 (17:16 -0700)] 
Git 1.8.3.1

Primarily to push out two regression issues that seem to affect many
people, namely, the ".gitignore !directory" bug and "daemon cannot
read from $HOME owned by root" bug.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agomingw: make mingw_signal return the correct handler
Erik Faye-Lund [Mon, 10 Jun 2013 05:48:17 +0000 (07:48 +0200)] 
mingw: make mingw_signal return the correct handler

Returning the SIGALRM handler for SIGINT is not very useful.

Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com>
Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agoMerge branch 'jn/config-ignore-inaccessible' into maint
Junio C Hamano [Mon, 10 Jun 2013 00:06:55 +0000 (17:06 -0700)] 
Merge branch 'jn/config-ignore-inaccessible' into maint

A git daemon that starts as "root" and then drops privilege often
leaves $HOME set to that of the root user, which is unreadable by
the daemon process, which was diagnosed as a configuration error.

Make per-user configuration files that are inaccessible due to
EACCES as though these files do not exist to avoid this issue, as
the tightening which was originally meant as an additional security
has annoyed enough sysadmins.

* jn/config-ignore-inaccessible:
  config: allow inaccessible configuration under $HOME

10 years agoMerge branch 'kb/status-ignored-optim-2' into maint
Junio C Hamano [Mon, 10 Jun 2013 00:05:15 +0000 (17:05 -0700)] 
Merge branch 'kb/status-ignored-optim-2' into maint

Fix recent regression of .gitignore files that list !directory to
mark it not-ignored.

* kb/status-ignored-optim-2:
  dir.c: fix ignore processing within not-ignored directories

10 years agosubmodule: remove redundant check for the_index.initialized
René Scharfe [Sun, 9 Jun 2013 16:33:45 +0000 (18:33 +0200)] 
submodule: remove redundant check for the_index.initialized

read_cache already performs the same check and returns immediately if
the cache has already been loaded.

Signed-off-by: René Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agoDocument .git/modules
Fredrik Gustafsson [Sun, 9 Jun 2013 11:11:36 +0000 (13:11 +0200)] 
Document .git/modules

A note in the beginning of this document describes the behavior already.
This patch just adds where to find the repositories.

Signed-off-by: Fredrik Gustafsson <iveqy@iveqy.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agogitweb: fix problem causing erroneous project list
Charles McGarvey [Wed, 5 Jun 2013 04:44:28 +0000 (22:44 -0600)] 
gitweb: fix problem causing erroneous project list

The bug is manifest when running gitweb in a persistent process (e.g.
FastCGI, PSGI), and it's easy to reproduce.  If a gitweb request
includes the searchtext parameter (i.e. s), subsequent requests using
the project_list action--which is the default action--and without
a searchtext parameter will be filtered by the searchtext value of the
first request.  This is because the value of the $search_regexp global
(the value of which is based on the searchtext parameter) is currently
being persisted between requests.

Instead, clear $search_regexp before dispatching each request.

Signed-off-by: Charles McGarvey <chazmcgarvey@brokenzipper.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agosequencer: avoid leaking message buffer when refusing to create an empty commit
Felipe Contreras [Thu, 6 Jun 2013 08:58:57 +0000 (03:58 -0500)] 
sequencer: avoid leaking message buffer when refusing to create an empty commit

We should free objects before leaving.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agotest-send-email: test for pre-sanitized self name
Michael S. Tsirkin [Wed, 5 Jun 2013 18:11:08 +0000 (21:11 +0300)] 
test-send-email: test for pre-sanitized self name

Users can sanitize from address manually.
Verify that these are suppressed properly.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agot/send-email: test suppress-cc=self with non-ascii
Michael S. Tsirkin [Wed, 5 Jun 2013 18:11:04 +0000 (21:11 +0300)] 
t/send-email: test suppress-cc=self with non-ascii

test suppress-cc=self when sender is non-acsii

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agot/send-email: add test with quoted sender
Michael S. Tsirkin [Wed, 5 Jun 2013 18:11:02 +0000 (21:11 +0300)] 
t/send-email: add test with quoted sender

add test where sender address needs to be quoted.
Make sure --suppress-cc=self works well in this case.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agosend-email: make --suppress-cc=self sanitize input
Michael S. Tsirkin [Wed, 5 Jun 2013 18:11:00 +0000 (21:11 +0300)] 
send-email: make --suppress-cc=self sanitize input

--suppress-cc=self fails to filter sender address in many cases where it
needs to be sanitized in some way, for example quoted:
"A U. Thor" <author@example.com>
To fix, make send-email sanitize both sender and the address it is
compared against.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agot/send-email: test suppress-cc=self on cccmd
Michael S. Tsirkin [Wed, 5 Jun 2013 18:10:57 +0000 (21:10 +0300)] 
t/send-email: test suppress-cc=self on cccmd

Check that suppress-cc=self works when applied
to output of cccmd.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agosend-email: fix suppress-cc=self on cccmd
Michael S. Tsirkin [Wed, 5 Jun 2013 18:10:55 +0000 (21:10 +0300)] 
send-email: fix suppress-cc=self on cccmd

When cccmd is used, old-style suppress-from filter
is applied by the newer suppress-cc=self isn't.
Fix this up.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agot/README: test_must_fail is for testing Git
Junio C Hamano [Tue, 4 Jun 2013 16:50:12 +0000 (09:50 -0700)] 
t/README: test_must_fail is for testing Git

When a test wants to make sure there is no <string> in an output
file, we should just say "! grep string output".

"test_must_fail" is there only to test Git command and catch unusual
deaths we know about (e.g. segv) as an error, not as an expected
failure.  "test_must_fail grep string output" is unnecessary, as
we are not making sure the system binaries do not dump core or
anything like that.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agosequencer: remove useless indentation
Felipe Contreras [Wed, 29 May 2013 03:56:21 +0000 (22:56 -0500)] 
sequencer: remove useless indentation

By using good ol' goto.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agodiffcore-pickaxe doc: document -S and -G properly
Ramkumar Ramachandra [Fri, 31 May 2013 12:12:15 +0000 (17:42 +0530)] 
diffcore-pickaxe doc: document -S and -G properly

The documentation of -S and -G is very sketchy.  Completely rewrite the
sections in Documentation/diff-options.txt and
Documentation/gitdiffcore.txt.

References:
52e9578 ([PATCH] Introducing software archaeologist's tool "pickaxe".)
f506b8e (git log/diff: add -G<regexp> that greps in the patch text)

Inputs-from: Phil Hord <phil.hord@gmail.com>
Co-authored-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agodiffcore-pickaxe: make error messages more consistent
Ramkumar Ramachandra [Fri, 31 May 2013 12:12:14 +0000 (17:42 +0530)] 
diffcore-pickaxe: make error messages more consistent

Currently, diffcore-pickaxe reports two distinct errors for the same
user error:

    $ git log --pickaxe-regex -S'\1'
    fatal: invalid pickaxe regex: Invalid back reference

    $ git log -G'\1'
    fatal: invalid log-grep regex: Invalid back reference

This "log-grep" was only an internal name for the -G feature during
development, and invite confusion with "git log --grep=<pattern>".

Change the error messages to say "invalid regex".

Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agogit.txt: remove stale comment regarding GIT_WORK_TREE
Chris Rorvick [Fri, 31 May 2013 01:11:41 +0000 (20:11 -0500)] 
git.txt: remove stale comment regarding GIT_WORK_TREE

Official support for specifying --work-tree/GIT_WORK_TREE without
--git-dir/GIT_DIR was added with v1.7.4-rc3~2^2~2.  Update description
of GIT_WORK_TREE to reflect this.

Signed-off-by: Chris Rorvick <chris@rorvick.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agosha1_file: trivial style cleanup
Felipe Contreras [Thu, 30 May 2013 13:56:21 +0000 (08:56 -0500)] 
sha1_file: trivial style cleanup

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agoread-cache: trivial style cleanups
Felipe Contreras [Thu, 30 May 2013 13:56:19 +0000 (08:56 -0500)] 
read-cache: trivial style cleanups

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agoread-cache: fix wrong 'the_index' usage
Felipe Contreras [Thu, 30 May 2013 13:56:18 +0000 (08:56 -0500)] 
read-cache: fix wrong 'the_index' usage

We are dealing with the 'istate' index, not 'the_index'.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agot/send-email.sh: add test for suppress-cc=self
Michael S. Tsirkin [Thu, 30 May 2013 07:11:13 +0000 (10:11 +0300)] 
t/send-email.sh: add test for suppress-cc=self

This adds a basic test for --suppress-cc=self
option of git send-email.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agodir.c: fix ignore processing within not-ignored directories
Karsten Blees [Wed, 29 May 2013 20:32:36 +0000 (22:32 +0200)] 
dir.c: fix ignore processing within not-ignored directories

As of 95c6f271 "dir.c: unify is_excluded and is_path_excluded APIs", the
is_excluded API no longer recurses into directories that match an ignore
pattern, and returns the directory's ignored state for all contained paths.

This is OK for normal ignore patterns, i.e. ignoring a directory affects
the entire contents recursively.

Unfortunately, this also "works" for negated ignore patterns ('!dir'), i.e.
the entire contents is "not-ignored" recursively, regardless of ignore
patterns that match the contents directly.

In prep_exclude, skip recursing into a directory only if it is really
ignored (i.e. the ignore pattern is not negated).

Signed-off-by: Karsten Blees <blees@dcon.de>
Tested-by: Øystein Walle <oystwa@gmail.com>
Reviewed-by: Duy Nguyen <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agowildmatch: properly fold case everywhere
Anthony Ramine [Thu, 30 May 2013 10:19:10 +0000 (12:19 +0200)] 
wildmatch: properly fold case everywhere

Case folding is not done correctly when matching against the [:upper:]
character class and uppercased character ranges (e.g. A-Z).
Specifically, an uppercase letter fails to match against any of them
when case folding is requested because plain characters in the pattern
and the whole string are preemptively lowercased to handle the base case
fast.

That optimization is kept and ISLOWER() is used in the [:upper:] case
when case folding is requested, while matching against a character range
is retried with toupper() if the character was lowercase, as the bounds
of the range itself cannot be modified (in a case-insensitive context,
[A-_] is not equivalent to [a-_]).

Signed-off-by: Anthony Ramine <n.oxyde@gmail.com>
Reviewed-by: Duy Nguyen <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agosha1_name: fix error message for @{<N>}, @{<date>}
Ramkumar Ramachandra [Wed, 22 May 2013 10:39:55 +0000 (16:09 +0530)] 
sha1_name: fix error message for @{<N>}, @{<date>}

Currently, when we try to resolve @{<N>} or @{<date>} when the reflog
doesn't go back far enough, we get errors like:

  # on branch master
  $ git show @{10000}
  fatal: Log for '' only has 7 entries.

  $ git show @{10000.days.ago}
  warning: Log for '' only goes back to Tue, 21 May 2013 14:14:45 +0530.
  ...

  # detached HEAD case
  $ git show @{10000}
  fatal: Log for '' only has 2005 entries.

  $ git show master@{10000}
  fatal: Log for 'master' only has 7 entries.

The empty string '' is confusing and does not convey information
about whose logs we are inspecting.  Change this so that we get:

  # on branch master
  $ git show @{10000}
  fatal: Log for 'master' only has 7 entries.

  $ git show @{10000.days.ago}
  warning: Log for 'master' only goes back to Tue, 21 May 2013 14:14:45 +0530.
  ...

  # detached HEAD case
  $ git show @{10000}
  fatal: Log for 'HEAD' only has 2005 entries.

  $ git show master@{10000}
  fatal: Log for 'master' only has 7 entries.

Also one of the message strings given to die() now points into
real_ref that was not used in that fashion, so stop freeing the
underlying storage for it.

Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Bug-spotted-and-fixed-by: Thomas Rast
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agopush: make push.default = current use resolved HEAD
Ramkumar Ramachandra [Wed, 29 May 2013 19:21:51 +0000 (00:51 +0530)] 
push: make push.default = current use resolved HEAD

With this change, the output of the push (with push.default set to
current) changes subtly from:

  $ git push
  ...
   * [new branch]      HEAD -> push-current-head

to:

  $ git push
  ...
   * [new branch]      push-current-head -> push-current-head

This patch was written with a different motivation. There is a problem
unique to push.default = current:

  # on branch push-current-head
  $ git push
  # on another terminal
  $ git checkout master
  # return to the first terminal
  # the push tried to push master!

This happens because the 'git checkout' on the second terminal races
with the 'git push' on the first terminal.  Although this patch does not
solve the core problem (there is still no guarantee that 'git push' on
the first terminal will resolve HEAD before 'git checkout' changes HEAD
on the second), it works in practice.

Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agopush: fail early with detached HEAD and current
Ramkumar Ramachandra [Wed, 29 May 2013 19:21:50 +0000 (00:51 +0530)] 
push: fail early with detached HEAD and current

Setting push.default to current adds the refspec "HEAD" for the
transport layer to handle.  If "HEAD" doesn't resolve to a branch (and
since no refspec rhs is specified), the push fails after some time with
a cryptic error message:

  $ git push
  error: unable to push to unqualified destination: HEAD
  The destination refspec neither matches an existing ref on the remote nor
  begins with refs/, and we are unable to guess a prefix based on the source ref.
  error: failed to push some refs to 'git@github.com:artagnon/git'

Fail early with a nicer error message:

  $ git push
  fatal: You are not currently on a branch.
  To push the history leading to the current (detached HEAD)
  state now, use

    git push ram HEAD:<name-of-remote-branch>

Just like in the upstream and simple cases.

Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agoStart 1.8.3.1 maintenance track
Junio C Hamano [Wed, 29 May 2013 22:21:15 +0000 (15:21 -0700)] 
Start 1.8.3.1 maintenance track

Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agoMerge branch 'maint-1.8.2' into maint
Junio C Hamano [Wed, 29 May 2013 22:20:36 +0000 (15:20 -0700)] 
Merge branch 'maint-1.8.2' into maint

* maint-1.8.2:
  trivial: Add missing period in documentation

10 years agodifftool --dir-diff: allow changing any clean working tree file
Kenichi Saita [Wed, 29 May 2013 16:01:23 +0000 (01:01 +0900)] 
difftool --dir-diff: allow changing any clean working tree file

The temporary directory prepared by "difftool --dir-diff" to
show the result of a change can be modified by the user via
the tree diff program, and we try hard not to lose changes
to them after tree diff program returns to us.

However, the set of files to be copied back is computed
differently between --symlinks and --no-symlinks modes.  The
former checks all paths that start out as identical to the
working tree file, while the latter checks paths that
already had a local modification in the working tree,
allowing changes made in the tree diff program to paths that
did not have any local change to be lost.

Signed-off-by: Kenichi Saita <nitoyon@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agopush: factor out the detached HEAD error message
Ramkumar Ramachandra [Wed, 29 May 2013 19:21:49 +0000 (00:51 +0530)] 
push: factor out the detached HEAD error message

With push.default set to upstream or simple, and a detached HEAD, git
push prints the following error:

  $ git push
  fatal: You are not currently on a branch.
  To push the history leading to the current (detached HEAD)
  state now, use

    git push ram HEAD:<name-of-remote-branch>

This error is not unique to upstream or simple: current cannot push with
a detached HEAD either.  So, factor out the error string in preparation
for using it in current.

Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agoprompt: fix for simple rebase
Felipe Contreras [Wed, 29 May 2013 06:21:28 +0000 (01:21 -0500)] 
prompt: fix for simple rebase

When we are rebasing without options ('am' mode), the head rebased lives
in '$g/rebase-apply/head-name', so lets use that information so it's
reported the same way as if we were doing other rebases (-i or -m).

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agotrivial: Add missing period in documentation
Phil Hord [Tue, 28 May 2013 19:36:44 +0000 (19:36 +0000)] 
trivial: Add missing period in documentation

Signed-off-by: Phil Hord <hordp@cisco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agocommit: don't start editor if empty message is given with -m
René Scharfe [Sat, 25 May 2013 21:43:34 +0000 (23:43 +0200)] 
commit: don't start editor if empty message is given with -m

If an empty message is specified with the option -m of git commit then
the editor is started.  That's unexpected and unnecessary.  Instead of
using the length of the message string for checking if the user
specified one, directly remember if the option -m was given.

Reported-by: Mislav Marohnić <mislav.marohnic@gmail.com>
Signed-off-by: René Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agofix segfault with git log -c --follow
Clemens Buchacher [Mon, 27 May 2013 22:49:57 +0000 (00:49 +0200)] 
fix segfault with git log -c --follow

In diff_tree_combined we make a copy of diffopts. In
try_to_follow_renames, called via diff_tree_sha1, we free and
re-initialize diffopts->pathspec->items. Since we did not make a deep
copy of diffopts in diff_tree_combined, the original diffopts does not
get the update. By the time we return from diff_tree_combined,
rev->diffopt->pathspec->items points to an invalid memory address. We
get a segfault next time we try to access that pathspec.

Instead, along with the copy of diffopts, make a copy pathspec->items as
well.

We would also have to make a copy of pathspec->raw to keep it consistent
with pathspec->items, but nobody seems to rely on that.

Signed-off-by: Clemens Buchacher <drizzd@aon.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agofetch-pack: prepare updated shallow file before fetching the pack
Nguyễn Thái Ngọc Duy [Sun, 26 May 2013 01:16:15 +0000 (08:16 +0700)] 
fetch-pack: prepare updated shallow file before fetching the pack

index-pack --strict looks up and follows parent commits. If shallow
information is not ready by the time index-pack is run, index-pack may
be led to non-existent objects. Make fetch-pack save shallow file to
disk before invoking index-pack.

git learns new global option --shallow-file to pass on the alternate
shallow file path. Undocumented (and not even support --shallow-file=
syntax) because it's unlikely to be used again elsewhere.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>