Граф коммитов

23543 Коммитов

Автор SHA1 Сообщение Дата
Andreas Gruenbacher 9659df5282 Clarify and extend the "git diff" format documentation
Move the similarity and dissimilarity index header description closer to
where those extended headers are described.

Describe and/or clarify the format used for file modes, pathnames, and
the index header.

Document that all "old" files refer to the state before applying the
*entire* output, and all "new" files refer to the state thereafter.

Signed-off-by: Andreas Gruenbacher <agruen@suse.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-10-19 14:15:30 -07:00
Michael J Gruber 9fbd8986bb git-show-ref.txt: clarify the pattern matching
git-show-ref really does not do what one would expect under the name
pattern matching, so describe it.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-10-19 14:15:30 -07:00
Cliff Frey 9373bdc402 documentation: git-config minor cleanups
Change push.default's description to add hyphens between values and
descriptions to make the manpage easier to read.  The html version is
readable either way.

Change status.showUntrackedFiles to make item descriptions be
sentences and to use the same asciidoc format as push.default.  The
only visual change is the additions of "."

Signed-off-by: Cliff Frey <cliff@meraki.com>
Acked-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-10-19 14:15:30 -07:00
Kevin Ballard 27eea66b28 Update test script annotate-tests.sh to handle missing/extra authors
The current script used by annotate-tests.sh (used by t8001 and t8002) fails
to emit a warning if any of the expected authors never show up in the output
or if authors that show up in the output were never specified as expected.
Update the script to fail in both of these scenarios.

Helped-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Kevin Ballard <kevin@sb.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-10-19 14:15:30 -07:00
Junio C Hamano 38a18873b2 Merge branch 'maint'
* maint:
  Better advice on using topic branches for kernel development
  Documentation: update implicit "--no-index" behavior in "git diff"
  Documentation: expand 'git diff' SEE ALSO section
  Documentation: diff can compare blobs
  Documentation: gitrevisions is in section 7
  shell portability: no "export VAR=VAL"
  CodingGuidelines: reword parameter expansion section
  Documentation: update-index: -z applies also to --index-info
  Documentation: No argument of ALLOC_GROW should have side-effects
2010-10-13 20:20:09 -07:00
Luck, Tony 352953a556 Better advice on using topic branches for kernel development
Linus Torvalds wrote:
> The real problem is that maintainers often pick random - and not at
> all stable - points for their development to begin with. They just
> pick some random "this is where Linus -git tree is today", and do
> their development on top of that. THAT is the problem - they are
> unaware that there's some nasty bug in that version.

Maybe they do this because they read it in the Git user-manual.

Fix the manual to give them better guidance.

Signed-off-by: Tony Luck <tony.luck@intel.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-10-13 19:10:56 -07:00
Jonathan Nieder 2475770239 Documentation: update implicit "--no-index" behavior in "git diff"
Originally "--no-index" mode triggered for untracked files within the
tracked tree, but with v1.5.6-rc1~41 (Merge branch 'jc/diff-no-no-index,
2008-05-26) the command was fixed to only implicitly trigger when paths
outside the tracked tree are mentioned.

Reported-by: Yann Dirson <dirson@bertin.fr>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-10-13 19:10:56 -07:00
Jonathan Nieder b77134b068 Documentation: expand 'git diff' SEE ALSO section
Point in many directions in the hope of helping the reader find what
is needed more quickly.

This commit also removes the summary attached to the SEE ALSO entry
for difftool, to avoid making the SEE ALSO list too verbose.  If the
reader wants a summary of the commands referred to, she can always
look to the top of the named pages or to the table of contents on the
main git(1) page.

Suggested-by: Goswin von Brederlow <goswin-v-b@web.de>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-10-13 19:10:56 -07:00
Jonathan Nieder ed84e6d511 Documentation: diff can compare blobs
Meanwhile, there is no plumbing command to compare two blobs.
Strange.

Reported-by: Yann Dirson <dirson@bertin.fr>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-10-13 19:10:56 -07:00
Jonathan Nieder 9d83e3827f Documentation: gitrevisions is in section 7
Fix references to gitrevisions(1) in the manual pages and HTML
documentation.

In practice, this will not matter much unless someone tries to use a
hard copy of the git reference manual.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-10-13 19:10:55 -07:00
David Barr 2794ad5244 fast-import: Allow filemodify to set the root
v1.7.3-rc0~75^2 (Teach fast-import to import subtrees named by tree id,
2010-06-30) has a shortcoming - it doesn't allow the root to be set.
Extend this behaviour by allowing the root to be referenced as the
empty path, "".

For a command (like filter-branch --subdirectory-filter) that wants
to commit a lot of trees that already exist in the object db, writing
undeltified objects as loose files only to repack them later can
involve a significant amount of overhead.
(23% slow-down observed on Linux 2.6.35, worse on Mac OS X 10.6)

Fortunately we have fast-import (which is one of the only git commands
that will write to a pack directly) but there is not an advertised way
to tell fast-import to commit a given tree without unpacking it.

This patch changes that, by allowing

	M 040000 <tree id> ""

as a filemodify line in a commit to reset to a particular tree without
any need to parse it.  For example,

	M 040000 4b825dc642 ""

is a synonym for the deleteall command and the fast-import equivalent of

	git read-tree 4b825dc642

Signed-off-by: David Barr <david.barr@cordelta.com>
Commit-message-by: Jonathan Nieder <jrnieder@gmail.com>
Acked-by: Sverre Rabbelier <srabbelier@gmail.com>
Tested-by: Ramkumar Ramachandra <artagnon@gmail.com>
Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-10-13 15:10:31 -07:00
Junio C Hamano 69ae92bda1 shell portability: no "export VAR=VAL"
It is more portable to say "VAR=VAL && export VAR" instead.

Noticed by Ævar.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-10-13 11:36:36 -07:00
Junio C Hamano bc97994530 CodingGuidelines: reword parameter expansion section
Group entries related to parameter substitutions together and avoid
using the word "regexp" to refer to the ${parameter/pattern/string}
substitution (banned), as the pattern there is a shell glob and not
a regular expression.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-10-13 11:15:14 -07:00
Bert Wesarg 537497be58 Documentation: update-index: -z applies also to --index-info
Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-10-13 11:13:09 -07:00
Jakub Narebski d0af3734f1 gitweb: Improve behavior for actionless path_info gitweb URLs
Eli Barzilay noticed that

  http://server/gitweb/project/<commit-sha1>

link goes to 'shortlog' view, while 'commit' view would be more
useful, but that 'shortlog' action is more apropriate for

  http://server/gitweb/project/<commit-sha1>..<other-commit-sha1>

links.

Therefore for the case when we don't have either action, or filename,
or parent hash [base] in path_info-based URL, i.e. for

  http://server/gitweb/project/<object-id>

link, instead of using 'shortlog' view we allow dispatch() subroutine
to detect type of object and use appropriate action (in most case it
would be either 'commit' action, or 'tag', or 'tree' for top
directory).

Requested-by: Eli Barzilay <eli@barzilay.org>
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Tested-by: Eli Barzilay <eli@barzilay.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-10-13 09:40:38 -07:00
Jakub Narebski 7e00dc58d1 gitweb: Fix bug in evaluate_path_info
There was bug in parsing "project/:/file" and "project/:/" path_info
URLs, with implicit HEAD as 'hash_base'.

For such URLs the refname is empty, and before this fix regexp for
parsing path_info fragment assumed that it is always non-empty.

Refname cannot contain ':', as per 'git check-ref-format'.

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-10-13 09:40:19 -07:00
Jakub Narebski ae5e97ec40 gitweb: Fix test of highlighting support in t9500
The commit 7ce896b (Enable highlight executable path as a
configuration option, 2010-09-21) forgot to update t9500 test.

While at it, describe highlight test better.

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-10-13 09:37:31 -07:00
Michael J Gruber c72781d612 t5503: fix typo
Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-10-08 14:10:33 -07:00
Jonathan Nieder 01f6fd4b4e Documentation: No argument of ALLOC_GROW should have side-effects
The explanatory comment before the definition of ALLOC_GROW carefully
lists arguments that will be used more than once and thus cannot have
side-effects; a lazy reader might conclude that the arguments not
listed are used only once and side effects safe.

Correct it to list all three arguments, avoiding this confusion.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-10-08 13:17:10 -07:00
Štěpán Němec d0bb136630 Fix {update,checkout}-index usage strings
The `<file>' argument is optional in both cases (the man pages are
already correct).

Signed-off-by: Štěpán Němec <stepnem@gmail.com>
Acked-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-10-08 12:31:08 -07:00
Štěpán Němec 884220653f Put a space between `<' and argument in pack-objects usage string
This makes it cosistent with other places (including the
git-pack-objects(1) manpage itself) and avoids possible confusion (I,
for one, mistook `<object-list' for a `<object-list>' typo at first when
preparing this series).

Signed-off-by: Štěpán Němec <stepnem@gmail.com>
Acked-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-10-08 12:31:08 -07:00
Štěpán Němec efc39d6daf Remove stray quotes in --pretty and --format documentation
Quotes (for emphasis) are used in option explanations, not the
headings.

Signed-off-by: Štěpán Němec <stepnem@gmail.com>
Acked-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-10-08 12:31:07 -07:00
Štěpán Němec 0adda9362a Use parentheses and `...' where appropriate
Remove some stray usage of other bracket types and asterisks for the
same purpose.

Signed-off-by: Štěpán Němec <stepnem@gmail.com>
Acked-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-10-08 12:31:07 -07:00
Štěpán Němec 01398df31c Fix odd markup in --diff-filter documentation
Instead of using the regex-like bracket expression, use grouping to make
it more consistent with other similar places. The brackets now have the
same meaning as in other documentation (i.e., the argument is optional).

Signed-off-by: Štěpán Němec <stepnem@gmail.com>
Mentored-and-Acked-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-10-08 12:30:52 -07:00
Štěpán Němec 62b4698e55 Use angles for placeholders consistently
Signed-off-by: Štěpán Němec <stepnem@gmail.com>
Acked-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-10-08 12:29:52 -07:00
Jonathan Nieder 79bc2af5ae commit-tree: free commit message before exiting
This buffer is freed by the C runtime when commit-tree exits moments
later, but freeing it explicitly should make valgrind quieter.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-10-06 20:30:17 -07:00
Junio C Hamano c752e7f3e8 Merge branch 'maint'
* maint:
  t/t3415: use && where applicable.
  SubmittingPatches: Document some extra tags used in commit messages
2010-10-06 13:49:45 -07:00
Yann Dirson 7c6eafa35a t/t3415: use && where applicable.
Signed-off-by: Yann Dirson <ydirson@altern.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-10-06 13:46:02 -07:00
Ramkumar Ramachandra 95b7a41a80 SubmittingPatches: Document some extra tags used in commit messages
Document the meanings of the tags "Reported-by:", "Acked-by:",
"Reviewed-by:" and "Tested-by:" clearly. Also mention that the user is
free to use any custom tags.

Helped-by: Jonathan Nieder <jrnieder@gmail.com>
Liked-by: Sverre Rabbelier <srabbelier@gmail.com>
Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-10-06 13:45:42 -07:00
Brandon Casey 8520913cc5 diffcore-pickaxe.c: a void function shouldn't try to return something
Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-10-06 13:45:18 -07:00
Junio C Hamano dd15c7fffc Make test script t9157 executable
Fixes a buglet introduced by a3c75056d

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-10-06 12:13:20 -07:00
Junio C Hamano 9018af4f98 Merge branch 'jk/repack-reuse-object'
* jk/repack-reuse-object:
  Documentation: pack.compression: explain how to recompress
  repack: add -F flag to let user choose between --no-reuse-delta/object
2010-10-06 12:11:26 -07:00
Junio C Hamano 4ac9aeb2b2 Merge branch 'bc/fix-cherry-pick-root'
* bc/fix-cherry-pick-root:
  builtin/revert.c: don't dereference a NULL pointer
2010-10-06 12:11:20 -07:00
Junio C Hamano 90d6bd5ed3 Merge branch 'uk/fix-author-ident-sed-script'
* uk/fix-author-ident-sed-script:
  get_author_ident_from_commit(): remove useless quoting
2010-10-06 12:11:12 -07:00
Junio C Hamano 314ae0f421 Merge branch 'cw/gitweb-hilite-config'
* cw/gitweb-hilite-config:
  Enable highlight executable path as a configuration option
2010-10-06 12:10:58 -07:00
Junio C Hamano ee79b21778 Merge branch 'ab/makefile-track-cc'
* ab/makefile-track-cc:
  Makefile: add CC to TRACK_CFLAGS
2010-10-06 12:10:29 -07:00
Junio C Hamano a6fa2a87b7 Merge branch 'mg/reset-doc'
* mg/reset-doc:
  git-reset.txt: make modes description more consistent
  git-reset.txt: point to git-checkout
  git-reset.txt: use "working tree" consistently
  git-reset.txt: reset --soft is not a no-op
  git-reset.txt: reset does not change files in target
  git-reset.txt: clarify branch vs. branch head
2010-10-06 12:10:26 -07:00
Junio C Hamano 90215bf300 Merge branch 'maint'
* maint:
  Documentation/git-clone: describe --mirror more verbosely
  do not depend on signed integer overflow
  work around buggy S_ISxxx(m) implementations
  xdiff: cast arguments for ctype functions to unsigned char
  init: plug tiny one-time memory leak
  diffcore-pickaxe.c: remove unnecessary curly braces
  t3020 (ls-files-error-unmatch): remove stray '1' from end of file
  setup: make sure git dir path is in a permanent buffer
  environment.c: remove unused variable
  git-svn: fix processing of decorated commit hashes
  git-svn: check_cherry_pick should exclude commits already in our history
  Documentation/git-svn: discourage "noMetadata"
2010-10-06 12:10:02 -07:00
Junio C Hamano 931c103320 Merge branch 'work/pt/for-junio' of git://repo.or.cz/git/mingw/4msysgit
* 'work/pt/for-junio' of git://repo.or.cz/git/mingw/4msysgit:
  Add MinGW-specific execv() override.
  Fix Windows-specific macro redefinition warning.
  Fix 'clone' failure at DOS root directory.
  mingw: do not crash on open(NULL, ...)
  git-am: fix detection of absolute paths for windows
  Side-step MSYS-specific path "corruption" leading to t5560 failure.
  Side-step sed line-ending "corruption" leading to t6038 failure.
  Skip 'git archive --remote' test on msysGit
  Do not strip CR when grepping HTTP headers.
  Skip t1300.70 and 71 on msysGit.
  merge-octopus: Work around environment issue on Windows
  MinGW: Report errors when failing to launch the html browser.
  MinGW: fix stat() and lstat() implementations for handling symlinks
  MinGW: Add missing file mode bit defines
  MinGW: Use pid_t more consequently, introduce uid_t for greater compatibility
2010-10-06 12:09:27 -07:00
Junio C Hamano adc3192ef9 Martin Langhoff has a new e-mail address
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-10-06 12:08:48 -07:00
Uwe Kleine-König 6db2103f92 Documentation/git-clone: describe --mirror more verbosely
Some people in #linux-rt noticed that describing what "--mirror" option does
with "it mirrors" is way insufficient.

Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Darren 'Some People' Hart <darren@dvhart.com>
Cc: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-10-06 11:24:17 -07:00
Erik Faye-Lund c03c83152d do not depend on signed integer overflow
Signed integer overflow is not defined in C, so do not depend on it.

This fixes a problem with GCC 4.4.0 and -O3 where the optimizer would
consider "consumed_bytes > consumed_bytes + bytes" as a constant
expression, and never execute the die()-call.

Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com>
Acked-by: Nicolas Pitre <nico@fluxnic.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-10-06 11:10:07 -07:00
René Scharfe b90d9b8895 work around buggy S_ISxxx(m) implementations
There are buggy implementations of S_ISxxx(m) macros on some platforms
(e.g. NetBSD).  The issue is that NetBSD doesn't take care to wrap its
macro arguments in parentheses, so on Linux and sane systems we have
S_ISREG(m) defined as something like:

    (((m) & S_IFMT) == S_IFREG)

But on NetBSD:

    ((m & _S_IFMT) == _S_IFREG)

Since a caller in builtin/diff.c called our macro as `S_IFREG | 0644'
this bug introduced a logic error on NetBSD, since the precedence of
bit-wise & is higher than | in C.

[jc: took change description from Ævar Arnfjörð Bjarmason's patch]

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-10-06 10:51:14 -07:00
Jonathan Nieder 349362cc20 xdiff: cast arguments for ctype functions to unsigned char
The ctype functions isspace(), isalnum(), et al take an integer
argument representing an unsigned character, or -1 for EOF.  On
platforms with a signed char, it is unsafe to pass a char to them
without casting it to unsigned char first.

Most of git is already shielded against this by the ctype
implementation in git-compat-util.h, but xdiff, which uses libc
ctype.h, ought to be fixed.

Noticed-by: der Mouse <mouse@Rodents-Montreal.ORG>
Reported-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-10-06 10:46:45 -07:00
Jonathan Nieder 9173912be3 init: plug tiny one-time memory leak
The buffer used to construct paths like ".git/objects/info" and
".git/objects/pack" is allocated on the heap and never freed.

So free it.  While at it, factor out the relevant code into its own
function and rename the sha1_dir variable to object_directory (to
match the change in everyday usage after the renaming of
SHA1_FILE_DIRECTORY in v0.99~603^2~7, 2005).

Noticed by valgrind while setting up tests (in test-lib).

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-10-06 10:46:05 -07:00
Brandon Casey 95ae69b95b diffcore-pickaxe.c: remove unnecessary curly braces
Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-10-05 08:41:58 -07:00
Junio C Hamano d4da4bc764 Merge early part of git-svn into maint
* commit 'git-svn/master~1':
  git-svn: fix processing of decorated commit hashes
  git-svn: check_cherry_pick should exclude commits already in our history
  Documentation/git-svn: discourage "noMetadata"
2010-10-05 08:36:15 -07:00
Stephen Boyd 3c3bb51c3b send-email: Don't leak To: headers between patches
If the first patch in a series has a To: header in the file and the
second patch in the series doesn't the address from the first patch will
be part of the To: addresses in the second patch. Fix this by treating the
to list like the cc list. Have an initial to list come from the command
line, user input and config options. Then build up a to list from each
patch and concatenate the two together before sending the patch. Finally,
reset the list after sending each patch so the To: headers from a patch
don't get used for the next one.

Reported-by: Viresh Kumar <viresh.kumar@st.com>
Signed-off-by: Stephen Boyd <bebarino@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-10-04 00:12:13 -07:00
Elijah Newren 2d2ef5ec82 t3020 (ls-files-error-unmatch): remove stray '1' from end of file
Acked-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-10-03 17:55:22 -07:00
Jonathan Nieder 06f3549d71 setup: make sure git dir path is in a permanent buffer
If setup_git_env() is run before the usual repository discovery
sequence and .git is a file with the text

	gitdir: <path>

(with <path> any string) then the in-core git_dir variable is set to
the result of converting <path> to an absolute path using
make_absolute_path().

Unfortunately make_absolute_path() returns its result in a static
buffer that is overwritten by later calls.  Such a call could cause
later accesses to git_dir (from git_pathdup(), for example) to read
the wrong path, leaving git very confused.

It is not obvious whether any existing code in git will trigger the
problem, but in any case, it is worth a few dozen bytes to copy the
return value from make_absolute_path() for some added peace of mind.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-10-03 16:50:54 -07:00