1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-11-01 14:57:52 +01:00
Commit graph

29017 commits

Author SHA1 Message Date
Junio C Hamano
8a3500cd21 Merge branch 'rs/dir-strbuf'
By René Scharfe
* rs/dir-strbuf:
  dir: convert to strbuf
2012-05-10 10:49:55 -07:00
Junio C Hamano
989f869b2c Merge branch 'nd/i18n-apply-lego'
By Nguyễn Thái Ngọc Duy
* nd/i18n-apply-lego:
  apply: remove lego in i18n string in gitdiff_verify_name
2012-05-10 10:49:52 -07:00
Junio C Hamano
f7858ad1e1 Merge branch 'jk/status-porcelain-z-b'
"git status --porcelain" ignored "--branch" option by mistake.  The output
for "git status --branch -z" was also incorrect and did not terminate the
record for the current branch name with NUL as asked.

By Jeff King
via Jeff King
* jk/status-porcelain-z-b:
  status: refactor colopts handling
  status: respect "-b" for porcelain format
  status: fix null termination with "-b"
  status: refactor null_termination option
  commit: refactor option parsing
2012-05-10 10:49:46 -07:00
Junio C Hamano
1652867c73 Merge branch 'fa/maint-config-doc'
By Florian Achleitner
* fa/maint-config-doc:
  Documentation/git-config: describe and clarify "--local <file>" option
2012-05-10 10:49:42 -07:00
Junio C Hamano
302af64cc8 Merge branch 'ef/maint-clone-progress-fix'
Some time ago, "git clone" lost the progress output for its "checkout"
phase; when run without any "--quiet" option, it should give progress to
the lengthy operation.

By Erik Faye-Lund
* ef/maint-clone-progress-fix:
  clone: fix progress-regression
2012-05-10 10:49:36 -07:00
Junio C Hamano
4abe87c14a Merge branch 'ah/maint-grep-double-init'
By Angus Hammond
* ah/maint-grep-double-init:
  grep.c: remove redundant line of code
2012-05-10 10:49:31 -07:00
Junio C Hamano
dc7a4c386d Merge branch 'js/checkout-detach-count'
When checking out another commit from an already detached state, we used
to report all commits that are not reachable from any of the refs as
lossage, but some of them might be reachable from the new HEAD, and there
is no need to warn about them.

By Johannes Sixt
* js/checkout-detach-count:
  checkout (detached): truncate list of orphaned commits at the new HEAD
  t2020-checkout-detach: check for the number of orphaned commits
2012-05-10 10:49:25 -07:00
Junio C Hamano
499e7b3150 Merge branch 'jc/install-no-hardlinks'
Your build platform may support hardlinks but you may prefer not to use
them, e.g. when installing to DESTDIR to make a tarball and untarring on
a filesystem that has poor support for hardlinks.

The Makefile in git-gui project may need to learn to honor the same
setting; it unconditionally creates git-citool by hardlinking git-gui.

* jc/install-no-hardlinks:
  Makefile: NO_INSTALL_HARDLINKS
2012-05-10 10:49:18 -07:00
Junio C Hamano
d41355fc31 Merge branch 'nd/stream-to-archive'
Stream large blobs directly out to archive files without slurping
everything in memory first.

By René Scharfe (6) and Nguyễn Thái Ngọc Duy (4)
* nd/stream-to-archive:
  t5000: rationalize unzip tests
  archive-zip: streaming for deflated files
  archive-zip: streaming for stored files
  archive-zip: factor out helpers for writing sizes and CRC
  archive-zip: remove uncompressed_size
  archive-tar: stream large blobs to tar file
  archive: delegate blob reading to backend
  archive-tar: unindent write_tar_entry by one level
  archive-tar: turn write_tar_entry into blob-writing only
  streaming: void pointer instead of char pointer
2012-05-10 10:49:13 -07:00
Junio C Hamano
aa6912b081 Merge branch 'mh/ref-api-lazy-loose'
Refs API is updated to lazily read sub-hierarchies of refs/ namespace,
so that we do not have to grab everything from the filesystem when we
are only interested in listing branches, for example.

By Michael Haggerty (17) and Junio C Hamano (1)
* mh/ref-api-lazy-loose:
  refs: fix find_containing_dir() regression
  refs: read loose references lazily
  read_loose_refs(): eliminate ref_cache argument
  struct ref_dir: store a reference to the enclosing ref_cache
  search_for_subdir(): return (ref_dir *) instead of (ref_entry *)
  get_ref_dir(): add function for getting a ref_dir from a ref_entry
  read_loose_refs(): rename function from get_ref_dir()
  refs: wrap top-level ref_dirs in ref_entries
  find_containing_dir(): use strbuf in implementation of this function
  bisect: copy filename string obtained from git_path()
  do_for_each_reflog(): use a strbuf to hold logfile name
  do_for_each_reflog(): return early on error
  get_ref_dir(): take the containing directory as argument
  refs.c: extract function search_for_subdir()
  get_ref_dir(): require that the dirname argument ends in '/'
  get_ref_dir(): rename "base" parameter to "dirname"
  get_ref_dir(): use a strbuf to hold refname
  get_ref_dir(): return early if directory cannot be read
2012-05-10 10:49:08 -07:00
Junio C Hamano
2c78c91db7 Merge branch 'maint' 2012-05-10 10:45:47 -07:00
Junio C Hamano
5ad3e16a6f Update draft release notes to 1.7.10.2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-05-10 10:45:42 -07:00
Junio C Hamano
db8d664678 Merge branch 'mm/include-userpath' into maint
By Jeff King
* mm/include-userpath:
  config: expand tildes in include.path variable
2012-05-10 10:33:05 -07:00
Junio C Hamano
5939c6975a Merge branch 'cc/fix-missing-va-end-in-revert' into maint
By Christian Couder
* cc/fix-missing-va-end-in-revert:
  revert: add missing va_end
2012-05-10 10:32:43 -07:00
Junio C Hamano
6331da9707 Merge branch 'bw/test-fix-grep-gnuism' into maint
* bw/test-fix-grep-gnuism:
  t9400: fix gnuism in grep
2012-05-10 10:32:15 -07:00
Junio C Hamano
8cde60210d Merge branch 'jk/http-backend-keep-committer-ident-env' into maint
By Jeff King
* jk/http-backend-keep-committer-ident-env:
  http-backend: respect existing GIT_COMMITTER_* variables

Conflicts:
	t/t5541-http-push.sh
2012-05-10 10:29:50 -07:00
Junio C Hamano
bb16e8f422 Merge branch 'nl/rebase-i-cheat-sheet' into maint
* nl/rebase-i-cheat-sheet:
  rebase -i: remind that the lines are top-to-bottom
2012-05-10 10:29:14 -07:00
Junio C Hamano
c83645a642 Merge branch 'bw/submodule-sed-solaris' into maint
By Ben Walton
* bw/submodule-sed-solaris:
  Avoid bug in Solaris xpg4/sed as used in submodule
2012-05-10 10:27:58 -07:00
Junio C Hamano
25047b8896 Merge branch 'jk/maint-push-progress' into maint
"git push" over smart-http lost progress output a few releases ago.

By Jeff King
* jk/maint-push-progress:
  t5541: test more combinations of --progress
  teach send-pack about --[no-]progress
  send-pack: show progress when isatty(2)
2012-05-10 10:08:54 -07:00
Junio C Hamano
454bf49930 Merge branch 'jc/rerere-train' into maint
A contrib script "rerere-train" did not work out of the box unless user
futzed with her $PATH.

* jc/rerere-train:
  contrib/rerere-train: use installed git-sh-setup
2012-05-10 10:08:24 -07:00
Junio C Hamano
9aa620dfae Merge branch 'lp/diffstat-with-graph' into maint
"log --graph" was not very friendly with "--stat" option and its output
had line breaks at wrong places.

By Lucian Poston (5) and Zbigniew Jędrzejewski-Szmek (3)
* lp/diffstat-with-graph:
  t4052: work around shells unable to set COLUMNS to 1
  test-lib: skip test with COLUMNS=1 under mksh
  Prevent graph_width of stat width from falling below min
  t4052: Test diff-stat output with minimum columns
  t4052: Adjust --graph --stat output for prefixes
  Adjust stat width calculations to take --graph output into account
  Add output_prefix_length to diff_options
  t4052: test --stat output with --graph
2012-05-10 10:06:53 -07:00
Nguyễn Thái Ngọc Duy
4c5197d10f apply: remove lego in i18n string in gitdiff_verify_name
It marks the string "...inconsistent %s filename..." where %s is either
"old" or "new" from caller.  Make it two strings "...inconsistent new
filename..." and "...inconsistent old filename...".

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-05-08 10:29:39 -07:00
Junio C Hamano
bef369219a Merge branch 'rs/maint-dir-strbuf' into rs/dir-strbuf
By René Scharfe
* rs/maint-dir-strbuf:
  dir: convert to strbuf
2012-05-08 09:43:40 -07:00
René Scharfe
49dc2cc2c9 dir: convert to strbuf
The functions read_directory_recursive() and treat_leading_path() both
use buffers sized to fit PATH_MAX characters.  The latter can be made to
overrun its buffer, e.g. like this:

	$ a=0123456789abcdef
	$ a=$a$a$a$a$a$a$a$a
	$ a=$a$a$a$a$a$a$a$a
	$ a=$a$a$a$a$a$a$a$a
	$ git add $a/a

Instead of trying to add a check and potentionally forgetting to address
similar cases, convert the involved functions and their helpers to use
struct strbuf.  The patch is suprisingly large because the helpers
treat_path() and treat_one_path() modify the buffer as well and thus need
to be converted, too.

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-05-08 09:13:00 -07:00
Jeff King
4d2292e9a9 status: refactor colopts handling
The current code reads the config and command-line options
into a separate "colopts" variable, and then copies the
contents of that variable into the "struct wt_status". We
can eliminate the extra variable and copy just write
straight into the wt_status struct.

This simplifies the "status" code a little bit.
Unfortunately, it makes the "commit" code one line more
complex; a side effect of the separate variable was that
"commit" did not copy the colopts variable, so any
column.status configuration had no effect.

The result still ends up cleaner, though. In the previous
version, it was unclear whether commit simply forgot to copy
the colopt variable, or whether it was intentional. Now it
explicitly turns off column options. Furthermore, if commit
later learns to respect column.status, this will make the
end result simpler. I punted on just adding that feature
now, because it was sufficiently non-obvious that it should
not go into a refactoring patch.

Signed-off-by: Jeff King <peff@peff.net>
2012-05-08 04:57:42 -04:00
Jeff King
5410ae422b Merge branch 'jk/maint-status-porcelain-z-b' into HEAD
* jk/maint-status-porcelain-z-b:
  status: respect "-b" for porcelain format
  status: fix null termination with "-b"
  status: refactor null_termination option
  commit: refactor option parsing

Conflicts:
	wt-status.h
2012-05-08 04:55:35 -04:00
Jeff King
d4a6bf1fb6 status: respect "-b" for porcelain format
There is no reason not to, as the user has to explicitly ask
for it, so we are not breaking compatibility by doing so. We
can do this simply by moving the "show_branch" flag into
the wt_status struct. As a bonus, this saves us from passing
it explicitly, simplifying the code.

Signed-off-by: Jeff King <peff@peff.net>
2012-05-08 04:51:08 -04:00
Jeff King
a598523787 status: fix null termination with "-b"
When the "-z" option is given to status, we are supposed to
NUL-terminate each record. However, the "-b" code to show
the tracking branch did not respect this, and always ended
with a newline.

Signed-off-by: Jeff King <peff@peff.net>
2012-05-08 04:51:08 -04:00
Jeff King
3207a3a291 status: refactor null_termination option
This option is passed separately to the wt_status printing
functions, whereas every other formatting option is
contained in the wt_status struct itself. Let's do the same
here, so we can avoid passing it around through the call
stack.

Signed-off-by: Jeff King <peff@peff.net>
2012-05-08 04:51:07 -04:00
Jeff King
036dbbfb2d commit: refactor option parsing
The options are declared as a static global, but really they
need only be accessible from cmd_commit.  Additionally,
declare the "struct wt_status" in cmd_commit and cmd_status
as static at the top of each function; this will let the
options lists reference them directly, which will facilitate
further cleanups.

Signed-off-by: Jeff King <peff@peff.net>
2012-05-08 04:51:07 -04:00
Florian Achleitner
c598c5aa01 Documentation/git-config: describe and clarify "--local <file>" option
Describe config file selection in git-config.  While the usage message of
git-config shows --local, the documentation page did not contain anything
about that.

Signed-off-by: Florian Achleitner <florian.achleitner.2.6.31@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-05-07 15:27:56 -07:00
Junio C Hamano
a3935e6791 The ninth batch of topics graduated to 'master'
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-05-07 13:39:38 -07:00
Junio C Hamano
5543501ced Merge branch 'nh/empty-rebase'
By Neil Horman
* nh/empty-rebase:
  git cherry-pick: do not dereference a potential NULL pointer
2012-05-07 13:29:16 -07:00
Junio C Hamano
fc1320bfe2 Merge branch 'zj/diff-empty-chmod'
"git diff --stat" used to fully count a binary file with modified
execution bits whose contents is unmodified, which was not right.

By Zbigniew Jędrzejewski-Szmek (4) and Johannes Sixt (1)
* zj/diff-empty-chmod:
  t4006: Windows do not have /dev/zero
  diff --stat: do not run diff on indentical files
  diff --stat: report mode-only changes for binary files like text files
  tests: check --[short]stat output after chmod
  test: modernize style of t4006

Conflicts:
	diff.c
2012-05-07 13:29:08 -07:00
Junio C Hamano
43d1e41ea9 Merge branch 'jk/maint-tformat-with-z'
"log -z --pretty=tformat:..." does not terminate each record with NUL
and this is a beginning of an attempt to fix it.  It still is not right
but the patch does not make externally observable behaviour worse.

By Jan Krüger (1) and Junio C Hamano (1)
* jk/maint-tformat-with-z:
  log-tree: the previous one is still not quite right
  log-tree: use custom line terminator in line termination mode
2012-05-07 13:29:01 -07:00
Junio C Hamano
cae0977221 Merge branch 'th/difftool-diffall'
Rolls the two-directory-diff logic from diffall script (in contrib/) into
"git difftool" framework.

By Tim Henigan
* th/difftool-diffall:
  difftool: print list of valid tools with '--tool-help'
  difftool: teach difftool to handle directory diffs
  difftool: eliminate setup_environment function
  difftool: stop appending '.exe' to git
  difftool: remove explicit change of PATH
  difftool: exit(0) when usage is printed
  difftool: add '--no-gui' option
  difftool: parse options using Getopt::Long
2012-05-07 13:28:44 -07:00
Junio C Hamano
ad799ea375 Sync with maint 2012-05-07 13:28:34 -07:00
Junio C Hamano
42325fb2e0 Start preparing for 1.7.10.2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-05-07 13:24:32 -07:00
Junio C Hamano
dc813f664d Merge branch 'jk/maint-gitweb-test-use-sane-perl' into maint
When using a Perl script on a system where "perl" found on user's $PATH
could be ancient or otherwise broken, we allow builders to specify the
path to a good copy of Perl with $PERL_PATH.  The gitweb test forgot to
use that Perl when running its test.

By Jeff King (1) and Zbigniew Jędrzejewski-Szmek (1)
* jk/maint-gitweb-test-use-sane-perl:
  Consistently use perl from /usr/bin/ for scripts
  t/gitweb-lib: use $PERL_PATH to run gitweb
2012-05-07 13:17:31 -07:00
Junio C Hamano
6a88021e46 Merge branch 'js/daemon-test-race-fix' into maint
The test scaffolding for git-daemon was flaky.

By Johannes Sixt
* js/daemon-test-race-fix:
  t5570: fix forwarding of git-daemon messages via cat
2012-05-07 13:17:17 -07:00
Junio C Hamano
4c8ad06e7c Merge branch 'jk/maint-config-bogus-section' into maint
"git config --rename-section" to rename an existing section into a bogus
one did not check the new name.

By Jeff King
* jk/maint-config-bogus-section:
  config: reject bogus section names for --rename-section
2012-05-07 13:14:08 -07:00
Junio C Hamano
1d9fd6683c Merge branch 'pw/t5800-import-race-fix' into maint
The test scaffolding for fast-import was flaky.

By Pete Wyckoff
* pw/t5800-import-race-fix:
  git-remote-testgit: fix race when spawning fast-import
2012-05-07 13:13:56 -07:00
Junio C Hamano
a28b919f05 Merge branch 'rt/cherry-revert-conflict-summary' into maint
In the older days, the header "Conflicts:" in "cherry-pick" and "merge"
was separated by a blank line from the list of paths that follow for
readability, but when "merge" was rewritten in C, we lost it by
mistake. Remove the newline from "cherry-pick" to make them match again.

By Ralf Thielow
* rt/cherry-revert-conflict-summary:
  sequencer: remove additional blank line
2012-05-07 13:13:43 -07:00
Junio C Hamano
71a3222314 Merge branch 'cb/maint-report-mount-point-correctly-in-setup' into maint
The filesystem boundary was not correctly reported when .git directory
discovery stopped at a mount point.

By Clemens Buchacher
* cb/maint-report-mount-point-correctly-in-setup:
  properly keep track of current working directory
2012-05-07 13:13:03 -07:00
Junio C Hamano
8f63da13f8 Merge branch 'ef/maint-1.7.6-clone-progress-fix' into ef/maint-clone-progress-fix
By Erik Faye-Lund
* ef/maint-1.7.6-clone-progress-fix:
  clone: fix progress-regression
2012-05-07 12:35:36 -07:00
Erik Faye-Lund
481ed23602 clone: fix progress-regression
In 5bd631b3 ("clone: support multiple levels of verbosity"), the
default behavior to show progress of the implicit checkout in
the clone-command regressed so that progress was only shown if
the verbose-option was specified.

Fix this by making option_verbosity == 0 output progress as well.

Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-05-07 12:32:10 -07:00
Angus Hammond
2385f24625 grep.c: remove redundant line of code
Signed-off-by: Angus Hammond <angusgh@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-05-07 11:25:04 -07:00
Pete Wyckoff
41925d5802 git p4 doc: fix formatting
Attach example sections to previous level of indenting.

Fix a trailing ::

Signed-off-by: Pete Wyckoff <pw@padd.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-05-07 11:11:05 -07:00
Johannes Sixt
5d8863954f checkout (detached): truncate list of orphaned commits at the new HEAD
When git checkout switches from a detached HEAD to any other commit, then
all orphaned commits were listed in a warning:

  Warning: you are leaving 2 commits behind...:

    a5e5396 another fixup
    6aa1af6 fixup foo

But if the new commit is actually one from this list (6aa1af6 in this
example), then the list in the warning can be truncated at the new HEAD,
because history beginning at HEAD is not "left behind". This makes it so.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-05-04 12:42:27 -07:00
Johannes Sixt
f94920993a t2020-checkout-detach: check for the number of orphaned commits
Change the test that orphans commits to leave 2 commits behind. Add a test
that leaves only one of these behind.

The next patch will truncate the list of orphaned commits earlier. With
this preliminary update, its effect will become more obvious.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-05-04 12:42:25 -07:00