IRIX 6.5 has a default maximum argument list length of 20480. The file
glob that is passed to aggregate-results currently exceeds this length, and
so the script cannot run successfully. Work around this issue by passing
the file names in via the standard input rather than the argument list.
Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
The unset builtin of Solaris's xpg4/sh returns non-zero if it is passed a
variable name which was not previously set. Since the unset is not likely
to fail, ignore its return status, but add a semicolon as a clue that the
'&&' was deliberately left off.
Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Acked-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Solaris's xpg4/sed and IRIX's sed fail to parse these negated matching
expressions when the '!' is separated from the command that follows.
Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Acked-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
The -e option causes the shell to exit immediately when a command exits
with a non-zero exit status. This does not seem to cause a problem for
Bash, but it does cause a problem for the Korn shell, like Solaris's
xpg4/sh, whose unset utility returns non-zero if it is passed a variable
name which was not previously set. When using xpg4/sh, git-request-pull
exits while sourcing git-sh-setup since git-sh-setup tries to unset the
CDPATH environment variable.
When git-request-pull was originally written, it did not do any error
checking and it used this shell feature to exit when an error occurred.
This script now performs proper error checking and provides useful error
messages, so this -e option appears to be merely a historical artifact and
can be removed.
Kudos to Jonathan Nieder for introducing t5150 which exercises the
request-pull code path.
Suggested-by: Brandon Casey <drafnel@gmail.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This test script depends on the git-remote-testgit python script. This
python script makes use of the hashlib module which was released in python
version 2.5. So, add a new pre-requisite named PYTHON_2_5_OR_NEWER to
test-lib.sh and check for it in t5800.
Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
To show the last two commits with one command, one might try
1) git show -s master~2..
2) git show -s ^master~2 master
3) git show -s master^ master
4) git show -s -2 master
Choice (3) works because both commits are listed on the command line.
Choices (1) and (2) have worked ever since v1.6.4-rc~3 (Make 'git
show' more useful, 2009-07-13) disabled --no-walk in this case because
there is no other useful meaning for them to have. Unfortunately, (4)
does not work: it outputs only one commit, because --no-walk stays on.
So disable --no-walk in this case so ‘git show’ and future ‘git
cherry-pick’ can behave as expected.
As a side effect, this unfortunately changes the meaning of
‘git log --oneline --decorate --no-walk -5 --all’: instead of listing
five refs, after this patch that command would list the five most
recent commits.
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Patterns containing a / are implicitly anchored to the directory
containing the relevant .gitignore file.
Patterns not containing a / are textual matches against the path
name relative to the directory containing .gitignore.
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
When -h is used, print usage messages on stdout. If a command is invoked with
wrong arguments then print the usage messages on stderr.
Signed-off-by: Giuseppe Scrivano <gscrivano@gnu.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commit e498257d introduced a typo while improving the GMail section
of SubmittingPatches.
Signed-off-by: Tim Henigan <tim.henigan@gmail.com>
Acked-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Add support for google's chrome & chromium. The value of the
browser is 'chromium' or 'chrome' to select it.
You can always provide config variable for browser path if they
are not installed in right paths.
Signed-off-by: Pavan Kumar Sunkara <pavan.sss1991@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
'--color-words' algorithm can be described as:
1. collect a the minus/plus lines of a diff hunk, divided into
minus-lines and plus-lines;
2. break both minus-lines and plus-lines into words and
place them into two mmfile_t with one word for each line;
3. use xdiff to run diff on the two mmfile_t to get the words level diff;
And for the common parts of the both file, we output the plus side text.
diff_words->current_plus is used to trace the current position of the plus file
which printed. diff_words->last_minus is used to trace the last minus word
printed.
For '--graph' to work with '--color-words', we need to output the graph prefix
on each line of color words output. Generally, there are two conditions on
which we should output the prefix.
1. diff_words->last_minus == 0 &&
diff_words->current_plus == diff_words->plus.text.ptr
that is: the plus text must start as a new line, and if there is no minus
word printed, a graph prefix must be printed.
2. diff_words->current_plus > diff_words->plus.text.ptr &&
*(diff_words->current_plus - 1) == '\n'
that is: a graph prefix must be printed following a '\n'
Signed-off-by: Bo Yang <struggleyb.nku@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
It will look better if the 'git log --graph' print
the graph pading lines before the diff output just
like what it does for commit message.
And this patch leverage the new diff prefix callback
function to achieve this.
Signed-off-by: Bo Yang <struggleyb.nku@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Since the graph prefix will be printed when calling
emit_line, so the functions should be used to emit a
complete line out once a time. No one should call
emit_line to just output some strings instead of a
complete line.
Use a strbuf to compose the whole line, and then
call emit_line to output it once.
Signed-off-by: Bo Yang <struggleyb.nku@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Change output from diff with -p/--dirstat/--binary/--numstat/--stat/
--shortstat/--check/--summary options to align with graph paddings.
Thanks Jeff King <peff@peff.net> for reporting the '--summary' bug and
his initial patch.
Signed-off-by: Bo Yang <struggleyb.nku@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
There is an empty line between the commit message and the diff
output. Add the graph columns as prefix of this line.
Signed-off-by: Bo Yang <struggleyb.nku@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
The callback can be used to add some prefix string to each line of
diff output.
Signed-off-by: Bo Yang <struggleyb.nku@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-instaweb in its current form (re)creates gitweb.cgi and
(some of) required static files in $GIT_DIR/gitweb/ directory.
Splitting gitweb would make it difficult for git-instaweb to
continue with this method.
Use the instaweb.gitwebdir config variable to point git-instaweb script
to a global directory which contains gitweb files as server root
and the httpd.conf along with server logs and pid go into
'$(GIT_DIR)/gitweb' directory.
Signed-off-by: Pavan Kumar Sunkara <pavan.sss1991@gmail.com>
Mentored-by: Christian Couder <chriscool@tuxfamily.org>
Mentored-by: Petr Baudis <pasky@ucw.cz>
Acked-by: Jakub Narebski <jnareb@gmail.com>
Acked-by: Petr Baudis <pasky@suse.cz>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Resolve full httpd and create "$httpd_only" subdirectory before
writing httpd.conf so that error.log and access.log go into it.
While at it, change apache2 configuration to use logs in a
similiar fashion.
Signed-off-by: Pavan Kumar Sunkara <pavan.sss1991@gmail.com>
Mentored-by: Christian Couder <chriscool@tuxfamily.org>
Mentored-by: Petr Baudis <pasky@ucw.cz>
Acked-by: Petr Baudis <pasky@suse.cz>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Currently installing gitweb requires to give a target directory
(via 'gitwebdir' build variable). Giving it a default value
protects against user errors.
Signed-off-by: Pavan Kumar Sunkara <pavan.sss1991@gmail.com>
Mentored-by: Christian Couder <chriscool@tuxfamily.org>
Mentored-by: Petr Baudis <pasky@ucw.cz>
Acked-by: Jakub Narebski <jnareb@gmail.com>
Acked-by: Petr Baudis <pasky@suse.cz>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Create a new subdirectory called 'static' in gitweb/, and move
all static files required by gitweb.cgi when running, which means
styles, images and Javascript code. This should make gitweb more
readable and easier to maintain.
Update t/gitweb-lib.sh to reflect this change.The install-gitweb
now also include moving of static files into 'static' subdirectory
in target directory: update Makefile, gitweb's INSTALL, README and
Makefile accordingly.
Signed-off-by: Pavan Kumar Sunkara <pavan.sss1991@gmail.com>
Mentored-by: Christian Couder <chriscool@tuxfamily.org>
Mentored-by: Petr Baudis <pasky@ucw.cz>
Acked-by: Jakub Narebski <jnareb@gmail.com>
Acked-by: Petr Baudis <pasky@suse.cz>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Strip out options before checking for a missing upstream argument.
Before:
$ git rebase -m
shift: 426: can't shift that many
After:
$ git rebase -m
Usage: git rebase ...
While at it, fix the usage message to explain that the upstream
argument is mandatory.
Reported-by: Jon Dowland <jmtd@debian.org>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
To the first-time reader, it may not be obvious that ‘git checkout’
has two modes, nor that if no branch is specified it will read
from the index.
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Particularly in the context of rebase, conflicts frequently occur
because the change in the patch to be applied was made obsolete by new
upstream commits. In this case, solving the conflict effectively means
skipping the patch. However, it's not always readily apparent that the
patch needs to be skipped, and when people solve the conflict and try
git rebase --continue, they get confronted with a message of
No changes - did you forget to use 'git add'?
That's not very helpful if you did actually stage your changes and they
happen to turn the patch into a no-op. This extends the message to point
out what's going on.
Signed-off-by: Jan Krüger <jk@jk.gs>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio originally added this in f6276fe159 for use in `unshift @INC,
'@@INSTLIBDIR@@'' in git-fmt-merge-msg.perl. That program was since
then rewritten in C in 00449f992b. And since 6fcca938b0 all Perl
programs use `use lib' to set their @INC path.
There's been no @@INSTLIBDIR@@ in any Perl script to replace since
then. So there's no reason to keep it around.
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
In the metainfo section of git diffs there's an "index" line providing
abbreviated (unless --full-index is used) blob SHA1s from the
pre-/post-images used to generate the diff. These provide hints that
can be used to reconstruct a 3-way merge when applying the patch
(see the --3way option to 'git am' for more details).
In order for this to work, however, the blob SHA1s must not be
abbreviated into ambiguity.
This patch eliminates the possible ambiguity by using find_unique_abbrev()
to produce the abbreviated SHA1s (instead of blind abbreviation by way of
"%.*s").
A testcase verifying the fix is also included.
Signed-off-by: Johan Herland <johan@herland.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Although configure takes care of most of this, set some default values
for Solaris 2.6 (aka SunOS-5.6) to ensure git compiles even when
configure is not used to build it.
Signed-off-by: Gary V. Vaughan <gary@thewrittenword.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Compiler support for inline is sometimes buggy, and occasionally
missing entirely. This patch adds a test for inline support, and
redefines the keyword with the preprocessor if necessary at compile
time.
Signed-off-by: Gary V. Vaughan <gary@thewrittenword.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Some platforms do not have a socklen_t type declaration.
Signed-off-by: Gary V. Vaughan <gary@thewrittenword.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Being careful not to overwrite the results of testing for hstrerror in
libresolv, also test whether inet_ntop/inet_pton are available from
that library.
Signed-off-by: Gary V. Vaughan <gary@thewrittenword.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This patch improves the logic of the test for hstrerror, not to
blindly assume that if there is no hstrerror in libc that it must
exist in libresolv.
Signed-off-by: Gary V. Vaughan <gary@thewrittenword.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Some platforms with mmap() lack MAP_FAILED definition.
Signed-off-by: Gary V. Vaughan <gary@thewrittenword.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
By default the testsuite calls 'diff -u' whenever a file comparison is
called for. Unfortunately that throws a "diff: unknown option '-u'"
error for most non-GNU diffs.
This patch sets GIT_TEST_CMP to 'cmp' on all the architectures where
that happens. The previous version of this patch forgot to export
GIT_TEST_CMP from t/Makefile, which is why 'make test' continued to
fail most tests on most architectures - test-lib.sh was falling back
on its default of `diff -u' for GIT_TEST_CMP. This version of this
patch shows a vast improvement in testsuite results where either GNU
diff is in the path at configure time, or where Makefile knows that
GIT_TEST_CMP=cmp is required.
Signed-off-by: Gary V. Vaughan <gary@thewrittenword.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
In tests, call test_cmp rather than raw diff where possible (i.e. if
the output does not go to a pipe), to allow the use of, say, 'cmp'
when the default 'diff -u' is not compatible with a vendor diff.
When that is not possible, use $DIFF, as set in GIT-BUILD-OPTIONS.
Signed-off-by: Gary V. Vaughan <gary@thewrittenword.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Some of the flags used with the first diff found in PATH cause the
vendor diff to choke.
Signed-off-by: Gary V. Vaughan <gary@thewrittenword.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Without this patch at least IBM VisualAge C 5.0 (I have 5.0.2) on AIX
5.1 fails to compile git.
enum style is inconsistent already, with some enums declared on one
line, some over 3 lines with the enum values all on the middle line,
sometimes with 1 enum value per line... and independently of that the
trailing comma is sometimes present and other times absent, often
mixing with/without trailing comma styles in a single file, and
sometimes in consecutive enum declarations.
Clearly, omitting the comma is the more portable style, and this patch
changes all enum declarations to use the portable omitted dangling
comma style consistently.
Signed-off-by: Gary V. Vaughan <gary@thewrittenword.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Without this patch, systems that provide stubs for pthread functions
in libc, but which still require libpthread for full the pthread
implementation are not detected correctly.
Also, some systems require -pthread in CFLAGS for each compilation
unit for a successful link of an mt binary, which is also addressed by
this patch.
Signed-off-by: Gary V. Vaughan <gary@thewrittenword.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Unfortunately, there are still plenty of production systems with
vendor compilers that choke unless all compound declarations can be
determined statically at compile time, for example hpux10.20 (I can
provide a comprehensive list of our supported platforms that exhibit
this problem if necessary).
This patch simply breaks apart any compound declarations with dynamic
initialisation expressions, and moves the initialisation until after
the last declaration in the same block, in all the places necessary to
have the offending compilers accept the code.
Signed-off-by: Gary V. Vaughan <gary@thewrittenword.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Without this patch there is no straight forward way to pass additional
CPPFLAGS at configure-time. At TWW, everything non-vendor package is
installed to its own subdirectory, so we need the following to show
the preprocessor where the headers for the libraries we will link
later can be found:
$SHELL ./configure \
CPPFLAGS="-I${SB_VAR_CURL_INC}\
-I${SB_VAR_LIBEXPAT_INC}\
-I${SB_VAR_LIBZ_INC}\
${CPPFLAGS+ $CPPFLAGS}" <<...>>
Signed-off-by: Gary V. Vaughan <gary@thewrittenword.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
ac8d5af (builtin-status: submodule summary support, 2008-04-12)
intoduced this variable and described it in git-status[1].
Include this description in git-config[1], as well.
Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
* maint:
Makefile: reenable install with NO_CURL
completion: --set-upstream option for git-branch
get_cwd_relative(): do not misinterpret suffix as subdirectory
Setting NO_CURL leaves some variables like REMOTE_CURL_ALIASES
empty, which creates no fun when for-looping over
$(REMOTE_CURL_ALIASES) unconditionally. Make it conditional.
Reported-by: Paul Walker <PWalker752@aol.com>
Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
After c197702 (pretty: Respect --abbrev option), non-abbreviated hashes
began to appear, leading to failures for these tests.
Signed-off-by: Tay Ray Chuan <rctay89@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
daae1922 (fsck: check ident lines in commit objects, 2010-04-24)
taught fsck to expect commit objects to have the form
tree <object name>
<parents>
author <valid ident string>
committer <valid ident string>
log message
The check is overly strict: for example, it errors out with the
message “expected blank line” for perfectly valid commits with an
"encoding ISO-8859-1" line.
Later it might make sense to teach fsck about the rest of the header
and warn about unrecognized header lines, but for simplicity, let’s
accept arbitrary trailing lines for now.
Reported-by: Tuncer Ayaz <tuncer.ayaz@gmail.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>