Commit graph

15767 commits

Author SHA1 Message Date
Thomas Rast 70d9895ebc Documentation: rev-list-options: Rewrite simplification descriptions for clarity
This completely rewrites the documentation of --full-history with lots
of examples.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-12 17:54:06 -07:00
Gustaf Hendeby 23b5beb28f Teach git diff about BibTeX head hunk patterns
All BibTeX entries starts with an @ followed by an entry type.  Since
there are many entry types and own can be defined, the pattern matches
legal entry type names instead of just the default types (which would
be a long list).  The pattern also matches strings and comments since
they will also be useful to position oneself in a bib-file.

Signed-off-by: Gustaf Hendeby <hendeby@isy.liu.se>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-12 15:43:55 -07:00
Gustaf Hendeby d08ed6d692 gitattributes: Document built in hunk header patterns
Since the hunk header pattern text was written patterns for Ruby and
Pascal/Delphi have been added.  For users to be able to find them they
should be documented not only in code.

Signed-off-by: Gustaf Hendeby <hendeby@isy.liu.se>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-12 15:41:32 -07:00
Stephen R. van den Berg bd7b371e9c git-daemon: SysV needs the signal handler reinstated.
Fixes the bug on (amongst others) Solaris that only the first
child ever is reaped.

Signed-off-by: Stephen R. van den Berg <srb@cuci.nl>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-12 15:41:08 -07:00
Shawn O. Pearce 6d6f9cddbe pack-objects: Allow missing base objects when creating thin packs
If we are building a thin pack and one of the base objects we would
consider for deltification is missing its OK, the other side already
has that base object.  We may be able to get a delta from another
object, or we can simply send the new object whole (no delta).

This change allows a shallow clone to store only the objects which
are unique to it, as well as the boundary commit and its trees, but
avoids storing the boundary blobs.  This special form of a shallow
clone is able to represent just the difference between two trees.

Pack objects change suggested by Nicolas Pitre.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Acked-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-12 15:39:46 -07:00
Junio C Hamano 04c6e9e9ca diff --check: do not unconditionally complain about trailing empty lines
Recently "git diff --check" learned to detect new trailing blank lines
just like "git apply --whitespace" does.  However this check should not
trigger unconditionally.  This patch makes it honor the whitespace
settings from core.whitespace and gitattributes.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-11 22:15:28 -07:00
Junio C Hamano 7e4ad90872 Merge branch 'maint'
* maint:
  git-bisect: fix wrong usage of read(1)
2008-08-11 19:24:28 -07:00
Anand Kumria 5b5aa22f00 Put in the two other configuration elements found in the source
I am not entirely clear what these parameters do but felt it
 useful to call them out in the documentation.

Signed-off-by: Anand Kumria <wildfire@progsoc.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-11 18:57:04 -07:00
Anand Kumria b87a659635 Put some documentation in about the parameters that have been added
Signed-off-by: Anand Kumria <wildfire@progsoc.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-11 18:57:04 -07:00
Anand Kumria bc02acfc76 Move git-p4.syncFromOrigin into a configuration parameters section
Signed-off-by: Anand Kumria <wildfire@progsoc.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-11 18:57:04 -07:00
Anand Kumria 3cafb7d8ce Consistently use 'git-p4' for the configuration entries
Signed-off-by: Anand Kumria <wildfire@progsoc.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-11 18:57:04 -07:00
Anand Kumria abcaf07360 If the user has configured various parameters, use them.
Some repositories require authentication and access to certain
 hosts. Allow git-p4 to pull this information from the configuration

Signed-off-by: Anand Kumria <wildfire@progsoc.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-11 18:57:04 -07:00
Anand Kumria 155af83491 Switch to using 'p4_build_cmd'
Signed-off-by: Anand Kumria <wildfire@progsoc.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-11 18:57:04 -07:00
Anand Kumria ee06427aa6 If we are in verbose mode, output what we are about to run (or return)
Signed-off-by: Anand Kumria <wildfire@progsoc.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-11 18:57:04 -07:00
Anand Kumria 21a5075385 Add a single command that will be used to construct the 'p4' command
Rather than having three locations where the 'p4' command is built up,
 refactor this into the one place. This will, eventually, allow us to
 have one place where we modify the evironment or pass extra
 command-line options to the 'p4' binary.

Signed-off-by: Anand Kumria <wildfire@progsoc.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-11 18:57:04 -07:00
Anand Kumria 87b611d5fd Utilise the new 'p4_system' function.
Signed-off-by: Anand Kumria <wildfire@progsoc.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-11 18:57:03 -07:00
Anand Kumria bf9320f151 Have a command that specifically invokes 'p4' (via system)
Similiar to our 'p4_read_pipe_lines' command, we can isolate
 specific changes to the invocation method in the one location
 with this change.

Signed-off-by: Anand Kumria <wildfire@progsoc.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-11 18:57:03 -07:00
Anand Kumria b340fa4301 Utilise the new 'p4_read_pipe_lines' command
Now that we have the new command, we can utilise it and then
 eventually, isolate any changes required to the one place.

Signed-off-by: Anand Kumria <wildfire@progsoc.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-11 18:57:03 -07:00
Anand Kumria 2318121bab Create a specific version of the read_pipe_lines command for p4 invocations
This will make it easier to isolate changes to how 'p4' is invoked
 (whether with parameters or not, etc.).

Signed-off-by: Anand Kumria <wildfire@progsoc.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-11 18:57:03 -07:00
Thomas Rast d777af86d8 Documentation: rev-list-options: Fix a typo
Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-11 17:13:57 -07:00
Petr Baudis 7dce9918c7 Adjust for the new way of enabling the default post-update hook
The post-update hook, which is required to be enabled in order for
the repository to be accessible over HTTP, is not enabled by
chmod a+x anymore, but instead by dropping the .sample suffix.

This patch emphasizes this change in the release notes (since
I believe this is rather noticeable backwards-incompatible change).
It also adjusts the documentation which still described the old way
and fixes t/t5540-http-push.sh, which was broken for 1.5 month
but apparently noone ever runs this test.

Signed-off-by: Petr Baudis <pasky@suse.cz>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-11 17:07:17 -07:00
Francis Moreau e5d3afd78b git-bisect: fix wrong usage of read(1)
Signed-off-by:  Francis Moreau <francis.moro@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-11 16:48:11 -07:00
Nguyễn Thái Ngọc Duy 2860b57a87 Fix typo in comments of longest_ancestor_length()
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-11 16:44:54 -07:00
Junio C Hamano ac39efbdf3 Merge branch 'maint'
* maint:
  Re-fix rev-list-options documentation
2008-08-11 14:28:35 -07:00
Junio C Hamano e534735a4c Re-fix rev-list-options documentation
18a2197 (Documentation: rev-list-options: Fix -g paragraph formatting,
2008-08-10) introduced the third paragraph that is continued, but it seems
to confuse docbook toolchain on FC9 machines.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-11 14:24:51 -07:00
Junio C Hamano 10d9d887ec Merge branch 'maint'
* maint:
  Documentation: fix invalid reference to 'mybranch' in user manual
  Fix deleting reflog entries from HEAD reflog
  reflog test: add more tests for 'reflog delete'
  Documentation: rev-list-options: Fix -g paragraph formatting

Conflicts:
	Documentation/user-manual.txt
2008-08-11 00:53:31 -07:00
Ivan Stankovic 4f80b27d48 Documentation: fix invalid reference to 'mybranch' in user manual
Signed-off-by: Ivan Stankovic <pokemon@fly.srk.fer.hr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-10 23:56:22 -07:00
Junio C Hamano 55beff4f53 Fix deleting reflog entries from HEAD reflog
dwim_ref() used to resolve HEAD symbolic ref to its target (i.e. current
branch).  This incorrectly removed the reflog entry from the current
branch when 'git reflog delete HEAD@{1}' was asked for.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-10 23:21:25 -07:00
Pieter de Bie 38881a9066 reflog test: add more tests for 'reflog delete'
This adds more tests for 'reflog delete' and marks it as
broken, as currently a call to 'git reflog delete HEAD@{1}'
deletes entries in the currently checked out branch's log,
not the HEAD log.

Noticed by John Wiegley

Signed-off-by: Pieter de Bie <pdebie@ai.rug.nl>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-10 23:15:44 -07:00
Thomas Rast 18a2197e6d Documentation: rev-list-options: Fix -g paragraph formatting
- Add an escape to @{now}.  Without the escape, the brace does
  something magic and eats half the sentence up to the closing brace
  at 'timestamp}'.

- Join the last paragraph with a '+'.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-10 23:11:48 -07:00
Alexander Gavrilov df75e86d73 gitk: Allow safely calling nukefile from a run queue handler
Originally dorunq assumed that the queue entry remained first
in the queue after the script eval, and blindly removed it.
However, if the handler calls nukefile, it may not be the
case anymore, and a random queue entry gets dropped instead.

This makes dorunq remove the entry before calling the
script, and adds a global variable to allow other functions
to determine if they are called from within a dorunq handler.

Signed-off-by: Alexander Gavrilov <angavrilov@gmail.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2008-08-11 10:13:50 +10:00
Shawn O. Pearce 1c1fe1005c git-gui 0.11
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2008-08-10 00:02:08 -07:00
Junio C Hamano 71b9979bc7 Update draft RelNotes for 1.6.0
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-09 15:11:48 -07:00
Junio C Hamano 0bb3a0ba9e Merge branch 'maint'
* maint:
  asciidoc markup fixes
  Fail properly when cloning from invalid HTTP URL

Conflicts:
	Documentation/git-push.txt
2008-08-09 01:40:08 -07:00
Junio C Hamano a9fd1383a7 mailinfo: fix MIME multi-part message boundary handling
After finding a MIME multi-part message boundary line, the handle_body()
function is supposed to first flush any accumulated contents from the
previous part to the output stream.  However, the code mistakenly output
the boundary line it found.

The old code that used one global, fixed-length buffer line[] used an
alternate static buffer newline[] for keeping track of this accumulated
contents and flushed newline[] upon seeing the boundary; when 3b6121f
(git-mailinfo: use strbuf's instead of fixed buffers, 2008-07-13)
converted a fixed-length buffer in this program to use strbuf,these two
buffers were converted to "line" and "prev" (the latter of which now has a
much more sensible name) strbufs, but the code mistakenly flushed "line"
(which contains the boundary we have just found), instead of "prev".

This resulted in the first boundary to be output in front of the first
line of the message.

The rewritten implementation of handle_boundary() lost the terminating
newline; this would then result in the second line of the message to be
stuck with the first line.

The is_multipart_boundary() was designed to catch both the internal
boundary and the terminating one (the one with trailing "--"); this also
was broken with the rewrite, and the code in the handle_boundary() to
handle the terminating boundary was never triggered.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-09 01:26:35 -07:00
Pieter de Bie 01144f2095 builtin-rm: Add a --force flag
This adds a --force flag to git-rm, making it somewhat easier for
subversion people to switch.

Signed-off-by: Pieter de Bie <pdebie@ai.rug.nl>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-08 18:27:19 -07:00
Eric Wong 222566e42c git-svn: wrap long lines in a few places
Oops, I let a few patches slip by with long lines in them.
Extracted from an unrelated patch by: Marcus Griep <marcus@griep.us>

Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-08 16:30:12 -07:00
Marcus Griep 570d35c26d git-svn: Allow deep branch names by supporting multi-globs
Some repositories use a deep branching strategy, such as:

    branches/1.0/1.0.rc1
    branches/1.0/1.0.rc2
    branches/1.0/1.0.rtm
    branches/1.0/1.0.gold

Only allowing a single glob stiffles this.

This change allows for a single glob 'set' to accept this deep
branching strategy.

The ref glob depth must match the branch glob depth.  When using
the -b or -t options for init or clone, this is automatically
done.

For example, using the above branches:

  svn-remote.svn.branches = branches/*/*:refs/remote/*/*

gives the following branch names:

  1.0/1.0.rc1
  1.0/1.0.rc2
  1.0/1.0.rtm
  1.0/1.0.gold

[ew:
  * removed unrelated line-wrapping changes
  * fixed line-wrapping in a few more places
  * removed trailing whitespace
  * fixed bashism in test
  * removed unnecessary httpd startup in test
  * changed copyright on tests to 2008 Marcus Griep
  * added executable permissions to new tests
]

Signed-off-by: Marcus Griep <marcus@griep.us>
Acked-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-08 16:29:56 -07:00
Marcus Griep b47ddefe02 Fix multi-glob assertion in git-svn
Fixes bad regex match check for multiple globs (would always return
one glob regardless of actual number).

[ew: fixed a bashism in the test and some minor line-wrapping]

Signed-off-by: Marcus Griep <marcus@griep.us>
Acked-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-08 16:23:32 -07:00
Thomas Rast 261044e85d filter-branch: be more helpful when an annotated tag changes
Previously, git-filter-branch failed if it attempted to update an
annotated tag.  Now we ignore this condition if --tag-name-filter is
given, so that we can later rewrite the tag.  If no such option was
provided, we warn the user that he might want to run with
"--tag-name-filter cat" to achieve the intended effect.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-08 16:19:51 -07:00
Thomas Rast 8afa42101d Documentation: filter-branch: document how to filter all refs
Document the '--' option that can be used to pass rev-list options
(not just arguments), and give an example usage of '-- --all'.  Remove
reference to "the new branch name"; filter-branch takes arbitrary
arguments to rev-list since dfd05e3.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-08 16:16:31 -07:00
Brandon Casey 6dc4627ef4 Makefile: add a target which will abort compilation with ancient shells
This adds a make target which can be used to try to execute certain shell
constructs which are required for compiling and running git.

This patch provides a test for the $() notation for command substition
which is used in the Makefile and extensively in the git scripts.

The make target is named in such a way as to be a hint to the user that
SHELL_PATH should be set to an appropriate shell. If the shell command
fails, the user should receive a message similar to the following:

make: *** [please_set_SHELL_PATH_to_a_more_modern_shell] Error 2

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-08 16:15:17 -07:00
SZEDER Gábor 5a7ebd4faa bash: remove redundant check for 'git stash apply' options
It will never trigger anyway because of the first check, and even if it
would, it would not offer the command line option.

Signed-off-by: SZEDER Gábor <szeder@ira.uka.de>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-08 16:10:39 -07:00
Junio C Hamano b13d44093b GIT-VERSION-GEN: mark the version 'dirty' only if there are modified files
We used to mark the version string with '-dirty' if the cache was not up
to date, but the only thing we want to know is if the binaries are built
from modified source.  Refresh the cache to avoid false dirtyness.

Christian Jaeger noticed this issue while building under fakeroot
environment (without -u) that lies about the file ownership data.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-08 13:31:27 -07:00
Brandon Casey c94c8e5ff6 Makefile: set SHELL to value of SHELL_PATH
Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-08 13:17:25 -07:00
Jonathan Nieder 7be73ae94e Documentation: user-manual: "git commit -a" doesn't motivate .gitignore
"git commit -a" ignores untracked files and follows all tracked
files, regardless of whether they are listed in .gitignore.  So
don't use it to motivate gitignore.

Signed-off-by: Jonathan Nieder <jrnieder@uchicago.edu>
Acked-by: J. Bruce Fields <bfields@fieldses.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-08 13:17:08 -07:00
Eric Wong ba24e7457a git-svn: add ability to specify --commit-url for dcommit
This allows one to use public svn:// URLs for fetch and
svn+ssh:// URLs for committing (without using the complicated
rewriteRoot option, reimporting or git-filter-branch).

Using this can also help avoid unnecessary server
authentication/encryption overhead on busy SVN servers.

Along with the new --revision option, this can also be allowed
to override the branch detection in dcommit, too.  This is
potentially dangerous and not recommended!  (And also purposely
undocumented, but the loaded gun is there in case somebody
wants to make it safe).

Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-08 13:16:47 -07:00
Thomas Rast b3bc97cba4 Documentation: commit-tree: remove 16 parents restriction
ef98c5ca lifted the 16 parents restriction in builtin-commit-tree.c,
but forgot to update the documentation.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-08 03:01:52 -07:00
Junio C Hamano 0f4f4d1597 asciidoc markup fixes
I see quite a few pages on k.org site, e.g.

    http://www.kernel.org/pub/software/scm/git/docs/git-rerere.html
    (scroll down to find "After this test merge")

are misformatted to lose teletype text '+' that is followed by a comma,
and turns the following paragraph all typeset in teletype.

This patch seems to fix the issue at the site (meaning, with the
particular vintage of asciidoc and docbook toolchain), without breaking
things with the version I have at my primary development machine, but
wider testing is very much appreciated.

After this patch,

    git grep '`+`,' -- Documentation

should report noting.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-07 22:41:24 -07:00
Johannes Schindelin 468386a956 clone --mirror: avoid storing repeated tags
With --mirror, clone asks for refs/* already, so it does not need to
ask for ref/tags/*, too.

Noticed by Cesar Eduardo Barros.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-07 21:25:27 -07:00