1
0
mirror of https://github.com/git/git.git synced 2024-10-19 16:28:32 +02:00
Commit Graph

25921 Commits

Author SHA1 Message Date
Junio C Hamano
87d99c64df Merge branch 'jm/mergetool-pathspec' into maint-1.7.6
* jm/mergetool-pathspec:
  mergetool: no longer need to save standard input
  mergetool: Use args as pathspec to unmerged files
2011-10-26 16:12:25 -07:00
Junio C Hamano
716b64a73e Merge branch 'mz/remote-rename' into maint-1.7.6
* mz/remote-rename:
  remote: only update remote-tracking branch if updating refspec
  remote rename: warn when refspec was not updated
  remote: "rename o foo" should not rename ref "origin/bar"
  remote: write correct fetch spec when renaming remote 'remote'
2011-10-26 16:12:19 -07:00
Junio C Hamano
8371e91463 Merge branch 'rj/maint-t9159-svn-rev-notation' into maint-1.7.6
* rj/maint-t9159-svn-rev-notation:
  t9159-*.sh: skip for mergeinfo test for svn <= 1.4
2011-10-26 16:12:13 -07:00
Junio C Hamano
1f7a2abcc1 Merge branch 'hl/iso8601-more-zone-formats' into maint-1.7.6
* hl/iso8601-more-zone-formats:
  date.c: Support iso8601 timezone formats
2011-10-26 16:11:28 -07:00
Junio C Hamano
588150b023 Merge branch 'tr/doc-note-rewrite' into maint-1.7.6
* tr/doc-note-rewrite:
  Documentation: basic configuration of notes.rewriteRef
2011-10-26 16:09:04 -07:00
Junio C Hamano
139088b78b Merge branch 'nd/sparse-doc' into maint-1.7.6
* nd/sparse-doc:
  git-read-tree.txt: update sparse checkout examples
2011-10-26 16:09:04 -07:00
Junio C Hamano
df9701e28c Merge branch 'mg/maint-doc-sparse-checkout' into maint-1.7.6
* mg/maint-doc-sparse-checkout:
  git-read-tree.txt: correct sparse-checkout and skip-worktree description
  git-read-tree.txt: language and typography fixes
  unpack-trees: print "Aborting" to stderr
2011-10-26 16:09:03 -07:00
Junio C Hamano
a574c04fbf Merge branch 'maint-1.7.5' into maint-1.7.6
* maint-1.7.5:
  make the sample pre-commit hook script reject names with newlines, too
  Reindent closing bracket using tab instead of spaces
  Documentation/git-update-index: refer to 'ls-files'
2011-10-26 16:08:19 -07:00
Junio C Hamano
69d61daec7 Merge branch 'maint-1.7.4' into maint-1.7.5
* maint-1.7.4:
  make the sample pre-commit hook script reject names with newlines, too
  Reindent closing bracket using tab instead of spaces
  Documentation/git-update-index: refer to 'ls-files'
2011-10-26 16:08:14 -07:00
Junio C Hamano
ed36a48e6d Merge branch 'maint-1.7.3' into maint-1.7.4
* maint-1.7.3:
  make the sample pre-commit hook script reject names with newlines, too
  Reindent closing bracket using tab instead of spaces
  Documentation/git-update-index: refer to 'ls-files'
2011-10-26 16:08:08 -07:00
Junio C Hamano
eb4e67288b Merge branch 'sn/doc-update-index-assume-unchanged' into maint-1.7.3
* sn/doc-update-index-assume-unchanged:
  Documentation/git-update-index: refer to 'ls-files'
2011-10-26 16:08:00 -07:00
Jim Meyering
c14daa4845 make the sample pre-commit hook script reject names with newlines, too
The sample pre-commit hook script would fail to reject a file name like
"a\nb" because of the way newlines are handled in "$(...)".  Adjust the
test to count filtered bytes and require there be 0.  Also print all
diagnostics to standard error, not stdout, so they will actually be seen.

Signed-off-by: Jim Meyering <meyering@redhat.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-10-26 14:31:14 -07:00
Nguyễn Thái Ngọc Duy
c4c42f2cbd Reindent closing bracket using tab instead of spaces
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-10-23 23:54:58 -07:00
Nguyễn Thái Ngọc Duy
5e82123197 git-read-tree.txt: update sparse checkout examples
The negation example uses '*' to match everything. This used to work
before 9037026 (unpack-trees: fix sparse checkout's "unable to match
directories") because back then, the list of paths is used to match
sparse patterns, so with the patterns

    *
    !subdir/

subdir/ always matches any path that start with subdir/ and "*" has no
chance to get tested. The result is subdir is excluded.

After the said commit, a tree structure is dynamically created and
sparse pattern matching now follows closely how read_directory()
applies .gitignore. This solves one problem, but reveals another one.

With this new strategy, "!subdir/" rule will be only tested once when
"subdir" directory is examined. Entries inside subdir, when examined,
will match "*" and are (correctly) re-added again because any rules
without a slash will match at every directory level. In the end, "*"
can revert every negation rules.

In order to correctly exclude subdir, we must use

    /*
    !subdir

to limit "match all" rule at top level only.

"*" rule has no actual use in sparse checkout and can be confusing to
users. While we can automatically turn "*" to "/*", this violates
.gitignore definition. Instead, discourage "*" in favor of "/*" (in
the second example).

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-09-26 10:00:44 -07:00
Junio C Hamano
6d9990a959 mergetool: no longer need to save standard input
Earlier code wanted to run merge_file and prompt_after_failed_merge
both of which wanted to read from the standard input of the entire
script inside a while loop, which read from a pipe, and in order to
do so, it redirected the original standard input to another file
descriptor. We no longer need to do so after the previous change.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-09-26 09:39:45 -07:00
Jonathon Mah
3e8e691abe mergetool: Use args as pathspec to unmerged files
Mergetool now treats its path arguments as a pathspec (like other git
subcommands), restricting action to the given files and directories.
Files matching the pathspec are filtered so mergetool only acts on
unmerged paths; previously it would assume each path argument was in an
unresolved state, and get confused when it couldn't check out their
other stages.

Running "git mergetool subdir" will prompt to resolve all conflicted
blobs under subdir.

Signed-off-by: Jonathon Mah <me@JonathonMah.com>
Acked-by: David Aguilar <davvid@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-09-26 09:39:36 -07:00
Junio C Hamano
6320526415 Git 1.7.6.4
Signed-off-by: Junio C Hamano <gitster@pobox.com>
v1.7.6.4
2011-09-23 14:43:05 -07:00
Junio C Hamano
a0b1cb60ab Merge branch 'cb/maint-ls-files-error-report' into maint
* cb/maint-ls-files-error-report:
  t3005: do not assume a particular order of stdout and stderr of git-ls-files
  ls-files: fix pathspec display on error
2011-09-23 14:30:49 -07:00
Allan Caffee
85b3c75f4f describe: Refresh the index when run with --dirty
When running git describe --dirty the index should be refreshed.  Previously
the cached index would cause describe to think that the index was dirty when,
in reality, it was just stale.

The issue was exposed by python setuptools which hardlinks files into another
directory when building a distribution.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-09-23 14:28:17 -07:00
Junio C Hamano
84b051462f Merge branch 'jc/maint-clone-alternates' into maint
* jc/maint-clone-alternates:
  clone: clone from a repository with relative alternates
  clone: allow more than one --reference
2011-09-23 14:27:33 -07:00
Junio C Hamano
406c1c4dd4 Merge branch 'nd/maint-clone-gitdir' into maint
* nd/maint-clone-gitdir:
  clone: allow to clone from .git file
  read_gitfile_gently(): rename misnamed function to read_gitfile()
2011-09-23 14:21:39 -07:00
Junio C Hamano
be5acb3b63 Merge branch 'mh/check-ref-format-print-normalize' into maint
* mh/check-ref-format-print-normalize:
  Forbid DEL characters in reference names
  check-ref-format --print: Normalize refnames that start with slashes
2011-09-23 14:20:51 -07:00
Junio C Hamano
503359f13a Merge branch 'mg/branch-set-upstream-previous' into maint
* mg/branch-set-upstream-previous:
  branch.c: use the parsed branch name
2011-09-23 14:16:22 -07:00
Junio C Hamano
40ffc49876 Merge branch 'gb/maint-am-patch-format-error-message' into maint
* gb/maint-am-patch-format-error-message:
  am: format is in $patch_format, not parse_patch
2011-09-23 14:11:18 -07:00
Michael J Gruber
1f1f575ebe git-read-tree.txt: correct sparse-checkout and skip-worktree description
The description of .git/info/sparse-checkout and
skip-worktree is exactly the opposite of what is true, which is:

If a file matches a pattern in sparse-checkout, then (it is to be
checked out and therefore) skip-worktree is unset for that file;
otherwise, it is set (so that it is not checked out).

Currently, the opposite is documented, and (consistently) read-tree's
behavior with respect to bit flips is descibed incorrectly.

Fix it.

In hindsight, it would have been much better to have a "sparse-ignore"
or "sparse-skip" file so that an empty file would mean a full checkout,
and the file logic would be analogous to that of .gitignore, excludes
and skip-worktree.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-09-21 15:05:53 -07:00
Michael J Gruber
cc1a2b66e9 git-read-tree.txt: language and typography fixes
Fix a few missing articles and such, and mark-up 'commands' and `files`
appropriately.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-09-21 15:05:53 -07:00
Michael J Gruber
6f90969ba8 unpack-trees: print "Aborting" to stderr
display_error_msgs() prints all the errors to stderr already (if any),
followed by "Aborting" (if any) to stdout. Make the latter go to stderr
instead.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-09-21 15:05:53 -07:00
Ramsay Jones
e29bee1901 t9159-*.sh: skip for mergeinfo test for svn <= 1.4
t9159 relies on the command-line syntax of svn >= 1.5.  Given the
declining install base of older svn versions, it is not worth our time to
support older svn syntax.

Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Acked-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-09-21 11:59:33 -07:00
Stefan Naewe
acd6d7e70a Documentation/git-update-index: refer to 'ls-files'
'ls-files' refers to 'update-index' to show how the 'assume unchanged'
bit can be seen. This makes the connection 'bi-directional'.

Signed-off-by: Stefan Naewe <stefan.naewe@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-09-21 05:00:20 -07:00
Jay Soffian
e622f41dcd git-mergetool: check return value from read
Mostly fixed already by 6b44577 (mergetool: check return value
from read, 2011-07-01). Catch two uses it missed.

Signed-off-by: Jay Soffian <jaysoffian@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-09-19 17:41:49 -07:00
Thomas Rast
2b4aa89c27 Documentation: basic configuration of notes.rewriteRef
Users had problems finding a working setting for notes.rewriteRef.
Document how to enable rewriting for notes/commits, which should be a
safe setting.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-09-13 08:35:38 -07:00
Haitao Li
ee646eb48f date.c: Support iso8601 timezone formats
Timezone designators in the following formats are all valid according to
ISO8601:2004, section 4.3.2:

    [+-]hh, [+-]hhmm, [+-]hh:mm

but we have ignored the ones with colon so far.

Signed-off-by: Haitao Li <lihaitao@gmail.com>
Helped-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-09-12 16:49:14 -07:00
Junio C Hamano
740a8fc224 Git 1.7.6.3
Signed-off-by: Junio C Hamano <gitster@pobox.com>
v1.7.6.3
2011-09-12 10:33:40 -07:00
Junio C Hamano
8702fee617 Merge branch 'jl/maint-fetch-submodule-check-fix' into maint
* jl/maint-fetch-submodule-check-fix:
  fetch: skip on-demand checking when no submodules are configured
2011-09-12 10:19:57 -07:00
Junio C Hamano
c2d53586dd Prepare for 1.7.6.3 maintenance release
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-09-11 22:33:27 -07:00
Junio C Hamano
e1fd529f2f Merge branch 'ms/reflog-show-is-default' into maint
* ms/reflog-show-is-default:
  reflog: actually default to subcommand 'show'
2011-09-11 22:33:24 -07:00
Junio C Hamano
2f19a52c64 Merge branch 'jk/reset-reflog-message-fix' into maint
* jk/reset-reflog-message-fix:
  reset: give better reflog messages
2011-09-11 22:33:20 -07:00
Junio C Hamano
5d4fcd9ac0 Merge branch 'vi/make-test-vector-less-specific' into maint
* vi/make-test-vector-less-specific:
  tests: cleanup binary test vector files
2011-09-11 22:33:16 -07:00
Junio C Hamano
fcfc2d5879 Merge branch 'jk/tag-contains-ab' (early part) into maint
* 'jk/tag-contains-ab' (early part):
  tag: speed up --contains calculation
2011-09-11 21:54:32 -07:00
Junio C Hamano
908bb1a9b7 Merge branch 'dz/connect-error-report' into maint
* dz/connect-error-report:
  Do not log unless all connect() attempts fail
2011-09-11 21:53:47 -07:00
Junio C Hamano
b3038a5adb Merge branch 'jc/maint-mergetool-read-fix' into maint
* jc/maint-mergetool-read-fix:
  mergetool: check return value from read
2011-09-11 21:53:39 -07:00
Junio C Hamano
eff7c32cfd Merge branch 'jk/maint-config-param' into maint
* jk/maint-config-param:
  config: use strbuf_split_str instead of a temporary strbuf
  strbuf: allow strbuf_split to work on non-strbufs
  config: avoid segfault when parsing command-line config
  config: die on error in command-line config
  fix "git -c" parsing of values with equals signs
  strbuf_split: add a max parameter
2011-09-11 21:53:13 -07:00
Junio C Hamano
7baf32a829 Merge branch 'jn/doc-dashdash' into maint
* jn/doc-dashdash:
  Documentation/i18n: quote double-dash for AsciiDoc
  Documentation: quote double-dash for AsciiDoc

Conflicts:
	Documentation/git-mergetool--lib.txt
2011-09-11 21:52:18 -07:00
Junio C Hamano
3fc44a10f6 Merge branch 'jk/maint-1.7.2-status-ignored' into maint
* jk/maint-1.7.2-status-ignored:
  git status --ignored: tests and docs
  status: fix bug with missing --ignore files

Conflicts:
	Documentation/git-status.txt
	t/t7508-status.sh
2011-09-11 21:51:10 -07:00
Martin von Zweigbergk
b52d00aede remote: only update remote-tracking branch if updating refspec
'git remote rename' will only update the remote's fetch refspec if it
looks like a default one. If the remote has no default fetch refspec,
as in

[remote "origin"]
    url = git://git.kernel.org/pub/scm/git/git.git
    fetch = +refs/heads/*:refs/remotes/upstream/*

we would not update the fetch refspec and even if there is a ref
called "refs/remotes/origin/master", we should not rename it, since it
was not created by fetching from the remote.

Suggested-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Martin von Zweigbergk <martin.von.zweigbergk@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-09-11 21:40:00 -07:00
Martin von Zweigbergk
1822b86a51 remote rename: warn when refspec was not updated
When renaming a remote, we also try to update the fetch refspec
accordingly, but only if it has the default format. For others, such
as refs/heads/master:refs/heads/origin, we are conservative and leave
it untouched. Let's give the user a warning about refspecs that are
not updated, so he can manually update the config if necessary.

Suggested-by: Jeff King <peff@peff.net>
Signed-off-by: Martin von Zweigbergk <martin.von.zweigbergk@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-09-11 21:39:58 -07:00
Martin von Zweigbergk
60e5eee0f1 remote: "rename o foo" should not rename ref "origin/bar"
When renaming a remote called 'o' using 'git remote rename o foo', git
should also rename any remote-tracking branches for the remote. This
does happen, but any remote-tracking branches starting with
'refs/remotes/o', such as 'refs/remotes/origin/bar', will also be
renamed (to 'refs/remotes/foorigin/bar' in this case).

Fix it by simply matching one more character, up to the slash
following the remote name.

Signed-off-by: Martin von Zweigbergk <martin.von.zweigbergk@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-09-11 21:39:56 -07:00
Martin von Zweigbergk
28f555f635 remote: write correct fetch spec when renaming remote 'remote'
When renaming a remote whose name is contained in a configured fetch
refspec for that remote, we currently replace the first occurrence of
the remote name in the refspec. This is correct in most cases, but
breaks if the remote name occurs in the fetch refspec before the
expected place. For example, we currently change

[remote "remote"]
	url = git://git.kernel.org/pub/scm/git/git.git
	fetch = +refs/heads/*:refs/remotes/remote/*

into

[remote "origin"]
	url = git://git.kernel.org/pub/scm/git/git.git
	fetch = +refs/heads/*:refs/origins/remote/*

Reduce the risk of changing incorrect sections of the refspec by
matching the entire ":refs/remotes/<name>/" instead of just "<name>".

Signed-off-by: Martin von Zweigbergk <martin.von.zweigbergk@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-09-11 21:39:55 -07:00
Sverre Rabbelier
30962fb7fb SubmittingPathces: remove Cogito reference
Removing Cogito leaves just git and StGit, which is a rather
incomplete list of git diff tools available. Sidestep the problem
of deciding what tools to mention by not mentioning any.

Signed-off-by: Sverre Rabbelier <srabbelier@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-09-11 20:53:00 -07:00
Jens Lehmann
18322badc2 fetch: skip on-demand checking when no submodules are configured
It makes no sense to do the - possibly very expensive - call to "rev-list
<new-ref-sha1> --not --all" in check_for_new_submodule_commits() when
there aren't any submodules configured.

Leave check_for_new_submodule_commits() early when no name <-> path
mappings for submodules are found in the configuration. To make that work
reading the configuration had to be moved further up in cmd_fetch(), as
doing that after the actual fetch of the superproject was too late.

Reported-by: Martin Fick <mfick@codeaurora.org>
Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-09-09 13:59:20 -07:00