1
0
mirror of https://github.com/git/git.git synced 2024-09-30 11:21:24 +02:00
Commit Graph

11321 Commits

Author SHA1 Message Date
Junio C Hamano
04b508f22b Merge branch 'jc/logsemantics'
* jc/logsemantics:
  "format-patch --root rev" is the way to show everything.
  Porcelain level "log" family should recurse when diffing.
2007-08-28 21:49:01 -07:00
Junio C Hamano
0c783f66df Documentation/git-diff: A..B and A...B cannot take tree-ishes
As pointed out by Linus, these notations require the endpoints
given by the end user to be commits.  Clarify.

Also, three-dots in AsciiDoc are turned into ellipses unless
quoted with bq.  Be careful.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-08-28 21:47:08 -07:00
Petr Baudis
9d5fc59d12 git-add: Make the filename globbing note a bit clearer
I think the trick with Git-side filename globbing is important and perhaps
not that well known.  Clarify a bit in git-add documentation what it means.

Signed-off-by: Petr Baudis <pasky@suse.cz>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-08-28 21:16:57 -07:00
Petr Baudis
b39c53e662 git-add: Make the "tried to add ignored file" error message less confusing
Currently the error message seems to imply (at least to me) that only
the listed files were withheld and the rest of the files was added to the
index, even though that's obviously not the case.

Signed-off-by: Petr Baudis <pasky@suse.cz>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-08-28 21:15:25 -07:00
Jakub Narebski
ce312affa1 gitweb: Fix escaping HTML of project owner in 'projects_list' and
'summary' views

This for example allows to put email address in the project owner
field in the projects index file (when $projects_list points to
a file, and not to a directory), in the form of:

path/to/repo.git Random+J+Developer+<random@developer.example.org>

Noticed-by: Jon Smirl <jonsmirl@gmail.com>
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Petr Baudis <pasky@suse.cz>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-08-28 21:14:46 -07:00
Junio C Hamano
8a1d076e21 "format-patch --root rev" is the way to show everything.
We used to trigger the special case "things not in origin"
semantics only when one and only one positive ref is given, and
no number (e.g. "git format-patch -4 origin") was specified, and
used the general revision range semantics for everything else.

This narrows the special case a bit more, by making:

	git format-patch --root this_version

to show everything that leads to the named commit.

More importantly, document the two different semantics better.
The generic revision range semantics came later and bolted on
without being clearly documented.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-08-28 00:38:48 -07:00
Junio C Hamano
170c04383b Porcelain level "log" family should recurse when diffing.
Most notably, "git log --name-status" stopped at top level
directory changes without "-r" option.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-08-28 00:10:21 -07:00
Junio C Hamano
a005085240 git-merge: do up-to-date check also for all strategies
This clarifies the logic to omit fast-forward check and omit
trivial merge before running the specified strategy.

The "index_merge" variable started out as a flag to say "do not
do anything clever", but when recursive was changed to skip the
trivial merge, the semantics were changed and the variable alone
does not make sense anymore.

This splits the variable into two, allow_fast_forward (which is
almost always true, and avoids making a merge commit when the
other commit is a descendant of our branch, but is set to false
for ours and subtree) and allow_trivial_merge (which is false
for ours, recursive and subtree).

Unlike the earlier implementation, the "ours" strategy allows an
up-to-date condition.  When we are up-to-date, the result will
be our commit, and by definition, we will have our tree as the
result.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-08-27 23:48:28 -07:00
Junio C Hamano
9277d60233 git --bare cmd: do not unconditionally nuke GIT_DIR
"GIT_DIR=some.where git --bare cmd" and worse yet
"git --git-dir=some.where --bare cmd" were very confusing.  They
both ignored git-dir specified, and instead made $cwd as GIT_DIR.

This changes --bare not to override existing GIT_DIR.

This has been like this for a long time.  Let's hope nobody sane
relied on this insane behaviour.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-08-27 22:44:41 -07:00
Junio C Hamano
6adcca3fe8 Fix initialization of a bare repository
Here is my attempt to fix this with a minimally intrusive patch.

 * As "git --bare init" cannot tell if it was called with --bare or
   just "GIT_DIR=. git init", I added an explicit assignment of
   is_bare_repository_cfg on the codepath for "git --bare".

 * GIT_WORK_TREE alone without GIT_DIR does not make any sense,
   nor GIT_WORK_TREE with an explicit "git --bare".  Catch that
   mistake.  It might make sense to move this check to "git.c"
   side as well, but I tried to shoot for the minimum change for
   now.

 * Some scripts, especially from the olden days, rely on
   traditional GIT_DIR behaviour in "git init".  Namely, these
   are some notable patterns:

   (create a bare repository)
   - mkdir some.git && cd some.git && GIT_DIR=. git init
   - mkdir some.git && cd some.git && git --bare init

   (create a non-bare repository)
   - mkdir .git && GIT_DIR=.git git init
   - mkdir .git && GIT_DIR=`pwd`/.git git init

This comes with a new test script and also passes the existing
test suite, but there may be cases that are still broken with
the current tip of master and this patch does not yet fix.  I'd
appreciate help in straightening this mess out.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-08-27 22:36:43 -07:00
Johannes Schindelin
ac076c29ae name-rev: Fix non-shortest description
Uwe Kleine-König noticed that under certain circumstances, name-rev
picked a non-optimal tag.  Jeff King analyzed that name-rev only
takes into account the number of merge traversals, and then the
_last_ number in the description.

As an easy way to fix it, use a weighting factor for merge traversals:
A merge traversal is now made 65535 times more expensive than a
first-parent traversal.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Acked-by: Uwe Kleine-König <ukleinek@informatik.uni-freiburg.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-08-27 22:36:43 -07:00
Mike Hommey
2b9232cc23 Describe two-dot and three-dot notation for diff endpoints.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-08-27 22:05:19 -07:00
Jari Aalto
6257271629 git-tag(1): Remove duplicate text
Options -d, -l, -v have already been explained in OPTIONS below.

Signed-off-by: Jari Aalto <jari.aalto@cante.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-08-27 01:38:35 -07:00
Petr Baudis
7d479624d4 gitweb: Lift any characters restriction on searched strings
Everything is already fully quoted along the way so I believe this to be
unnecessary at this point. It would pose trouble for regexp searches.

Signed-off-by: Petr Baudis <pasky@suse.cz>
Acked-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-08-27 01:38:25 -07:00
Junio C Hamano
17437d45be RelNotes draft for 1.5.3 update.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-08-26 17:36:10 -07:00
Junio C Hamano
e92ea62425 Merge branch 'master' of git://repo.or.cz/git-gui
* 'master' of git://repo.or.cz/git-gui:
  git-gui: Correct 'git gui blame' in a subdirectory
  git-gui: Do not offer to stage three-way diff hunks into the index
  git-gui: Refactor diff pane popup support for future improvements
  git-gui: Fix "unoptimized loading" to not cause git-gui to crash
  git-gui: Paper bag fix "Stage Hunk For Commit" in diff context menu
  git-gui: Allow git-merge to use branch names in conflict markers
  git-gui: Fix window manager problems on ion3
2007-08-26 17:29:26 -07:00
Brian Hetro
09b0d9dde0 When nothing to git-commit, honor the git-status color setting.
Instead of disabling color all of the time during a git-commit, allow
the user's config preference in the situation where there is nothing
to commit.  In this situation, the status is printed to the terminal
and not sent to COMMIT_EDITMSG, so honoring the status color setting
is expected.

Signed-off-by: Brian Hetro <whee@smaertness.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-08-26 14:01:47 -07:00
Petr Baudis
67aca456a3 gitweb: Fix searchbox positioning
Currently, searchbox is CSS'd to have position: absolute, which has the
unfortunate consequence that if the viewport is too small and can't fit
into the page width together with the navbar, it gets overlapped and part
of the navbar gets obscured. This makes searchbox float: right instead,
thus the navbar simply gets wrapped.

Discovered and fix pointed out by Michael Olson <mwolson@gnu.org>.

Signed-off-by: Petr Baudis <pasky@suse.cz>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-08-26 13:22:40 -07:00
Junio C Hamano
67c10b422c Merge branch 'master' of git://linux-nfs.org/~bfields/git
* 'master' of git://linux-nfs.org/~bfields/git:
  Documentation/user-manual.txt: fix a few omissions of gitlink commands.
  user-manual: fix incorrect header level
  user-manual: use pithier example commit
  user-manual: introduce the word "commit" earlier
  user-manual: minor editing for conciseness
  user-manual: edit "ignoring files" for conciseness
  Documentation/user-manual.txt: fix a few omissions of gitlink commands.
2007-08-26 13:18:12 -07:00
J. Bruce Fields
5071877d2c Merge branch 'maint'
Conflicts:

	Documentation/user-manual.txt
2007-08-26 10:36:38 -04:00
David Kastrup
a115daff12 Documentation/user-manual.txt: fix a few omissions of gitlink commands.
Signed-off-by: David Kastrup <dak@gnu.org>
2007-08-26 10:35:17 -04:00
J. Bruce Fields
d5821de2e2 user-manual: fix incorrect header level
This section is a subsection of the "Examples" section.

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
2007-08-26 10:35:17 -04:00
J. Bruce Fields
e2618ff427 user-manual: use pithier example commit
Actually, we should have a competition for the favorite example commit.
Criteria:

	- length: one-line changes with one-line comments preferred,
	  and no long lines
	- significance/memorability
	- comic value

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
2007-08-26 10:35:17 -04:00
J. Bruce Fields
a2ef9d633f user-manual: introduce the word "commit" earlier
Use the word "commit" as a synonym for "version" from the start.

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
2007-08-26 10:35:16 -04:00
J. Bruce Fields
a5f90f3130 user-manual: minor editing for conciseness
Just cutting out a few unnecessary words.

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
2007-08-26 10:35:16 -04:00
J. Bruce Fields
464a8a7a15 user-manual: edit "ignoring files" for conciseness
The immediate motivation for writing this section was to explain the
various places ignore patterns could be used.  However, I still think
.gitignore is the case most people will want to learn about first.  It
also makes it a bit more concrete to introduce ignore patterns in the
context of .gitignore first.  And the existance of gitignore(5) relieves
the pressure to explain it all here.

So, stick to the .gitignore example, with only a brief mention of the
others, explain the syntax only by example, and leave the rest to
gitignore(5).

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Cc: Johan Herland <johan@herland.net>
2007-08-26 10:35:16 -04:00
David Kastrup
6e30fb0c32 Documentation/user-manual.txt: fix a few omissions of gitlink commands.
Signed-off-by: David Kastrup <dak@gnu.org>
2007-08-26 10:31:30 -04:00
Brian Hetro
480611d170 Make usage documentation for git-add consistent.
The usage string for the executable was missing --refresh.  In
addition, the documentation referred to "file", but the usage string
referred to "filepattern".  Updated the documentation to
"filepattern", as git-add does handle patterns.

Signed-off-by: Brian Hetro <whee@smaertness.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-08-25 22:35:44 -07:00
Brian Hetro
1560be16b9 Make usage documentation for git-am consistent.
The usage information in git-am.sh now matches that of the
documentation.

Signed-off-by: Brian Hetro <whee@smaertness.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-08-25 22:35:35 -07:00
Shawn O. Pearce
9064d87b06 Don't segfault if we failed to inflate a packed delta
Under some types of packfile corruption the zlib stream holding the
data for a delta within a packfile may fail to inflate, due to say
a CRC failure within the compressed data itself.  When this occurs
the unpack_compressed_entry function will return NULL as a signal to
the caller that the data is not available.  Unfortunately we then
tried to use that NULL as though it referenced a memory location
where a delta was stored and tried to apply it to the delta base.
Loading a byte from the NULL address typically causes a SIGSEGV.

cate on #git noticed this failure in `git fsck --full` where the
call to verify_pack() first noticed that the packfile was corrupt
by finding that the packfile's SHA-1 did not match the raw data of
the file.  After finding this fsck went ahead and tried to verify
every object within the packfile, even though the packfile was
already known to be bad.  If we are going to shovel bad data at
the delta unpacking code, we better handle it correctly.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-08-25 08:33:47 -07:00
Junio C Hamano
2e3404c324 pack-objects: check return value from read_sha1_file()
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-08-25 08:33:47 -07:00
Junio C Hamano
ab43e495dd blame: check return value from read_sha1_file()
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-08-25 08:33:47 -07:00
Shawn O. Pearce
c80d25dbce git-gui: Correct 'git gui blame' in a subdirectory
David Kastrup pointed out that the following sequence was not
working as we had intended:

  $ cd lib
  $ git gui blame console.tcl
  fatal: cannot stat path lib/console.tcl: No such file or directory

The problem here was we disabled the chdir to the root of the
working tree when we are running with a "bare allowed" feature
such as blame or browser, but we still kept the prefix we found via
`git rev-parse --show-prefix`.  This caused us to try and look for
the file "console.tcl" within the subdirectory but also include
the subdirectory's own path from the root of the working tree.
This is unlikely to succeed, unless the user just happened to have
a "lib/lib/console.tcl" file in the repository, in which case we
would produce the wrong result.

In the case of a bare repository we shouldn't get back a value from
`rev-parse --show-prefix`, so really $_prefix should only be set
to the non-empty string if we are in a working tree and we are in a
subdirectory of that working tree.  If this is true we really want
to always be at the top level of the working tree, as all paths are
accessed as though they were relative to the top of the working tree.
Converting $_prefix to a ../ sequence is a fairly simple approach
to moving up the requisite levels.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
gitgui-0.8.2
2007-08-24 23:15:50 -04:00
Simon Hausmann
0058a33a8e git-p4: Fix warnings about non-existant refs/remotes/p4/HEAD ref when running git-p4 sync the first time after a git clone.
Don't create the p4/HEAD symbolic ref if p4/master doesn't exist yet.

Signed-off-by: Simon Hausmann <simon@lst.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-08-24 18:54:37 -07:00
Simon Hausmann
5ca4461728 git-p4: Make 'git-p4 branches' work after an initial clone with git clone from an origin-updated repository.
After a clone with "git clone" of a repository the p4 branches are only in remotes/origin/p4/* and not in remotes/p4/*.
Separate the code for detection and creation out of the P4Sync command class into standalone methods and use them
from the P4Branches command.

Signed-off-by: Simon Hausmann <simon@lst.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-08-24 18:54:37 -07:00
Brian Hetro
027830755d Documentation: Correct various misspellings and typos.
Fix minor typos throughout the documentation.

Signed-off-by: Brian Hetro <whee@smaertness.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-08-24 18:54:37 -07:00
Brian Hetro
db21872395 Documentation: For consistency, use CVS instead of cvs.
When not referring to the cvs command, CVS makes more sense.

Signed-off-by: Brian Hetro <whee@smaertness.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-08-24 18:54:37 -07:00
Linus Torvalds
9ec398d200 Fix racy-git handling in git-write-tree.
After git-write-tree finishes computing the tree, it updates the
index so that later operations can take advantage of fully
populated cache tree.

However, anybody writing the index file has to mark the entries
that are racily clean.  For each entry whose cached lstat(3)
data in the index exactly matches what is obtained from the
filesystem, if the timestamp on the index file was the same or
older than the modification timestamp of the file, the blob
contents and the work tree file, after convert_to_git(), need to
be compared, and if they are different, its index entry needs to
be marked not to match the lstat(3) data from the filesystem.

In order for this to work, convert_to_git() needs to work
correctly, which in turn means you need to read the config file
to get the settings of core.crlf and friends.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-08-24 18:53:02 -07:00
Johannes Schindelin
1d25c8cf82 rebase -i: fix squashing corner case
When squashing, rebase -i did not prevent fast forwards.  This could
happen when picking some other commit than the first one, and then
squashing the first commit.  So do not allow fast forwards when
squashing.

Noticed by Johannes Sixt.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-08-23 02:34:19 -07:00
martin f. krafft
191131e538 Install man3 manpages to $PREFIX/share/man/man3 even for site installs
MakeMaker supports three installation modes: perl, site, and vendor. The first
and third install manpages to $PREFIX/share/man, only site installs to
$PREFIX/man. For consistency with the rest of git, which does not make the
distinction and writes all manpages to $PREFIX/share/man, this change makes
sure that perl does too, even when it's installed in site mode.

Signed-off-by: martin f. krafft <madduck@madduck.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-08-23 01:02:49 -07:00
martin f. krafft
8f728fb96f git-svn init/clone --stdlayout option to default-init trunk/tags/branches
The --stdlayout option to git-svn init/clone initialises the default
Subversion values of trunk,tags,branches: -T trunk -b branches -t tags.
If any of the -T/-t/-b options are given in addition, they are given
preference.

[ew: fixed whitespace and added "-s" shortcut]

Signed-off-by: martin f. krafft <madduck@madduck.net>
Signed-off-by: Eric Wong <normalperson@yhbt.net>
2007-08-23 00:18:02 -07:00
David Kastrup
b1d884a9e3 diff-delta.c: Fix broken skip calculation.
A particularly bad case was HASH_LIMIT <= hash_count[i] < 2*HASH_LIMIT:
in that case, only a single hash survived.  For larger cases,
2*HASH_LIMIT was the actual limiting value after pruning.

Signed-off-by: David Kastrup <dak@gnu.org>
Acked-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-08-23 00:04:10 -07:00
Shawn O. Pearce
9c9f5fa97f git-gui: Do not offer to stage three-way diff hunks into the index
git-apply does not accept a patch that was generated as a three-way
combined diff format such as we see during merge conflicts.  If we
get such a diff in our diff viewer and try to send it to git-apply
it just errors out and the user is left confused wondering why they
cannot stage that hunk.

Instead of feeding a known to be unacceptable hunk to git-apply we
now just disable the stage/unstage context menu option if the hunk
came from a three way diff.  The user may still be confused about
why they cannot work with a combined diff, but at least they are
only confused as to why git-gui is not offering them the action.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-08-23 02:44:13 -04:00
Junio C Hamano
59fc840742 Merge branch 'master' of git://repo.or.cz/git/fastimport
* 'master' of git://repo.or.cz/git/fastimport:
  Teach bash about git-submodule and its subcommands
  Teach bash to complete ref arguments to git-describe
  Update bash completion with new 1.5.3 command line options
2007-08-22 23:42:56 -07:00
Eric Wong
15d54753bb git-svn: dcommit prints out the URL to be committed to
This will print out the URL that dcommit will operate on.
If used with --dry-run this will print out the URL without
making changes to the repository.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
2007-08-22 23:41:36 -07:00
Shawn O. Pearce
9f4119eb76 git-gui: Refactor diff pane popup support for future improvements
The current popup_diff_menu procedure is somewhat messy as it has a
few duplications of the same logic in each of the different legs of
the routine.  We can simplify these by setting a few state variables
in the different legs.

No functional change, just a cleanup to make it easier to implement
future functional changes within this block.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-08-23 02:39:45 -04:00
Shawn O. Pearce
be86f7a0df Teach bash about git-submodule and its subcommands
The git-submodule command is new in 1.5.3 and contains a number
of useful subcommands for working on submodules.  We usually try
to offer the subcommands of a git command in the bash completion,
so here they are for git-submodule.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-08-23 01:50:49 -04:00
Shawn O. Pearce
217926c08c Teach bash to complete ref arguments to git-describe
I'm often finding that I need to run git-describe on very long
remote tracking branch names, to find out what tagged revision
the remote tracking branch is now at (or not at).  Typing out
the ref names is painful, so bash completion on them is a very
useful feature.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-08-23 01:42:11 -04:00
Shawn O. Pearce
47e98eecf3 Update bash completion with new 1.5.3 command line options
A number of commands have learned new tricks as part of git 1.5.3.
If these are long options (--foo) we tend to support them in the
bash completion, as it makes the user's task of using the option
slightly easier.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-08-23 01:39:22 -04:00
Eric Wong
aabb2e515c git-svn: update documentation with CAVEATS section
Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-08-22 15:38:48 -07:00