1
0
mirror of https://github.com/git/git.git synced 2024-10-21 06:59:20 +02:00
Commit Graph

28578 Commits

Author SHA1 Message Date
Junio C Hamano
adc3a81ce2 Merge branch 'jk/maint-reflog-walk-count-vs-time' into maint
Gives a better DWIM behaviour for --pretty=format:%gd, "stash list", and
"log -g", depending on how the starting point ("master" vs "master@{0}" vs
"master@{now}") and date formatting options (e.g. "--date=iso") are given
on the command line.

By Jeff King (4) and Junio C Hamano (1)
* jk/maint-reflog-walk-count-vs-time:
  reflog-walk: tell explicit --date=default from not having --date at all
  reflog-walk: always make HEAD@{0} show indexed selectors
  reflog-walk: clean up "flag" field of commit_reflog struct
  log: respect date_mode_explicit with --format:%gd
  t1411: add more selector index/date tests
2012-05-14 11:46:16 -07:00
Junio C Hamano
badabc06f3 Merge branch 'jk/doc-asciidoc-inline-literal' into maint
By Jeff King
* jk/doc-asciidoc-inline-literal:
  docs: stop using asciidoc no-inline-literal
2012-05-14 11:43:04 -07:00
Junio C Hamano
3734dbc4ab Merge branch 'ef/checkout-empty' into maint
Running "git checkout" on an unborn branch used to corrupt HEAD
(regression in 1.7.10); this makes it error out.

By Erik Faye-Lund
* ef/checkout-empty:
  checkout: do not corrupt HEAD on empty repo
2012-05-14 11:42:50 -07:00
Junio C Hamano
ea8c6761e3 Merge branch 'jk/maint-tformat-with-z' into maint
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-14 11:42:34 -07:00
Junio C Hamano
a912913e86 Merge branch 'js/checkout-detach-count' into maint
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-14 11:42:22 -07:00
Junio C Hamano
c8cf3ec7ae Merge branch 'ef/maint-clone-progress-fix' into maint
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-14 11:41:40 -07:00
Heiko Voigt
cb2df36980 link to gitmodules page at the beginning of git-submodule documentation
This way the user does not have to scroll down to the bottom to find
it.

Signed-off-by: Heiko Voigt <hvoigt@hvoigt.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-05-14 11:14:07 -07:00
Carlos Martín Nieto
79135e4c22 pack-protocol: fix first-want separator in the examples
When sending the "want" list, the capabilities list is separated from
the obj-id by a SP instead of NUL as in the ref advertisement. The
text is correct, but the examples wrongly show the separator as
NUL. Fix the example so it uses SP.

Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-05-14 09:24:52 -07:00
Junio C Hamano
b6555d731e Git 1.7.10.2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
v1.7.10.2
2012-05-11 11:25:28 -07:00
Junio C Hamano
8daff716ad Merge branch 'jc/diff-algo-cleanup' into maint
* jc/diff-algo-cleanup:
  xdiff: PATIENCE/HISTOGRAM are not independent option bits
  xdiff: remove XDL_PATCH_* macros
2012-05-11 11:19:27 -07:00
Junio C Hamano
07e74b0da2 Merge branch 'ct/advise-push-default' into maint
The cases "git push" fails due to non-ff can be broken into three
categories; each case is given a separate advise message.

By Christopher Tiwald (2) and Jeff King (1)
* ct/advise-push-default:
  Fix httpd tests that broke when non-ff push advice changed
  clean up struct ref's nonfastforward field
  push: Provide situational hints for non-fast-forward errors
2012-05-11 11:18:43 -07:00
Junio C Hamano
9a10117560 Merge branch 'js/fast-import-test-9300' into maint
By Johannes Sixt
* js/fast-import-test-9300:
  t9300-fast-import: avoid 'exit' in test_expect_success snippets
2012-05-11 11:17:49 -07:00
Junio C Hamano
285005c8c4 Merge branch 'jk/repack-no-explode-objects-from-old-pack' into maint
"git repack" used to write out unreachable objects as loose objects
when repacking, even if such loose objects will immediately pruned
due to its age.

By Jeff King
* jk/repack-no-explode-objects-from-old-pack:
  gc: use argv-array for sub-commands
  argv-array: add a new "pushl" method
  argv-array: refactor empty_argv initialization
  gc: do not explode objects which will be immediately pruned
2012-05-11 11:16:45 -07:00
Junio C Hamano
f5f37461a9 Merge branch 'ah/maint-grep-double-init' into maint
By Angus Hammond
* ah/maint-grep-double-init:
  grep.c: remove redundant line of code
2012-05-11 11:16:09 -07:00
Junio C Hamano
51eb3175ef Merge branch 'fa/maint-config-doc' into maint
By Florian Achleitner
* fa/maint-config-doc:
  Documentation/git-config: describe and clarify "--local <file>" option
2012-05-11 11:15:53 -07:00
Junio C Hamano
485cfd1a92 Merge branch 'rs/unpack-trees-leakfix' into maint
By René Scharfe
* rs/unpack-trees-leakfix:
  unpack-trees: plug minor memory leak
  unpack-trees: don't perform any index operation if we're not merging
2012-05-11 11:15:10 -07:00
Junio C Hamano
538847cd4c Merge branch 'sl/test-wc-l-line-count' into maint
By Stefano Lattarini
* sl/test-wc-l-line-count:
  tests: modernise style: more uses of test_line_count
2012-05-11 11:14:57 -07:00
Junio C Hamano
0582afbcb3 Merge branch 'rl/show-empty-prefix' into maint
Unlike "git rev-parse --show-cdup", "--show-prefix" did not give an
empty line when run at the top of the working tree.

By Ross Lagerwall
* rl/show-empty-prefix:
  rev-parse --show-prefix: add in trailing newline
2012-05-11 11:13:26 -07:00
Heiko Voigt
e6a1c43aaf document submdule.$name.update=none option for gitmodules
This option was not yet described in the gitmodules documentation. We
only described it in the 'git submodule' command documentation but
gitmodules is the more natural place to look.

A short reference in the 'git submodule' documentation should be
sufficient since the details can now be found in the documentation to
gitmodules.

Signed-off-by: Heiko Voigt <hvoigt@hvoigt.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-05-11 08:39:33 -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
Erik Faye-Lund
8338f771fe checkout: do not corrupt HEAD on empty repo
In abe1998 ("git checkout -b: allow switching out of an unborn
branch"), a code-path overly-optimisticly assumed that a
branch-name was specified. This is not always the case, and as
a result a NULL-pointer was attempted printed to .git/HEAD.

This could lead to at least two different failure modes:
 1) vsnprintf formated the NULL-string as something useful (e.g
    "(null)")
 2) vsnprintf crashed

Neither were very convenient for formatting a new HEAD-reference.

To fix this, reintroduce some strictness so we only take this
new codepath if a banch-name was specified.

Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-05-08 10:36:55 -07: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
55ccf85a52 reflog-walk: tell explicit --date=default from not having --date at all
Introduction of opt->date_mode_explicit was a step in the right direction,
but lost that crucial bit at the very end of the callchain, and the callee
could not tell an explicitly specified "I want *date* but in default format"
from the built-in default value passed when there was no --date specified.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-05-07 14:18:06 -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
Jeff King
794151e9b5 reflog-walk: always make HEAD@{0} show indexed selectors
When we are showing reflog selectors during a walk, we infer
from context whether the user wanted to see the index in
each selector, or the reflog date. The current rules are:

  1. if the user asked for an explicit date format in the
     output, show the date

  2. if the user asked for ref@{now}, show the date

  3. if neither is true, show the index

However,  if we see "ref@{0}", that should be a strong clue
that the user wants to see the counted version. In fact, it
should be much stronger than the date format in (1). The
user may have been setting the date format to use in another
part of the output (e.g., in --format="%gd (%ad)", they may
have wanted to influence the author date).

This patch flips the rules to:

  1. if the user asked for ref@{0}, always show the index

  2. if the user asked for ref@{now}, always show the date

  3. otherwise, we have just "ref"; show them counted by
     default, but respect the presence of "--date" as a clue
     that the user wanted them date-based

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-05-04 09:39:14 -07:00
Jeff King
a763126b5c reflog-walk: clean up "flag" field of commit_reflog struct
When we prepare to walk a reflog, we parse the specification
and pull some information from it, such as which reflog to
look in (e.g., HEAD), and where to start (e.g., HEAD@{10} or
HEAD@{yesterday}). The resulting struct has a "recno" field
to show where in the reflog we are starting. It also has a
"flag" field; if true, it means the recno field came from
parsing a date like HEAD@{yesterday}.

There are two problems with this:

  1. "flag" is an absolutely terrible name, as it conveys
     nothing about the meaning

  2. you can tell "HEAD" from "HEAD@{yesterday}", but you
     can't differentiate "HEAD" from "HEAD{0}"

This patch converts the flag into a tri-state (and gives it
a better name!).

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-05-04 09:39:14 -07:00
Jeff King
f026c7563a log: respect date_mode_explicit with --format:%gd
When we show a reflog selector (e.g., via "git log -g"), we
perform some DWIM magic: while we normally show the entry's
index (e.g., HEAD@{1}), if the user has given us a date
with "--date", then we show a date-based select (e.g.,
HEAD@{yesterday}).

However, we don't want to trigger this magic if the
alternate date format we got was from the "log.date"
configuration; that is not sufficiently strong context for
us to invoke this particular magic. To fix this, commit
f4ea32f (improve reflog date/number heuristic, 2009-09-24)
introduced a "date_mode_explicit" flag in rev_info. This
flag is set only when we see a "--date" option on the
command line, and we a vanilla date to the reflog code if
the date was not explicit.

Later, commit 8f8f547 (Introduce new pretty formats %g[sdD]
for reflog information, 2009-10-19) added another way to
show selectors, and it did not respect the date_mode_explicit
flag from f4ea32f.

This patch propagates the date_mode_explicit flag to the
pretty-print code, which can then use it to pass the
appropriate date field to the reflog code. This brings the
behavior of "%gd" in line with the other formats, and means
that its output is independent of any user configuration.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-05-04 09:39:14 -07:00
Jeff King
7904af1c10 t1411: add more selector index/date tests
We already check that @{now} and "--date" cause the
displayed selector to use the date for both the multiline
and oneline formats. However, we miss several cases:

  1. The --format=%gd selector is not tested at all.

  2. We do not check how the log.date config interacts with the
     "--date" magic (according to f4ea32f, it should not
     impact the output).

Doing so reveals that the combination of both (log.date
combined with the %gd format) does not behave as expected.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-05-04 09:39:14 -07:00
Junio C Hamano
edf141218e Merge branch 'jc/merge-reduce-parents-early' into maint
Octopus merge strategy did not reduce heads that are recorded in the final
commit correctly.

By Junio C Hamano (4) and Michał Kiedrowicz (1)
* jc/merge-reduce-parents-early:
  fmt-merge-msg: discard needless merge parents
  builtin/merge.c: reduce parents early
  builtin/merge.c: collect other parents early
  builtin/merge.c: remove "remoteheads" global variable
  merge tests: octopus with redundant parents
2012-05-03 15:36:15 -07:00