]> git.ipfire.org Git - thirdparty/git.git/log
thirdparty/git.git
9 years agoMerge branch 'js/completion-ctags-pattern-substitution-fix'
Junio C Hamano [Mon, 23 Mar 2015 18:28:16 +0000 (11:28 -0700)] 
Merge branch 'js/completion-ctags-pattern-substitution-fix'

The code that reads from the ctags file in the completion script
(in contrib/) did not spell ${param/pattern/string} substitution
correctly, which happened to work with bash but not with zsh.

* js/completion-ctags-pattern-substitution-fix:
  contrib/completion: escape the forward slash in __git_match_ctag

9 years agoMerge branch 'jk/push-config'
Junio C Hamano [Mon, 23 Mar 2015 18:28:13 +0000 (11:28 -0700)] 
Merge branch 'jk/push-config'

Restructure "git push" codepath to make it easier to add new
configuration bits and then add push.followTags configuration that
turns --follow-tags option on by default.

* jk/push-config:
  push: allow --follow-tags to be set by config push.followTags
  cmd_push: pass "flags" pointer to config callback
  cmd_push: set "atomic" bit directly
  git_push_config: drop cargo-culted wt_status pointer

9 years agoMerge branch 'nd/config-doc-camelCase'
Junio C Hamano [Mon, 23 Mar 2015 18:28:12 +0000 (11:28 -0700)] 
Merge branch 'nd/config-doc-camelCase'

Documentation updates.

* nd/config-doc-camelCase:
  *config.txt: stick to camelCase naming convention

9 years agoMerge branch 'jk/test-annoyances'
Junio C Hamano [Mon, 23 Mar 2015 18:28:10 +0000 (11:28 -0700)] 
Merge branch 'jk/test-annoyances'

Test fixes.

* jk/test-annoyances:
  t5551: make EXPENSIVE test cheaper
  t5541: move run_with_cmdline_limit to test-lib.sh
  t: pass GIT_TRACE through Apache
  t: redirect stderr GIT_TRACE to descriptor 4
  t: translate SIGINT to an exit

9 years agoMerge branch 'jk/smart-http-hide-refs'
Junio C Hamano [Mon, 23 Mar 2015 18:28:08 +0000 (11:28 -0700)] 
Merge branch 'jk/smart-http-hide-refs'

The transfer.hiderefs support did not quite work for smart-http
transport.

* jk/smart-http-hide-refs:
  upload-pack: do not check NULL return of lookup_unknown_object
  upload-pack: fix transfer.hiderefs over smart-http

9 years agoMerge branch 'jk/tag-h-column-is-a-listing-option'
Junio C Hamano [Mon, 23 Mar 2015 18:28:02 +0000 (11:28 -0700)] 
Merge branch 'jk/tag-h-column-is-a-listing-option'

"git tag -h" used to show the "--column" and "--sort" options
that are about listing in a wrong section.

* jk/tag-h-column-is-a-listing-option:
  tag: fix some mis-organized options in "-h" listing

9 years agoPost 2.3 cycle (batch #11)
Junio C Hamano [Fri, 20 Mar 2015 20:31:53 +0000 (13:31 -0700)] 
Post 2.3 cycle (batch #11)

Signed-off-by: Junio C Hamano <gitster@pobox.com>
9 years agoMerge branch 'mg/log-decorate-HEAD'
Junio C Hamano [Fri, 20 Mar 2015 20:51:24 +0000 (13:51 -0700)] 
Merge branch 'mg/log-decorate-HEAD'

Output from "git log --decorate" mentions HEAD when it points at a
tip of an branch differently from a detached HEAD.

This is a potentially backward-incompatible change.

* mg/log-decorate-HEAD:
  log: decorate HEAD with branch name

9 years agoMerge branch 'jc/decorate-leaky-separator-color'
Junio C Hamano [Fri, 20 Mar 2015 20:50:51 +0000 (13:50 -0700)] 
Merge branch 'jc/decorate-leaky-separator-color'

"git log --decorate" did not reset colors correctly around the
branch names.

* jc/decorate-leaky-separator-color:
  log --decorate: do not leak "commit" color into the next item
  Documentation/config.txt: simplify boolean description in the syntax section
  Documentation/config.txt: describe 'color' value type in the "Values" section
  Documentation/config.txt: have a separate "Values" section
  Documentation/config.txt: describe the structure first and then meaning
  Documentation/config.txt: explain multi-valued variables once
  Documentation/config.txt: avoid unnecessary negation

9 years agoMerge branch 'sb/leaks'
Junio C Hamano [Fri, 20 Mar 2015 20:11:53 +0000 (13:11 -0700)] 
Merge branch 'sb/leaks'

Code cleanup.

* sb/leaks:
  builtin/help.c: fix memory leak
  bundle.c: fix memory leak
  connect.c: do not leak "conn" after showing diagnosis

9 years agoMerge branch 'rs/use-isxdigit'
Junio C Hamano [Fri, 20 Mar 2015 20:11:52 +0000 (13:11 -0700)] 
Merge branch 'rs/use-isxdigit'

Code cleanup.

* rs/use-isxdigit:
  use isxdigit() for checking if a character is a hexadecimal digit

9 years agoMerge branch 'mg/verify-commit'
Junio C Hamano [Fri, 20 Mar 2015 20:11:51 +0000 (13:11 -0700)] 
Merge branch 'mg/verify-commit'

Workarounds for certain build of GPG that triggered false breakage
in a test.

* mg/verify-commit:
  t7510: do not fail when gpg warns about insecure memory

9 years agoMerge branch 'km/imap-send-libcurl-options'
Junio C Hamano [Fri, 20 Mar 2015 20:11:50 +0000 (13:11 -0700)] 
Merge branch 'km/imap-send-libcurl-options'

"git imap-send" learned to optionally talk with an IMAP server via
libcURL; because there is no other option when Git is built with
NO_OPENSSL option, use that codepath by default under such
configuration.

* km/imap-send-libcurl-options:
  imap-send: use cURL automatically when NO_OPENSSL defined

9 years agoMerge branch 'km/bsd-sysctl'
Junio C Hamano [Fri, 20 Mar 2015 20:11:49 +0000 (13:11 -0700)] 
Merge branch 'km/bsd-sysctl'

We now detect number of CPUs on older BSD-derived systems.

* km/bsd-sysctl:
  thread-utils.c: detect CPU count on older BSD-like systems
  configure: support HAVE_BSD_SYSCTL option

9 years agoMerge branch 'km/bsd-shells'
Junio C Hamano [Fri, 20 Mar 2015 20:11:48 +0000 (13:11 -0700)] 
Merge branch 'km/bsd-shells'

Portability fixes and workarounds for shell scripts have been added
to help BSD-derived systems.

* km/bsd-shells:
  t5528: do not fail with FreeBSD shell
  help.c: use SHELL_PATH instead of hard-coded "/bin/sh"
  git-compat-util.h: move SHELL_PATH default into header
  git-instaweb: use @SHELL_PATH@ instead of /bin/sh
  git-instaweb: allow running in a working tree subdirectory

9 years agoMerge branch 'rs/daemon-hostname-in-strbuf'
Junio C Hamano [Fri, 20 Mar 2015 20:11:47 +0000 (13:11 -0700)] 
Merge branch 'rs/daemon-hostname-in-strbuf'

Code in "git daemon" to parse out and hold hostnames used in
request interpolation has been simplified.

* rs/daemon-hostname-in-strbuf:
  daemon: deglobalize hostname information
  daemon: use strbuf for hostname info

9 years agoMerge branch 'mg/detached-head-report'
Junio C Hamano [Fri, 20 Mar 2015 20:11:46 +0000 (13:11 -0700)] 
Merge branch 'mg/detached-head-report'

"git branch" on a detached HEAD always said "(detached from xyz)",
even when "git status" would report "detached at xyz".  The HEAD is
actually at xyz and haven't been moved since it was detached in
such a case, but the user cannot read what the current value of
HEAD is when "detached from" is used.

* mg/detached-head-report:
  branch: name detached HEAD analogous to status
  wt-status: refactor detached HEAD analysis

9 years agoMerge branch 'kn/git-cd-to-empty'
Junio C Hamano [Fri, 20 Mar 2015 20:11:46 +0000 (13:11 -0700)] 
Merge branch 'kn/git-cd-to-empty'

"git -C '' subcmd" refused to work in the current directory, unlike
"cd ''" which silently behaves as a no-op.

* kn/git-cd-to-empty:
  git: treat "git -C '<path>'" as a no-op when <path> is empty

9 years agoMerge branch 'nd/versioncmp-prereleases'
Junio C Hamano [Fri, 20 Mar 2015 20:11:45 +0000 (13:11 -0700)] 
Merge branch 'nd/versioncmp-prereleases'

The versionsort.prerelease configuration variable can be used to
specify that v1.0-pre1 comes before v1.0.

* nd/versioncmp-prereleases:
  config.txt: update versioncmp.prereleaseSuffix
  versionsort: support reorder prerelease suffixes

9 years agoPost 2.3 cyce (batch #10)
Junio C Hamano [Tue, 17 Mar 2015 23:05:12 +0000 (16:05 -0700)] 
Post 2.3 cyce (batch #10)

Also declare that the next one will be called v2.4 ;-)

Signed-off-by: Junio C Hamano <gitster@pobox.com>
9 years agoMerge branch 'mg/doc-status-color-slot'
Junio C Hamano [Tue, 17 Mar 2015 23:01:34 +0000 (16:01 -0700)] 
Merge branch 'mg/doc-status-color-slot'

Documentation fixes.

* mg/doc-status-color-slot:
  config,completion: add color.status.unmerged

9 years agoMerge branch 'mg/status-v-v'
Junio C Hamano [Tue, 17 Mar 2015 23:01:33 +0000 (16:01 -0700)] 
Merge branch 'mg/status-v-v'

"git status" now allows the "-v" to be given twice to show the
differences that are left in the working tree not to be committed.

* mg/status-v-v:
  commit/status: show the index-worktree diff with -v -v
  t7508: test git status -v
  t7508: .gitignore 'expect' and 'output' files

9 years agoMerge branch 'mg/sequencer-commit-messages-always-verbatim'
Junio C Hamano [Tue, 17 Mar 2015 23:01:31 +0000 (16:01 -0700)] 
Merge branch 'mg/sequencer-commit-messages-always-verbatim'

"git cherry-pick" used to clean-up the log message even when it is
merely replaying an existing commit.  It now replays the message
verbatim unless you are editing the message of resulting commits.

* mg/sequencer-commit-messages-always-verbatim:
  sequencer: preserve commit messages

9 years agoMerge branch 'sg/completion-remote'
Junio C Hamano [Tue, 17 Mar 2015 23:01:30 +0000 (16:01 -0700)] 
Merge branch 'sg/completion-remote'

Code simplification.

* sg/completion-remote:
  completion: simplify __git_remotes()
  completion: add a test for __git_remotes() helper function

9 years agoMerge branch 'es/rebase-i-count-todo'
Junio C Hamano [Tue, 17 Mar 2015 23:01:29 +0000 (16:01 -0700)] 
Merge branch 'es/rebase-i-count-todo'

"git rebase -i" recently started to include the number of
commits in the insn sheet to be processed, but on a platform
that prepends leading whitespaces to "wc -l" output, the numbers
are shown with extra whitespaces that aren't necessary.

* es/rebase-i-count-todo:
  rebase-interactive: re-word "item count" comment
  rebase-interactive: suppress whitespace preceding item count

9 years agoMerge branch 'ak/git-done-help-cleanup'
Junio C Hamano [Tue, 17 Mar 2015 23:01:28 +0000 (16:01 -0700)] 
Merge branch 'ak/git-done-help-cleanup'

Code simplification.

* ak/git-done-help-cleanup:
  git: make was_alias and done_help non-static

9 years agoMerge branch 'rs/zip-text'
Junio C Hamano [Tue, 17 Mar 2015 23:01:27 +0000 (16:01 -0700)] 
Merge branch 'rs/zip-text'

"git archive" can now be told to set the 'text' attribute in the
resulting zip archive.

* rs/zip-text:
  archive-zip: mark text files in archives

9 years agoMerge branch 'rs/deflate-init-cleanup'
Junio C Hamano [Tue, 17 Mar 2015 23:01:26 +0000 (16:01 -0700)] 
Merge branch 'rs/deflate-init-cleanup'

Code simplification.

* rs/deflate-init-cleanup:
  zlib: initialize git_zstream in git_deflate_init{,_gzip,_raw}

9 years agocontrib/completion: escape the forward slash in __git_match_ctag
John Szakmeister [Sat, 14 Mar 2015 13:40:39 +0000 (09:40 -0400)] 
contrib/completion: escape the forward slash in __git_match_ctag

The current definition results in an incorrect expansion of the term under zsh.
For instance "/^${1////\\/}/" under zsh with the argument "hi" results in:
    /^/\/h/\/i/

This results in an output similar to this when trying to complete `git grep
chartab` under zsh:

    :: git grep chartabawk: cmd. line:1: /^/\/c/\/h/\/a/\/r/\/t/\/a/\/b/ { print $1 }
    awk: cmd. line:1:    ^ backslash not last character on line
    awk: cmd. line:1: /^/\/c/\/h/\/a/\/r/\/t/\/a/\/b/ { print $1 }
    awk: cmd. line:1:    ^ syntax error

Leaving the prompt in a goofy state until the user hits a key.

Escaping the literal / in the parameter expansion (using "/^${1//\//\\/}/")
results in:
    /^chartab/

allowing the completion to work correctly.

This formulation also works under bash.

Signed-off-by: John Szakmeister <john@szakmeister.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
9 years agopush: allow --follow-tags to be set by config push.followTags
Dave Olszewski [Mon, 16 Feb 2015 06:16:19 +0000 (01:16 -0500)] 
push: allow --follow-tags to be set by config push.followTags

Signed-off-by: Dave Olszewski <cxreg@pobox.com>
Helped-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
9 years agoSync with 2.3.3
Junio C Hamano [Sat, 14 Mar 2015 06:11:50 +0000 (23:11 -0700)] 
Sync with 2.3.3

9 years agoGit 2.3.3 v2.3.3
Junio C Hamano [Sat, 14 Mar 2015 05:57:25 +0000 (22:57 -0700)] 
Git 2.3.3

Signed-off-by: Junio C Hamano <gitster@pobox.com>
9 years agoMerge branch 'mr/doc-clean-f-f' into maint
Junio C Hamano [Sat, 14 Mar 2015 05:56:12 +0000 (22:56 -0700)] 
Merge branch 'mr/doc-clean-f-f' into maint

Documentation update.

* mr/doc-clean-f-f:
  Documentation/git-clean.txt: document that -f may need to be given twice

9 years agoMerge branch 'ak/t5516-typofix' into maint
Junio C Hamano [Sat, 14 Mar 2015 05:56:11 +0000 (22:56 -0700)] 
Merge branch 'ak/t5516-typofix' into maint

* ak/t5516-typofix:
  t5516: correct misspelled pushInsteadOf

9 years agoMerge branch 'jc/diff-test-updates' into maint
Junio C Hamano [Sat, 14 Mar 2015 05:56:09 +0000 (22:56 -0700)] 
Merge branch 'jc/diff-test-updates' into maint

Test clean-up.

* jc/diff-test-updates:
  test_ln_s_add: refresh stat info of fake symbolic links
  t4008: modernise style
  t/diff-lib: check exact object names in compare_diff_raw
  tests: do not borrow from COPYING and README from the real source
  t4010: correct expected object names
  t9300: correct expected object names
  t4008: correct stale comments

9 years agoMerge branch 'jk/diffcore-rename-duplicate' into maint
Junio C Hamano [Sat, 14 Mar 2015 05:56:08 +0000 (22:56 -0700)] 
Merge branch 'jk/diffcore-rename-duplicate' into maint

A corrupt input to "git diff -M" can cause us to segfault.

* jk/diffcore-rename-duplicate:
  diffcore-rename: avoid processing duplicate destinations
  diffcore-rename: split locate_rename_dst into two functions

9 years agoMerge branch 'bw/kwset-use-unsigned' into maint
Junio C Hamano [Sat, 14 Mar 2015 05:56:07 +0000 (22:56 -0700)] 
Merge branch 'bw/kwset-use-unsigned' into maint

The borrowed code in kwset API did not follow our usual convention
to use "unsigned char" to store values that range from 0-255.

* bw/kwset-use-unsigned:
  kwset: use unsigned char to store values with high-bit set

9 years agoMerge branch 'nd/grep-exclude-standard-help-fix' into maint
Junio C Hamano [Sat, 14 Mar 2015 05:56:06 +0000 (22:56 -0700)] 
Merge branch 'nd/grep-exclude-standard-help-fix' into maint

Description given by "grep -h" for its --exclude-standard option
was phrased poorly.

* nd/grep-exclude-standard-help-fix:
  grep: correct help string for --exclude-standard

9 years agoMerge branch 'mg/doc-remote-tags-or-not' into maint
Junio C Hamano [Sat, 14 Mar 2015 05:56:05 +0000 (22:56 -0700)] 
Merge branch 'mg/doc-remote-tags-or-not' into maint

"git remote add" mentioned "--tags" and "--no-tags" and was not
clear that fetch from the remote in the future will use the default
behaviour when neither is given to override it.

* mg/doc-remote-tags-or-not:
  git-remote.txt: describe behavior without --tags and --no-tags

9 years agoMerge branch 'mk/diff-shortstat-dirstat-fix' into maint
Junio C Hamano [Sat, 14 Mar 2015 05:56:04 +0000 (22:56 -0700)] 
Merge branch 'mk/diff-shortstat-dirstat-fix' into maint

"git diff --shortstat --dirstat=changes" showed a dirstat based on
lines that was never asked by the end user in addition to the
dirstat that the user asked for.

* mk/diff-shortstat-dirstat-fix:
  diff --shortstat --dirstat: remove duplicate output

9 years agoMerge branch 'ms/submodule-update-config-doc' into maint
Junio C Hamano [Sat, 14 Mar 2015 05:56:03 +0000 (22:56 -0700)] 
Merge branch 'ms/submodule-update-config-doc' into maint

The interaction between "git submodule update" and the
submodule.*.update configuration was not clearly documented.

* ms/submodule-update-config-doc:
  submodule: improve documentation of update subcommand

9 years agoMerge branch 'jc/apply-beyond-symlink' into maint
Junio C Hamano [Sat, 14 Mar 2015 05:56:02 +0000 (22:56 -0700)] 
Merge branch 'jc/apply-beyond-symlink' into maint

"git apply" was not very careful about reading from, removing,
updating and creating paths outside the working tree (under
--index/--cached) or the current directory (when used as a
replacement for GNU patch).

* jc/apply-beyond-symlink:
  apply: do not touch a file beyond a symbolic link
  apply: do not read from beyond a symbolic link
  apply: do not read from the filesystem under --index
  apply: reject input that touches outside the working area

9 years agoMerge branch 'rs/daemon-interpolate' into maint
Junio C Hamano [Sat, 14 Mar 2015 05:56:00 +0000 (22:56 -0700)] 
Merge branch 'rs/daemon-interpolate' into maint

"git daemon" looked up the hostname even when "%CH" and "%IP"
interpolations are not requested, which was unnecessary.

* rs/daemon-interpolate:
  daemon: use callback to build interpolated path
  daemon: look up client-supplied hostname lazily

9 years agoMerge branch 'jk/daemon-interpolate' into maint
Junio C Hamano [Sat, 14 Mar 2015 05:55:59 +0000 (22:55 -0700)] 
Merge branch 'jk/daemon-interpolate' into maint

The "interpolated-path" option of "git daemon" inserted any string
client declared on the "host=" capability request without checking.
Sanitize and limit %H and %CH to a saner and a valid DNS name.

* jk/daemon-interpolate:
  daemon: sanitize incoming virtual hostname
  t5570: test git-daemon's --interpolated-path option
  git_connect: let user override virtual-host we send to daemon

9 years ago*config.txt: stick to camelCase naming convention
Nguyễn Thái Ngọc Duy [Wed, 11 Mar 2015 20:32:45 +0000 (16:32 -0400)] 
*config.txt: stick to camelCase naming convention

This should improve readability. Compare "thislongname" and
"thisLongName". The following keys are left in unchanged. We can
decide what to do with them later.

 - am.keepcr
 - core.autocrlf .safecrlf .trustctime
 - diff.dirstat .noprefix
 - gitcvs.usecrlfattr
 - gui.blamehistoryctx .trustmtime
 - pull.twohead
 - receive.autogc
 - sendemail.signedoffbycc .smtpsslcertpath .suppresscc

Helped-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
9 years agot5551: make EXPENSIVE test cheaper
Jeff King [Fri, 13 Mar 2015 04:57:05 +0000 (00:57 -0400)] 
t5551: make EXPENSIVE test cheaper

We create 50,000 tags to check that we don't overflow the
command-line of fetch-pack. But by using run_with_cmdline_limit,
we can get the same effect with a much smaller number of
tags. This makes the test fast enough that we can drop the
EXPENSIVE prereq, which means people will actually run it.

It was not documented to do so, but this test was also the
only test of a clone-over-http that requires multiple POSTs
during the conversation. We can continue to test that by
dropping http.postbuffer to its minimum size, and checking
that we get two POSTs.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
9 years agot5541: move run_with_cmdline_limit to test-lib.sh
Jeff King [Fri, 13 Mar 2015 04:53:07 +0000 (00:53 -0400)] 
t5541: move run_with_cmdline_limit to test-lib.sh

We use this to test http pushing with a restricted
commandline. Other scripts (like t5551, which does http
fetching) will want to use it, too.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
9 years agot: pass GIT_TRACE through Apache
Jeff King [Fri, 13 Mar 2015 04:51:15 +0000 (00:51 -0400)] 
t: pass GIT_TRACE through Apache

Apache removes GIT_TRACE from the environment before running
git-http-backend. This can make it hard to debug the server
side of an http session. Let's let it through.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
9 years agot: redirect stderr GIT_TRACE to descriptor 4
Jeff King [Fri, 13 Mar 2015 04:50:56 +0000 (00:50 -0400)] 
t: redirect stderr GIT_TRACE to descriptor 4

If you run a test script like:

  GIT_TRACE=1 ./t0061-run-command.sh

you may get test failures, because some tests capture and
check the stderr output from git commands (and with
GIT_TRACE set to 1, the trace output will be included
there).

When we see GIT_TRACE set like this, we print a warning to
the user. However, we can do even better than that by just
pointing it to descriptor 4, which all tests leave connected
to the test script's stderr. That's likely what the user
intended (and any scripts that do want to see GIT_TRACE
output will set GIT_TRACE themselves).

Not only does this avoid false negatives in the tests, but
it means the user will actually see trace output for git
calls that redirect their stderr (whereas before, it was
sometimes confusingly buried in a file).

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
9 years agot: translate SIGINT to an exit
Jeff King [Fri, 13 Mar 2015 04:48:48 +0000 (00:48 -0400)] 
t: translate SIGINT to an exit

Right now if a test script receives SIGINT (e.g., because a
test was hanging and the user hit ^C), the shell exits
immediately. This can be annoying if the test script did any
global setup, like starting apache or git-daemon, as it will
not have an opportunity to clean up after itself. A
subsequent run of the test won't be able to start its own
daemon, and will either fail or skip the tests.

Instead, let's trap SIGINT to make sure we do a clean
shutdown, and just chain it to a normal exit (which will
trigger any cleanup).

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
9 years agoupload-pack: do not check NULL return of lookup_unknown_object
Jeff King [Fri, 13 Mar 2015 04:42:25 +0000 (00:42 -0400)] 
upload-pack: do not check NULL return of lookup_unknown_object

We check whether the return value of lookup_unknown_object
is NULL, but some code paths dereference it before our
check. This turns out not to be capable of causing a
segfault, though. The lookup_unknown_object function will
never return NULL, since the whole point is to allocate an
object struct if it does not find an existing one. So the
code here is not wrong, it is just confusing. Let's just
drop the NULL check.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
9 years agoupload-pack: fix transfer.hiderefs over smart-http
Jeff King [Fri, 13 Mar 2015 04:42:12 +0000 (00:42 -0400)] 
upload-pack: fix transfer.hiderefs over smart-http

When upload-pack advertises the refs (either for a normal,
non-stateless request, or for the initial contact in a
stateless one), we call for_each_ref with the send_ref
function as its callback. send_ref, in turn, calls
mark_our_ref, which checks whether the ref is hidden, and
sets OUR_REF or HIDDEN_REF on the object as appropriate.  If
it is hidden, mark_our_ref also returns "1" to signal
send_ref that the ref should not be advertised.

If we are not advertising refs, (i.e., the follow-up
invocation by an http client to send its "want" lines), we
use mark_our_ref directly as a callback to for_each_ref. Its
marking does the right thing, but when it then returns "1"
to for_each_ref, the latter interprets this as an error and
stops iterating. As a result, we skip marking all of the
refs that come lexicographically after it. Any "want" lines
from the client asking for those objects will fail, as they
were not properly marked with OUR_REF.

To solve this, we introduce a wrapper callback around
mark_our_ref which always returns 0 (even if the ref is
hidden, we want to keep iterating). We also tweak the
signature of mark_our_ref to exclude unnecessary parameters
that were present only to conform to the callback interface.
This should make it less likely for somebody to accidentally
use it as a callback in the future.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
9 years agotag: fix some mis-organized options in "-h" listing
Jeff King [Thu, 12 Mar 2015 18:15:09 +0000 (14:15 -0400)] 
tag: fix some mis-organized options in "-h" listing

Running "git tag -h" currently prints:

  [...]
  Tag creation options
      [...]
      --column[=<style>]    show tag list in columns
      --sort <type>         sort tags

  Tag listing options
      --contains <commit>   print only tags that contain the commit
      --points-at <object>  print only tags of the object

The "--column" and "--sort" options should go under the "Tag listing" group.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
9 years agobuiltin/help.c: fix memory leak
Stefan Beller [Mon, 9 Mar 2015 16:58:24 +0000 (09:58 -0700)] 
builtin/help.c: fix memory leak

Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
9 years agobundle.c: fix memory leak
Stefan Beller [Tue, 10 Mar 2015 23:51:48 +0000 (16:51 -0700)] 
bundle.c: fix memory leak

There was one continue statement without an accompanying `free(ref)`.
Instead of adding that, replace all the free&&continue with a goto
just after writing the refs, where we'd do the free anyway and then
reloop.

Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
9 years agouse isxdigit() for checking if a character is a hexadecimal digit
René Scharfe [Mon, 9 Mar 2015 22:46:54 +0000 (23:46 +0100)] 
use isxdigit() for checking if a character is a hexadecimal digit

Use the standard function isxdigit() to make the intent clearer and
avoid using magic constants.

Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
9 years agoconnect.c: do not leak "conn" after showing diagnosis
Stefan Beller [Mon, 9 Mar 2015 16:58:22 +0000 (09:58 -0700)] 
connect.c: do not leak "conn" after showing diagnosis

When git_connect() is called to see how the URL is parsed for
debugging purposes with CONNECT_DIAG_URL set, the variable conn is
leaked.  At this point in the codeflow, it only has its memory and
no other resource is associated with it, so it is sufficient to
clean it up by just freeing it.

Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
9 years agoconfig,completion: add color.status.unmerged
Michael J Gruber [Tue, 10 Mar 2015 16:11:09 +0000 (17:11 +0100)] 
config,completion: add color.status.unmerged

Reported-by: "Mladen B." <mladen074@gmail.com>
Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
9 years agot7510: do not fail when gpg warns about insecure memory
Kyle J. McKay [Mon, 9 Mar 2015 20:03:01 +0000 (13:03 -0700)] 
t7510: do not fail when gpg warns about insecure memory

Depending on how gpg was built, it may issue the following
message to stderr when run:

  Warning: using insecure memory!

When the test is collecting gpg output it is therefore not
enough to just match on a "gpg: " prefix it must also match
on a "Warning: " prefix wherever it needs to match lines
that have been produced by gpg.

Signed-off-by: Kyle J. McKay <mackyle@gmail.com>
Acked-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
9 years agot5528: do not fail with FreeBSD shell
Kyle J. McKay [Sun, 8 Mar 2015 15:37:50 +0000 (08:37 -0700)] 
t5528: do not fail with FreeBSD shell

The FreeBSD shell converts this expression:

  git ${1:+-c push.default="$1"} push

to this when "$1" is not empty:

  git "-c push.default=$1" push

which causes git to fail.  To avoid this we simply break up the
expansion into two parts so that the whitespace which creates
two arguments instead of one is outside the ${...} like so:

  git ${1:+-c} ${1:+push.default="$1"} push

This has the desired effect on all platforms allowing the test
to pass on FreeBSD.

Signed-off-by: Kyle J. McKay <mackyle@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
9 years agoimap-send: use cURL automatically when NO_OPENSSL defined
Kyle J. McKay [Sun, 8 Mar 2015 05:13:55 +0000 (21:13 -0800)] 
imap-send: use cURL automatically when NO_OPENSSL defined

If both USE_CURL_FOR_IMAP_SEND and NO_OPENSSL are defined do
not force the user to add --curl to get a working git imap-send
command.

Instead automatically select --curl and warn and ignore the
--no-curl option.  And while we're in there, correct the
warning message when --curl is requested but not supported.

Signed-off-by: Kyle J. McKay <mackyle@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
9 years agolog: decorate HEAD with branch name
Junio C Hamano [Tue, 10 Mar 2015 13:53:21 +0000 (14:53 +0100)] 
log: decorate HEAD with branch name

Currently, log decorations do not indicate which branch is checked out
and whether HEAD is detached.

When branch foo is checked out, change the "HEAD, foo" part of the
decorations to "HEAD -> foo". This serves to indicate both ref
decorations (helped by the spacing) as well as their relationshsip.
As a consequence, "HEAD" without any " -> " denotes a detached HEAD now.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
9 years agoMerge branch 'jc/decorate-leaky-separator-color' into HEAD
Junio C Hamano [Tue, 10 Mar 2015 22:17:37 +0000 (15:17 -0700)] 
Merge branch 'jc/decorate-leaky-separator-color' into HEAD

* jc/decorate-leaky-separator-color:
  log --decorate: do not leak "commit" color into the next item
  Documentation/config.txt: simplify boolean description in the syntax section
  Documentation/config.txt: describe 'color' value type in the "Values" section
  Documentation/config.txt: have a separate "Values" section
  Documentation/config.txt: describe the structure first and then meaning
  Documentation/config.txt: explain multi-valued variables once
  Documentation/config.txt: avoid unnecessary negation

9 years agothread-utils.c: detect CPU count on older BSD-like systems
Kyle J. McKay [Sun, 8 Mar 2015 07:14:37 +0000 (23:14 -0800)] 
thread-utils.c: detect CPU count on older BSD-like systems

Not all systems support using sysconf to detect the number
of available CPU cores.  Older BSD and BSD-derived systems
only provide the information via the sysctl function.

If HAVE_BSD_SYSCTL is defined attempt to retrieve the number
of available CPU cores using the sysctl function.

If HAVE_BSD_SYSCTL is not defined or the sysctl function
fails, we still attempt to get the information via sysconf.

Signed-off-by: Kyle J. McKay <mackyle@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
9 years agoconfigure: support HAVE_BSD_SYSCTL option
Kyle J. McKay [Sun, 8 Mar 2015 07:14:36 +0000 (23:14 -0800)] 
configure: support HAVE_BSD_SYSCTL option

On BSD-compatible systems some information such as the number
of available CPUs may only be available via the sysctl function.

Add support for a HAVE_BSD_SYSCTL option complete with autoconf
support and include the sys/syctl.h header when the option is
enabled to make the sysctl function available.

Signed-off-by: Kyle J. McKay <mackyle@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
9 years agohelp.c: use SHELL_PATH instead of hard-coded "/bin/sh"
Kyle J. McKay [Sun, 8 Mar 2015 05:08:00 +0000 (21:08 -0800)] 
help.c: use SHELL_PATH instead of hard-coded "/bin/sh"

If the user has set SHELL_PATH in the Makefile then we
should respect that value and use it.

Signed-off-by: Kyle J. McKay <mackyle@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
9 years agogit-compat-util.h: move SHELL_PATH default into header
Kyle J. McKay [Sun, 8 Mar 2015 05:07:59 +0000 (21:07 -0800)] 
git-compat-util.h: move SHELL_PATH default into header

If SHELL_PATH is not defined we use "/bin/sh".  However,
run-command.c is not the only file that needs to use
the default value so move it into a common header.

Signed-off-by: Kyle J. McKay <mackyle@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
9 years agogit-instaweb: use @SHELL_PATH@ instead of /bin/sh
Kyle J. McKay [Sun, 8 Mar 2015 05:05:38 +0000 (21:05 -0800)] 
git-instaweb: use @SHELL_PATH@ instead of /bin/sh

If the user has configured a value for SHELL_PATH then
be sure to use it for any generated scripts instead of
hard-coding /bin/sh.

The first line of the script is handled specially, but
the embedded #!/bin/sh line in the here document will
not be automatically updated unless it uses @SHELL_PATH@.

Signed-off-by: Kyle J. McKay <mackyle@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
9 years agogit-instaweb: allow running in a working tree subdirectory
Kyle J. McKay [Sun, 8 Mar 2015 05:04:09 +0000 (21:04 -0800)] 
git-instaweb: allow running in a working tree subdirectory

Signed-off-by: Kyle J. McKay <mackyle@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
9 years agoPost 2.3 cycle (batch #9)
Junio C Hamano [Tue, 10 Mar 2015 20:53:49 +0000 (13:53 -0700)] 
Post 2.3 cycle (batch #9)

Signed-off-by: Junio C Hamano <gitster@pobox.com>
9 years agoMerge branch 'mh/expire-updateref-fixes'
Junio C Hamano [Tue, 10 Mar 2015 20:52:39 +0000 (13:52 -0700)] 
Merge branch 'mh/expire-updateref-fixes'

Various issues around "reflog expire", e.g. using --updateref when
expiring a reflog for a symbolic reference, have been corrected
and/or made saner.

* mh/expire-updateref-fixes:
  reflog_expire(): never update a reference to null_sha1
  reflog_expire(): ignore --updateref for symbolic references
  reflog: improve and update documentation
  struct ref_lock: delete the force_write member
  lock_ref_sha1_basic(): do not set force_write for missing references
  write_ref_sha1(): move write elision test to callers
  write_ref_sha1(): remove check for lock == NULL

9 years agoMerge branch 'jk/diffcore-rename-duplicate'
Junio C Hamano [Tue, 10 Mar 2015 20:52:38 +0000 (13:52 -0700)] 
Merge branch 'jk/diffcore-rename-duplicate'

A corrupt input to "git diff -M" can cause us to segfault.

* jk/diffcore-rename-duplicate:
  diffcore-rename: avoid processing duplicate destinations
  diffcore-rename: split locate_rename_dst into two functions

9 years agoconfig.txt: update versioncmp.prereleaseSuffix
Nguyễn Thái Ngọc Duy [Tue, 10 Mar 2015 10:16:35 +0000 (17:16 +0700)] 
config.txt: update versioncmp.prereleaseSuffix

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
9 years agodaemon: deglobalize hostname information
René Scharfe [Sat, 7 Mar 2015 10:50:37 +0000 (11:50 +0100)] 
daemon: deglobalize hostname information

Move the variables related to the client-supplied hostname into its own
struct, let execute() own an instance of that instead of storing the
information in global variables and pass the struct to any function that
needs to access it as a parameter.

The lifetime of the variables is easier to see this way.  Allocated
memory is released within execute().  The strbufs don't have to be reset
anymore because they are written to only once at most: parse_host_arg()
is only called once by execute() and lookup_hostname() guards against
being called twice using hostname_lookup_done.

Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
9 years agodaemon: use strbuf for hostname info
René Scharfe [Sat, 7 Mar 2015 10:50:29 +0000 (11:50 +0100)] 
daemon: use strbuf for hostname info

Convert hostname, canon_hostname, ip_address and tcp_port to strbuf.
This allows to get rid of the helpers strbuf_addstr_or_null() and STRARG
because a strbuf always represents a valid (initially empty) string.

sanitize_client() is not needed anymore and sanitize_client_strbuf()
takes its place and name.

Helped-by: Jeff King <peff@peff.net>
Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
9 years agogit: treat "git -C '<path>'" as a no-op when <path> is empty
Karthik Nayak [Fri, 6 Mar 2015 11:18:08 +0000 (16:48 +0530)] 
git: treat "git -C '<path>'" as a no-op when <path> is empty

'git -C ""' unhelpfully dies with error "Cannot change to ''",
whereas the shell treats `cd ""' as a no-op.  Taking the shell's
behavior as a precedent, teach git to treat `-C ""' as a no-op, as
well.

Helped-by: Junio C Hamano <gitster@pobox.com>
Helped-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Karthik Nayak <karthik.188@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
9 years agoPost 2.3 cycle (batch #8)
Junio C Hamano [Fri, 6 Mar 2015 23:05:39 +0000 (15:05 -0800)] 
Post 2.3 cycle (batch #8)

Signed-off-by: Junio C Hamano <gitster@pobox.com>
9 years agoMerge branch 'bw/kwset-use-unsigned'
Junio C Hamano [Fri, 6 Mar 2015 23:02:33 +0000 (15:02 -0800)] 
Merge branch 'bw/kwset-use-unsigned'

The borrowed code in kwset API did not follow our usual convention
to use "unsigned char" to store values that range from 0-255.

* bw/kwset-use-unsigned:
  kwset: use unsigned char to store values with high-bit set

9 years agoMerge branch 'ak/t5516-typofix'
Junio C Hamano [Fri, 6 Mar 2015 23:02:32 +0000 (15:02 -0800)] 
Merge branch 'ak/t5516-typofix'

* ak/t5516-typofix:
  t5516: correct misspelled pushInsteadOf

9 years agoMerge branch 'ms/submodule-update-config-doc'
Junio C Hamano [Fri, 6 Mar 2015 23:02:31 +0000 (15:02 -0800)] 
Merge branch 'ms/submodule-update-config-doc'

The interaction between "git submodule update" and the
submodule.*.update configuration was not clearly documented.

* ms/submodule-update-config-doc:
  submodule: improve documentation of update subcommand

9 years agoMerge branch 'ja/clean-confirm-i18n'
Junio C Hamano [Fri, 6 Mar 2015 23:02:29 +0000 (15:02 -0800)] 
Merge branch 'ja/clean-confirm-i18n'

The prompt string "remove?" used when "git clean -i" asks the user
if a path should be removed was localizable, but the code always
expects a substring of "yes" to tell it to go ahead.  Always show
[y/N] as part of this prompt to hint that the answer is not (yet)
localized.

* ja/clean-confirm-i18n:
  Add hint interactive cleaning

9 years agoMerge branch 'mk/diff-shortstat-dirstat-fix'
Junio C Hamano [Fri, 6 Mar 2015 23:02:28 +0000 (15:02 -0800)] 
Merge branch 'mk/diff-shortstat-dirstat-fix'

"git diff --shortstat --dirstat=changes" showed a dirstat based on
lines that was never asked by the end user in addition to the
dirstat that the user asked for.

* mk/diff-shortstat-dirstat-fix:
  diff --shortstat --dirstat: remove duplicate output

9 years agoMerge branch 'mg/doc-remote-tags-or-not'
Junio C Hamano [Fri, 6 Mar 2015 23:02:27 +0000 (15:02 -0800)] 
Merge branch 'mg/doc-remote-tags-or-not'

"git remote add" mentioned "--tags" and "--no-tags" and was not
clear that fetch from the remote in the future will use the default
behaviour when neither is given to override it.

* mg/doc-remote-tags-or-not:
  git-remote.txt: describe behavior without --tags and --no-tags

9 years agoMerge branch 'nd/grep-exclude-standard-help-fix'
Junio C Hamano [Fri, 6 Mar 2015 23:02:27 +0000 (15:02 -0800)] 
Merge branch 'nd/grep-exclude-standard-help-fix'

Description given by "grep -h" for its --exclude-standard option
was phrased poorly.

* nd/grep-exclude-standard-help-fix:
  grep: correct help string for --exclude-standard

9 years agoMerge branch 'mr/doc-clean-f-f'
Junio C Hamano [Fri, 6 Mar 2015 23:02:26 +0000 (15:02 -0800)] 
Merge branch 'mr/doc-clean-f-f'

Documentation update.

* mr/doc-clean-f-f:
  Documentation/git-clean.txt: document that -f may need to be given twice

9 years agoMerge branch 'ye/http-accept-language'
Junio C Hamano [Fri, 6 Mar 2015 23:02:24 +0000 (15:02 -0800)] 
Merge branch 'ye/http-accept-language'

Compilation fix for a recent topic in 'master'.

* ye/http-accept-language:
  gettext.c: move get_preferred_languages() from http.c

9 years agoSync with 2.3.2
Junio C Hamano [Fri, 6 Mar 2015 22:59:12 +0000 (14:59 -0800)] 
Sync with 2.3.2

* maint:
  Git 2.3.2

9 years agoGit 2.3.2 v2.3.2
Junio C Hamano [Fri, 6 Mar 2015 22:58:14 +0000 (14:58 -0800)] 
Git 2.3.2

Signed-off-by: Junio C Hamano <gitster@pobox.com>
9 years agoMerge branch 'rj/no-xopen-source-for-cygwin' into maint
Junio C Hamano [Fri, 6 Mar 2015 22:57:58 +0000 (14:57 -0800)] 
Merge branch 'rj/no-xopen-source-for-cygwin' into maint

Code cleanups.

* rj/no-xopen-source-for-cygwin:
  git-compat-util.h: remove redundant code

9 years agoMerge branch 'rs/simple-cleanups' into maint
Junio C Hamano [Fri, 6 Mar 2015 22:57:57 +0000 (14:57 -0800)] 
Merge branch 'rs/simple-cleanups' into maint

Code cleanups.

* rs/simple-cleanups:
  sha1_name: use strlcpy() to copy strings
  pretty: use starts_with() to check for a prefix
  for-each-ref: use skip_prefix() to avoid duplicate string comparison
  connect: use strcmp() for string comparison

9 years agoMerge branch 'mm/am-c-doc' into maint
Junio C Hamano [Fri, 6 Mar 2015 22:57:56 +0000 (14:57 -0800)] 
Merge branch 'mm/am-c-doc' into maint

The configuration variable 'mailinfo.scissors' was hard to
discover in the documentation.

* mm/am-c-doc:
  Documentation/git-am.txt: mention mailinfo.scissors config variable
  Documentation/config.txt: document mailinfo.scissors

9 years agoMerge branch 'ew/svn-maint-fixes' into maint
Junio C Hamano [Fri, 6 Mar 2015 22:57:55 +0000 (14:57 -0800)] 
Merge branch 'ew/svn-maint-fixes' into maint

Correct a breakage to git-svn around v2.2 era that triggers
premature closing of FileHandle.

* ew/svn-maint-fixes:
  Git::SVN::*: avoid premature FileHandle closure
  git-svn: fix localtime=true on non-glibc environments

9 years agoMerge branch 'km/send-email-getopt-long-workarounds' into maint
Junio C Hamano [Fri, 6 Mar 2015 22:57:54 +0000 (14:57 -0800)] 
Merge branch 'km/send-email-getopt-long-workarounds' into maint

Even though we officially haven't dropped Perl 5.8 support, the
Getopt::Long package that came with it does not support "--no-"
prefix to negate a boolean option; manually add support to help
people with older Getopt::Long package.

* km/send-email-getopt-long-workarounds:
  git-send-email.perl: support no- prefix with older GetOptions

9 years agocompletion: simplify __git_remotes()
SZEDER Gábor [Wed, 4 Mar 2015 14:10:29 +0000 (15:10 +0100)] 
completion: simplify __git_remotes()

The __git_remotes() helper function lists the remotes from the config
file by processing the output of a 'git config' query.  A simple 'git
remote' produces the exact same output, so run that instead.

Remotes under '$GIT_DIR/remotes' are still listed by running 'ls -1',
because 'git remote' unfortunately ignores them.

Signed-off-by: SZEDER Gábor <szeder@ira.uka.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
9 years agocompletion: add a test for __git_remotes() helper function
SZEDER Gábor [Wed, 4 Mar 2015 14:10:28 +0000 (15:10 +0100)] 
completion: add a test for __git_remotes() helper function

The test checks that both remotes under '$GIT_DIR/remotes' and remotes
in the config file are listed.

Signed-off-by: SZEDER Gábor <szeder@ira.uka.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
9 years agorebase-interactive: re-word "item count" comment
Eric Sunshine [Wed, 4 Mar 2015 07:53:05 +0000 (02:53 -0500)] 
rebase-interactive: re-word "item count" comment

97f05f43 (Show number of TODO items for interactive rebase, 2014-12-10)
taught rebase-interactive to display an item count in the instruction
list comments:

    # Rebase 46640c6..5568fd5 onto 46640c6 (4 TODO item(s))
    #
    # Commands:
    # p, pick = use commit
    # ...

However, with the exception of the --edit-todo option, "TODO" is a
one-off term, never presented to the user by rebase-interactive in
any other context. The item count is in fact the number of commands
("pick", "edit", etc.) remaining on the instruction sheet, and the
comment immediately following it talks about "Commands". Consequently,
replace "(# TODO item(s))" with the more accurate and meaningful
"(# command(s))".

Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
9 years agorebase-interactive: suppress whitespace preceding item count
Eric Sunshine [Wed, 4 Mar 2015 07:53:04 +0000 (02:53 -0500)] 
rebase-interactive: suppress whitespace preceding item count

97f05f43 (Show number of TODO items for interactive rebase, 2014-12-10)
taught rebase-interactive to compute an item count with 'wc -l' and
display it in the instruction list comments:

    # Rebase 46640c6..5568fd5 onto 46640c6 (4 TODO item(s))

On Mac OS X, however, it renders as:

    # Rebase 46640c6..5568fd5 onto 46640c6 (       4 TODO item(s))

since 'wc -l' indents its output with leading spaces. Fix this.

Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
9 years agogit: make was_alias and done_help non-static
Alexander Kuleshov [Mon, 2 Mar 2015 12:02:37 +0000 (18:02 +0600)] 
git: make was_alias and done_help non-static

'was_alias' variable does not need to store it's value on each
iteration in the loop; this variable gets assigned the result
of run_argv() every time in the loop before being used.

'done_help' variable does not need to be static variable too if
we move it out the loop.

Signed-off-by: Alexander Kuleshov <kuleshovmail@gmail.com>
Helped-by: Eric Sunshine <sunshine@sunshineco.com>
Helped-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
9 years agobranch: name detached HEAD analogous to status
Michael J Gruber [Fri, 6 Mar 2015 15:04:07 +0000 (16:04 +0100)] 
branch: name detached HEAD analogous to status

"git status" carefully names a detached HEAD "at" resp. "from" a rev or
ref depending on whether the detached HEAD has moved since. "git branch"
always uses "from", which can be confusing, because a status-aware user
would interpret this as moved detached HEAD.

Make "git branch" use the same logic and wording.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
9 years agowt-status: refactor detached HEAD analysis
Michael J Gruber [Fri, 6 Mar 2015 15:04:06 +0000 (16:04 +0100)] 
wt-status: refactor detached HEAD analysis

wt_status_print() is the only caller of wt_status_get_detached_from().
The latter performs most of the analysis of a detached HEAD, including
finding state->detached_from; the caller checks whether the detached
HEAD is still at state->detached_from or has moved away.

Move that last bit of analysis to wt_status_get_detached_from(), too,
and store the boolean result in state->detached_at.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>