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

25057 Commits

Author SHA1 Message Date
Dan McGee
13ee1384ef Fix two unused variable warnings in gcc 4.6
Seen with -Wunused-but-set-variable.

Signed-off-by: Dan McGee <dpmcgee@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-04-03 10:59:40 -07:00
Dan McGee
37be802240 Remove old binaries from .gitignore
These two programs were dumped a while ago.

Signed-off-by: Dan McGee <dpmcgee@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-04-03 10:32:13 -07:00
Stephen Boyd
1e4cd68c00 sparse: Fix errors and silence warnings
* load_file() returns a void pointer but is using 0 for the return
   value

 * builtin/receive-pack.c forgot to include builtin.h

 * packet_trace_prefix can be marked static

 * ll_merge takes a pointer for its last argument, not an int

 * crc32 expects a pointer as the second argument but Z_NULL is defined
   to be 0 (see 38f4d13 sparse fix: Using plain integer as NULL pointer,
   2006-11-18 for more info)

Signed-off-by: Stephen Boyd <bebarino@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-04-03 10:14:53 -07:00
Junio C Hamano
cb35c0646d Update release notes
As 1.7.4.3 has backmerged a handful of fixes from the master,
drop these entries from 1.7.5 release notes.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-04-03 00:18:50 -07:00
Junio C Hamano
8f84c95fb2 Sync with 1.7.4.3 2011-04-03 00:14:16 -07:00
Junio C Hamano
d83a831bf4 Git 1.7.4.3
Signed-off-by: Junio C Hamano <gitster@pobox.com>
v1.7.4.3
2011-04-03 00:12:31 -07:00
Junio C Hamano
c14f372791 Doc: mention --delta-base-offset is the default for Porcelain commands
The underlying pack-objects plumbing command still needs an explicit
option from the command line, but these days Porcelain passes the
option, so there is no need for end users to worry about it anymore.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-04-02 23:08:13 -07:00
Junio C Hamano
c4b2ce6953 Merge branch 'nd/init-gitdir'
* nd/init-gitdir:
  init, clone: support --separate-git-dir for .git file
  git-init.txt: move description section up

Conflicts:
	builtin/clone.c
2011-04-01 17:57:37 -07:00
Junio C Hamano
ffc5e3c958 Merge branch 'jc/merge-sans-branch'
* jc/merge-sans-branch:
  merge: merge with the default upstream branch without argument
  merge: match the help text with the documentation

Conflicts:
	builtin/merge.c
2011-04-01 17:57:16 -07:00
Junio C Hamano
b966427b53 Merge branch 'jr/grep-en-config'
* jr/grep-en-config:
  grep: allow -E and -n to be turned on by default via configuration
2011-04-01 17:56:27 -07:00
Junio C Hamano
6c80cd298a Merge branch 'ab/i18n-st'
* ab/i18n-st: (69 commits)
  i18n: git-shortlog basic messages
  i18n: git-revert split up "could not revert/apply" message
  i18n: git-revert literal "me" messages
  i18n: git-revert "Your local changes" message
  i18n: git-revert basic messages
  i18n: git-notes GIT_NOTES_REWRITE_MODE error message
  i18n: git-notes basic commands
  i18n: git-gc "Auto packing the repository" message
  i18n: git-gc basic messages
  i18n: git-describe basic messages
  i18n: git-clean clean.requireForce messages
  i18n: git-clean basic messages
  i18n: git-bundle basic messages
  i18n: git-archive basic messages
  i18n: git-status "renamed: " message
  i18n: git-status "Initial commit" message
  i18n: git-status "Changes to be committed" message
  i18n: git-status shortstatus messages
  i18n: git-status "nothing to commit" messages
  i18n: git-status basic messages
  ...

Conflicts:
	builtin/branch.c
	builtin/checkout.c
	builtin/clone.c
	builtin/commit.c
	builtin/grep.c
	builtin/merge.c
	builtin/push.c
	builtin/revert.c
	t/t3507-cherry-pick-conflict.sh
	t/t7607-merge-overwrite.sh
2011-04-01 17:55:55 -07:00
Junio C Hamano
84dd63ee1d Merge branch 'jk/pull-into-empty'
* jk/pull-into-empty:
  pull: do not clobber untracked files on initial pull
  merge: merge unborn index before setting ref
2011-04-01 17:50:54 -07:00
Junio C Hamano
82d861f9d6 Merge branch 'sb/sparse-more'
* sb/sparse-more:
  Makefile: Cover more files with make check
2011-04-01 17:50:20 -07:00
Junio C Hamano
142c945e6e Merge branch 'maint'
* maint:
  docs: fix filter-branch subdir example for exotic repo names
2011-04-01 17:45:59 -07:00
Junio C Hamano
094574b32b Merge branch 'nd/index-doc' into maint
* nd/index-doc:
  doc: technical details about the index file format
  doc: technical details about the index file format
2011-04-01 16:23:55 -07:00
Junio C Hamano
2aa5b6b6c0 Merge branch 'pk/stash-apply-status-relative' into maint
* pk/stash-apply-status-relative:
  Add test: git stash shows status relative to current dir
  git stash: show status relative to current directory
2011-04-01 16:23:43 -07:00
Junio C Hamano
bcf3d1fd9c Merge branch 'jc/maint-diff-q-filter' into maint
* jc/maint-diff-q-filter:
  diff --quiet: disable optimization when --diff-filter=X is used
2011-04-01 16:23:34 -07:00
Junio C Hamano
bf87e09325 Merge branch 'js/maint-stash-index-copy' into maint
* js/maint-stash-index-copy:
  stash: copy the index using --index-output instead of cp -p
  stash: fix incorrect quoting in cleanup of temporary files
2011-04-01 16:23:21 -07:00
Junio C Hamano
b7f6afe2df Merge branch 'mg/doc-bisect-tweak-worktree' into maint
* mg/doc-bisect-tweak-worktree:
  git-bisect.txt: example for bisecting with hot-fix
  git-bisect.txt: streamline run presentation
2011-04-01 16:23:15 -07:00
Junio C Hamano
ac53196d9a Merge branch 'jh/maint-do-not-track-non-branches' into maint
* jh/maint-do-not-track-non-branches:
  branch/checkout --track: Ensure that upstream branch is indeed a branch
2011-04-01 16:20:45 -07:00
Junio C Hamano
f35bb7c38d Merge branch 'fk/maint-cvsimport-early-failure' into maint
* fk/maint-cvsimport-early-failure:
  git-cvsimport.perl: Bail out right away when reading from the server fails
2011-04-01 16:20:24 -07:00
Junio C Hamano
4584c94f0e Merge branch 'jc/maint-apply-report-offset' into maint
* jc/maint-apply-report-offset:
  apply -v: show offset count when patch did not apply exactly
2011-04-01 16:20:19 -07:00
Junio C Hamano
b46c9fafcf Merge branch 'jc/maint-apply-no-double-patch' into maint
* jc/maint-apply-no-double-patch:
  apply: do not patch lines that were already patched
2011-04-01 16:20:11 -07:00
Junio C Hamano
46a1f0728c Merge branch 'js/checkout-untracked-symlink' into maint
* js/checkout-untracked-symlink:
  do not overwrite untracked symlinks
  Demonstrate breakage: checkout overwrites untracked symlink with directory
2011-04-01 16:19:03 -07:00
Junio C Hamano
d12d8ec9d7 Merge "checkout ambiguous ref bugfix" into maint
* commit '0cb6ad3':
  checkout: fix bug with ambiguous refs
2011-04-01 16:16:51 -07:00
Junio C Hamano
3add01bbf1 "log --cherry-pick" documentation regression fix
Earlier f98fd43 (git-log.txt,rev-list-options.txt: put option blocks in
proper order, 2011-03-08) moved the text around in the documentation for
options in the rev-list family of commands such as "log".  Consequently,
the description of the --cherry-pick option appears way above the
description of the --left-right option now.

But the description of the --cherry-pick option still refers to the
example for the --left-right option, like this:

    ... with --left-right, like the example ABOVE in the description of
    that option.

Rephrase it to clarify that we are making a forward reference.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-04-01 15:14:38 -07:00
Michael J Gruber
61e508d973 revisions.txt: structure with a labelled list
Currently, the reader has to parse a textual description in order to
find a specific syntax in the list.

Restructure as a labelled list with systematic labels as well as
concrete examples as a visual guide.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-04-01 15:08:32 -07:00
Michael J Gruber
83456b1352 revisions.txt: consistent use of quotes
Our use of quotes is inconsistent everywhere and within some files.
Before reworking the structure of revisions.txt, make the quotes
consistent:

`git command`

'some snippet or term'

The former gets typeset as code, the latter with some form of emphasis.
the man backend uses two types of emphasis.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-04-01 15:06:54 -07:00
Jeff King
6cb0186a41 docs: fix filter-branch subdir example for exotic repo names
The GIT_INDEX_FILE variable we get from git has the full
path to the repo, which may contain spaces. When we use it
in our shell snippet, it needs to be quoted.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-04-01 12:17:45 -07:00
Junio C Hamano
6acef04358 Git 1.7.5-rc0
Signed-off-by: Junio C Hamano <gitster@pobox.com>
v1.7.5-rc0
2011-03-31 13:58:47 -07:00
Junio C Hamano
bcef9b6327 Merge branch 'maint'
* maint:
  parse-remote: typofix
2011-03-30 19:33:53 -07:00
Junio C Hamano
2352570bf4 parse-remote: typofix
An earlier patch had a trivial typo that two people did not notice.
Pointed out by Michael Schubert.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-03-30 19:33:41 -07:00
Nicolas Morey-Chaisemartin
313ee0d69f submodule: process conflicting submodules only once
During a merge module_list returns conflicting submodules several times
(stage 1,2,3) which caused the submodules to be used multiple times in
git submodule init, sync, update and status command.

There are 5 callers of module_list; they all read (mode, sha1, stage,
path) tuple, and most of them care only about path.  As a first level
approximation, it should be Ok (in the sense that it does not make things
worse than it currently is) to filter the duplicate paths from module_list
output, but some callers should change their behaviour when the merge in
the superproject still has conflicts.

Notice the higher-stage entries, and emit only one record from
module_list, but while doing so, mark the entry with "U" (not [0-3]) in
the $stage field and null out the SHA-1 part, as the object name for the
lowest stage does not give any useful information to the caller, and this
way any caller that uses the object name would hopefully barf.  Then
update the codepaths for each subcommands this way:

 - "update" should not touch the submodule repository, because we do not
   know what commit should be checked out yet.

 - "status" reports the conflicting submodules as 'U000...000' and does
   not recurse into them (we might later want to make it recurse).

 - The command called by "foreach" may want to do whatever it wants to do
   by noticing the merged status in the superproject itself, so feed the
   path to it from module_list as before, but only once per submodule.

 - "init" and "sync" are unlikely things to do while the superproject is
   still not merged, but as long as a submodule is there in $path, there
   is no point skipping it. It might however want to take the merged
   status of .gitmodules into account, but that is outside of the scope of
   this topic.

Acked-by: Jens Lehmann <Jens.Lehmann@web.de>
Thanks-to: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Nicolas Morey-Chaisemartin <nicolas@morey-chaisemartin.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-03-30 17:34:08 -07:00
Junio C Hamano
17a0299807 Merge branch 'maint'
* maint:
  contrib/thunderbird-patch-inline: do not require bash to run the script
  t8001: check the exit status of the command being tested
  strbuf.h: remove a tad stale docs-in-comment and reference api-doc instead
  Typos: t/README
  Documentation/config.txt: make truth value of numbers more explicit
  git-pack-objects.txt: fix grammatical errors
  parse-remote: replace unnecessary sed invocation
2011-03-30 14:10:41 -07:00
Jeff King
0990248610 remote: deprecate --mirror
The configuration created by plain --mirror is dangerous and
useless, and we now have --mirror=fetch and --mirror=push to
replace it. Let's warn the user.

One alternative to this is to try to guess which type the
user wants. In a non-bare repository, a fetch mirror doesn't
make much sense, since it would overwrite local commits. But
in a bare repository, you might use either type, or even
both (e.g., if you are acting as an intermediate drop-point
across two disconnected networks).

So rather than try for complex heuristics, let's keep it
simple. The user knows what they're trying to do, so let
them tell us.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-03-30 13:47:54 -07:00
Jeff King
a9f5a3558d remote: separate the concept of push and fetch mirrors
git-remote currently has one option, "--mirror", which sets
up mirror configuration which can be used for either
fetching or pushing. It looks like this:

  [remote "mirror"]
    url = wherever
    fetch = +refs/*:refs/*
    mirror = true

However, a remote like this can be dangerous and confusing.
Specifically:

  1. If you issue the wrong command, it can be devastating.
     You are not likely to "push" when you meant to "fetch",
     but "git remote update" will try to fetch it, even if
     you intended the remote only for pushing. In either
     case, the results can be quite destructive. An
     unintended push will overwrite or delete remote refs,
     and an unintended fetch can overwrite local branches.

  2. The tracking setup code can produce confusing results.
     The fetch refspec above means that "git checkout -b new
     master" will consider refs/heads/master to come from
     the remote "mirror", even if you only ever intend to
     push to the mirror. It will set up the "new" branch to
     track mirror's refs/heads/master.

  3. The push code tries to opportunistically update
     tracking branches. If you "git push mirror foo:bar",
     it will see that we are updating mirror's
     refs/heads/bar, which corresponds to our local
     refs/heads/bar, and will update our local branch.

To solve this, we split the concept into "push mirrors" and
"fetch mirrors". Push mirrors set only remote.*.mirror,
solving (2) and (3), and making an accidental fetch write
only into FETCH_HEAD. Fetch mirrors set only the fetch
refspec, meaning an accidental push will not force-overwrite
or delete refs on the remote end.

The new syntax is "--mirror=<fetch|push>". For
compatibility, we keep "--mirror" as-is, setting up both
types simultaneously.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-03-30 13:47:53 -07:00
Jeff King
13fc2c1877 remote: disallow some nonsensical option combinations
It doesn't make sense to use "-m" on a mirror, since "-m"
sets up the HEAD symref in the remotes namespace, but with
mirror, we are by definition not using a remotes namespace.

Similarly, it does not make much sense to specify refspecs
with --mirror. For a mirror you plan to push to, those
refspecs will be ignored. For a mirror you are fetching
from, there is no point in mirroring, since the refspec
specifies everything you want to grab.

There is one case where "--mirror -t <X>" would be useful.
Because <X> is used as-is in the refspec, and because we
append it to to refs/, you could mirror a subset of the
hierarchy by doing:

  git remote add --mirror -t 'tags/*'

But using anything besides a single branch as an argument to
"-t" is not documented and only happens to work, so closing
it off is not a serious regression.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-03-30 13:47:51 -07:00
Joe Ratterman
b22520a37c grep: allow -E and -n to be turned on by default via configuration
Add two configration variables grep.extendedRegexp and grep.lineNumbers to
allow the user to skip typing -E and -n on the command line, respectively.

Scripts that are meant to be used by random users and/or in random
repositories now have use -G and/or --no-line-number options as
appropriately to override the settings in the repository or user's
~/.gitconfig settings. Just because the script didn't say "git grep -n" no
longer guarantees that the output from the command will not have line
numbers.

Signed-off-by: Joe Ratterman <jratt0@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-03-30 13:17:07 -07:00
Maxin john
806e0aba2e contrib/thunderbird-patch-inline: do not require bash to run the script
The script does not have to be run under bash, but any POSIX compliant
shell would do, as it does not use any bash-isms.

It may be written under a different style than what is recommended in
Documentation/CodingGuidelines, but that is a different matter.

While at it, fix obvious typos in the comment.

Signed-off-by: Maxin B. John <maxin@maxinbjohn.info>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-03-30 12:29:39 -07:00
Junio C Hamano
4b705f4052 t8001: check the exit status of the command being tested
Avoid running the command being tested as an upstream of a pipe;
doing so will lose its exit status.

While at it, modernise the style of the script.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-03-30 12:22:05 -07:00
Michael Witten
e0390119b2 strbuf.h: remove a tad stale docs-in-comment and reference api-doc instead
Signed-off-by: Michael Witten <mfwitten@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-03-30 12:02:50 -07:00
Michael Witten
63d3294593 Typos: t/README
Signed-off-by: Michael Witten <mfwitten@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-03-30 11:59:52 -07:00
Carlos Martín Nieto
18b19e443b Documentation/config.txt: make truth value of numbers more explicit
Change the order to 1/0 to have the same true/false order as the rest
of the possibilities for a boolean variable in order not not confuse
users.

Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-03-30 11:44:59 -07:00
Stephen Boyd
2f8ee02c49 git-pack-objects.txt: fix grammatical errors
Signed-off-by: Stephen Boyd <bebarino@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-03-30 11:43:15 -07:00
Stephen Boyd
9ecd3ada6d parse-remote: replace unnecessary sed invocation
Just use parameter expansion instead.

Signed-off-by: Stephen Boyd <bebarino@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-03-30 11:42:08 -07:00
Junio C Hamano
44a9cedb00 Merge branch 'svn-fe' of git://repo.or.cz/git/jrn
* 'svn-fe' of git://repo.or.cz/git/jrn:
  tests: kill backgrounded processes more robustly
  vcs-svn: a void function shouldn't try to return something
  tests: make sure input to sed is newline terminated
  vcs-svn: add missing cast to printf argument
2011-03-30 10:49:13 -07:00
Jeff King
a892a2ddfe tests: kill backgrounded processes more robustly
t0081 creates several background processes that write to a fifo and
then go to sleep for a while (so the reader of the fifo does not see
EOF).

Each background process is made in a curly-braced block in the shell,
and after we are done reading from the fifo, we use "kill $!" to kill
it off.

For a simple, single-command process, this works reliably and kills
the child sleep process. But for more complex commands like
"make_some_output && sleep", the results are less predictable. When
executing under bash, we end up with a subshell that gets killed by
the $! but leaves the sleep process still alive.

This is bad not only for process hygeine (we are leaving random sleep
processes to expire after a while), but also interacts badly with the
"prove" command. When prove executes a test, it does not realize the
test is done when it sees SIGCHLD, but rather waits until the test's
stdout pipe is closed. The orphaned sleep process may keep that pipe
open via test-lib's file descriptor 5, causing prove to hang for 100
seconds.

The solution is to explicitly use a subshell and to exec the final
sleep process, so that when we "kill $!" we get the process id of the
sleep process.

[jn: original patch by Jeff had some additional bits:

   1. Wrap the "kill" in a test_when_finished, since we want
      to clean up the process whether the test succeeds or not.

   2. The "kill" is part of our && chain for test success. It
      probably won't fail, but it can if the process has
      expired before we manage to kill it. So let's mark it
      as OK to fail.

 I'm postponing that for now.]

Reported-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
2011-03-29 23:18:27 -05:00
Junio C Hamano
537d990337 Merge branch 'maint'
* maint:
  HOME must be set before calling git-init when creating test repositories
2011-03-29 14:09:15 -07:00
Junio C Hamano
96220d837c Merge branch 'jc/fetch-progressive-stride'
* jc/fetch-progressive-stride:
  Fix potential local deadlock during fetch-pack
2011-03-29 14:09:08 -07:00
Junio C Hamano
2eee1393f3 Merge branches 'sp/maint-fetch-pack-stop-early' and 'sp/maint-upload-pack-stop-early'
* sp/maint-fetch-pack-stop-early:
  enable "no-done" extension only when fetching over smart-http

* sp/maint-upload-pack-stop-early:
  enable "no-done" extension only when serving over smart-http
2011-03-29 14:09:02 -07:00