git.git
17 years agoxdiff-interface: hide the whole "xdiff_emit_state" business from the caller
Junio C Hamano [Thu, 14 Aug 2008 06:18:22 +0000 (23:18 -0700)]
xdiff-interface: hide the whole "xdiff_emit_state" business from the caller

This further enhances xdi_diff_outf() interface so that it takes two
common parameters: the callback function that processes one line at a
time, and a pointer to its application specific callback data structure.
xdi_diff_outf() creates its own "xdiff_emit_state" structure and stashes
these two away inside it, which is used by the lowest level output
function in the xdiff_outf() callchain, consume_one(), to call back to the
application layer.  With this restructuring, we lift the requirement that
the caller supplied callback data structure embeds xdiff_emit_state
structure as its first member.

Signed-off-by: Junio C Hamano <redacted>
17 years agoUpdate .gitignore to ignore git-help
Gustaf Hendeby [Wed, 13 Aug 2008 21:32:43 +0000 (23:32 +0200)]
Update .gitignore to ignore git-help

Signed-off-by: Gustaf Hendeby <redacted>
Signed-off-by: Junio C Hamano <redacted>
17 years agoUse strbuf for struct xdiff_emit_state's remainder
Brian Downing [Thu, 14 Aug 2008 05:36:51 +0000 (00:36 -0500)]
Use strbuf for struct xdiff_emit_state's remainder

Continually xreallocing and freeing the remainder member of struct
xdiff_emit_state was a noticeable performance hit.  Use a strbuf
instead.

This yields a decent performance improvement on "git blame" on certain
repositories.  For example, before this commit:

$ time git blame -M -C -C -p --incremental server.c >/dev/null
101.52user 0.17system 1:41.73elapsed 99%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (0major+39561minor)pagefaults 0swaps

With this commit:

$ time git blame -M -C -C -p --incremental server.c >/dev/null
80.38user 0.30system 1:20.81elapsed 99%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (0major+50979minor)pagefaults 0swaps

Signed-off-by: Brian Downing <redacted>
Signed-off-by: Junio C Hamano <redacted>
17 years agoMake xdi_diff_outf interface for running xdiff_outf diffs
Brian Downing [Thu, 14 Aug 2008 05:36:50 +0000 (00:36 -0500)]
Make xdi_diff_outf interface for running xdiff_outf diffs

To prepare for the need to initialize and release resources for an
xdi_diff with the xdiff_outf output function, make a new function to
wrap this usage.

Old:

ecb.outf = xdiff_outf;
ecb.priv = &state;
...
xdi_diff(file_p, file_o, &xpp, &xecfg, &ecb);

New:

xdi_diff_outf(file_p, file_o, &state.xm, &xpp, &xecfg, &ecb);

Signed-off-by: Brian Downing <redacted>
Signed-off-by: Junio C Hamano <redacted>
17 years agoMerge branch 'maint'
Junio C Hamano [Thu, 14 Aug 2008 02:22:29 +0000 (19:22 -0700)]
Merge branch 'maint'

* maint:
  t5304-prune: adjust file mtime based on system time rather than file mtime
  Fix escaping of glob special characters in pathspecs

17 years agot5304-prune: adjust file mtime based on system time rather than file mtime
Brandon Casey [Thu, 14 Aug 2008 00:49:30 +0000 (19:49 -0500)]
t5304-prune: adjust file mtime based on system time rather than file mtime

test-chmtime can adjust the mtime of a file based on the file's mtime, or
based on the system time. For files accessed over NFS, the file's mtime is
set by the NFS server, and as such may vary a great deal from the NFS
client's system time if the clocks of the client and server are out of
sync. Since these tests are testing the expire feature of git-prune, an
incorrect mtime could cause a file to be expired or not expired incorrectly
and produce a test failure.

Avoid this NFS pitfall by modifying the calls to test-chmtime so that the
mtime is adjusted based on the system time, rather than the file's mtime.

Signed-off-by: Brandon Casey <redacted>
Signed-off-by: Junio C Hamano <redacted>
17 years agotest-parse-options: use appropriate cast in length_callback
Brandon Casey [Thu, 14 Aug 2008 00:48:57 +0000 (19:48 -0500)]
test-parse-options: use appropriate cast in length_callback

OPT_CALLBACK() is passed &integer which is now an "int" rather than
"unsigned long". Update the length_callback function.

Signed-off-by: Brandon Casey <redacted>
Signed-off-by: Junio C Hamano <redacted>
17 years agoFix escaping of glob special characters in pathspecs
Kevin Ballard [Wed, 13 Aug 2008 22:34:34 +0000 (15:34 -0700)]
Fix escaping of glob special characters in pathspecs

match_one implements an optimized pathspec match where it only uses
fnmatch if it detects glob special characters in the pattern. Unfortunately
it didn't treat \ as a special character, so attempts to escape a glob
special character would fail even though fnmatch() supports it.

Signed-off-by: Kevin Ballard <redacted>
Signed-off-by: Junio C Hamano <redacted>
17 years agorebase -i -p: fix parent rewriting
Thomas Rast [Wed, 13 Aug 2008 21:41:24 +0000 (23:41 +0200)]
rebase -i -p: fix parent rewriting

The existing parent rewriting did not handle the case where a previous
commit was amended (via edit or squash).  Fix by always putting the
new sha1 of the last commit into the $REWRITTEN map.

Signed-off-by: Thomas Rast <redacted>
17 years agorebase -i -p: handle index and workdir correctly
Thomas Rast [Wed, 13 Aug 2008 21:41:23 +0000 (23:41 +0200)]
rebase -i -p: handle index and workdir correctly

'git rebase -i -p' forgot to update the index and working directory
during fast forwards.  Fix this.  Makes 'GIT_EDITOR=true rebase -i -p
<ancestor>' a no-op again.

Also, it attempted to do a fast forward even if it was instructed not
to commit (via -n).  Fall back to the cherry-pick code path and let
that handle the issue for us.

Signed-off-by: Thomas Rast <redacted>
17 years agoGIT 1.6.0-rc3
Junio C Hamano [Wed, 13 Aug 2008 04:42:22 +0000 (21:42 -0700)]
GIT 1.6.0-rc3

Signed-off-by: Junio C Hamano <redacted>
17 years agoMerge branch 'maint'
Junio C Hamano [Wed, 13 Aug 2008 05:46:22 +0000 (22:46 -0700)]
Merge branch 'maint'

* maint:
  Do not talk about "diff" in rev-list documentation.

17 years agoDo not talk about "diff" in rev-list documentation.
Junio C Hamano [Mon, 11 Aug 2008 18:46:56 +0000 (11:46 -0700)]
Do not talk about "diff" in rev-list documentation.

Since 8c02eee (git-rev-list(1): group options; reformat; document more
options, 2006-09-01), git-rev-list documentation talks as if it supports
any kind of diff output.  It doesn't.

Signed-off-by: Junio C Hamano <redacted>
17 years agoMerge git://git.bogomips.org/git-svn
Junio C Hamano [Wed, 13 Aug 2008 04:41:29 +0000 (21:41 -0700)]
Merge git://git.bogomips.org/git-svn

* git://git.bogomips.org/git-svn:
  git-svn: Reduce temp file usage when dealing with non-links
  git-svn: Make it incrementally faster by minimizing temp files
  Git.pm: Add faculties to allow temp files to be cached

17 years agoDocumentation: rev-list-options: move --simplify-merges documentation
Thomas Rast [Mon, 11 Aug 2008 23:55:37 +0000 (01:55 +0200)]
Documentation: rev-list-options: move --simplify-merges documentation

Fits --simplify-merges documentation into the 'History Simplification'
section, including example.

Signed-off-by: Thomas Rast <redacted>
Signed-off-by: Junio C Hamano <redacted>
17 years agoMerge branch 'jc/post-simplify' into tr/rev-list-docs
Junio C Hamano [Wed, 13 Aug 2008 04:40:05 +0000 (21:40 -0700)]
Merge branch 'jc/post-simplify' into tr/rev-list-docs

* jc/post-simplify:
  Topo-sort before --simplify-merges
  revision traversal: show full history with merge simplification
  revision.c: whitespace fix

Conflicts:
Documentation/rev-list-options.txt

17 years agogit-svn: Reduce temp file usage when dealing with non-links
Marcus Griep [Tue, 12 Aug 2008 16:45:39 +0000 (12:45 -0400)]
git-svn: Reduce temp file usage when dealing with non-links

Currently, in sub 'close_file', git-svn creates a temporary file and
copies the contents of the blob to be written into it. This is useful
for symlinks because svn stores symlinks in the form:

link $FILE_PATH

Git creates a blob only out of '$FILE_PATH' and uses file mode to
indicate that the blob should be interpreted as a symlink.

As git-hash-object is invoked with --stdin-paths, a duplicate of the
link from svn must be created that leaves off the first five bytes,
i.e. 'link '. However, this is wholly unnecessary for normal blobs,
though, as we already have a temp file with their contents. Copying
the entire file gains nothing, and effectively requires a file to be
written twice before making it into the object db.

This patch corrects that issue, holding onto the substr-like
duplication for symlinks, but skipping it altogether for normal blobs
by reusing the existing temp file.

Signed-off-by: Marcus Griep <redacted>
Acked-by: Eric Wong <redacted>
17 years agogit-svn: Make it incrementally faster by minimizing temp files
Marcus Griep [Tue, 12 Aug 2008 16:00:53 +0000 (12:00 -0400)]
git-svn: Make it incrementally faster by minimizing temp files

Currently, git-svn would create a temp file on four occasions:
1. Reading a blob out of the object db
2. Creating a delta from svn
3. Hashing and writing a blob into the object db
4. Reading a blob out of the object db (in another place in code)

Any time git-svn did the above, it would dutifully create and then
delete said temp file.  Unfortunately, this means that between 2-4
temporary files are created/deleted per file 'add/modify'-ed in
svn (O(n)).  This causes significant overhead and helps the inode
counter to spin beautifully.

By its nature, git-svn is a serial beast.  Thus, reusing a temp file
does not pose significant problems.  "truncate and seek" takes much
less time than "unlink and create".  This patch centralizes the
tempfile creation and holds onto the tempfile until they are deleted
on exit.  This significantly reduces file overhead, now requiring
at most three (3) temp files per run (O(1)).

Signed-off-by: Marcus Griep <redacted>
Acked-by: Eric Wong <redacted>
17 years agoGit.pm: Add faculties to allow temp files to be cached
Marcus Griep [Tue, 12 Aug 2008 16:00:18 +0000 (12:00 -0400)]
Git.pm: Add faculties to allow temp files to be cached

This patch offers a generic interface to allow temp files to be
cached while using an instance of the 'Git' package. If many
temp files are created and destroyed during the execution of a
program, this caching mechanism can help reduce the amount of
files created and destroyed by the filesystem.

The temp_acquire method provides a weak guarantee that a temp
file will not be stolen by subsequent requests. If a file is
locked when another acquire request is made, a simple error is
thrown.

Signed-off-by: Marcus Griep <redacted>
Acked-by: Eric Wong <redacted>
17 years agogit-gui: update all remaining translations to French.
Alexandre Bourget [Mon, 11 Aug 2008 21:19:17 +0000 (17:19 -0400)]
git-gui: update all remaining translations to French.

Simply..

Signed-off-by: Alexandre Bourget <redacted>
Signed-off-by: Shawn O. Pearce <redacted>
17 years agogit-gui: Update french translation
Alexandre Bourget [Mon, 11 Aug 2008 21:19:16 +0000 (17:19 -0400)]
git-gui: Update french translation

Signed-off-by: Alexandre Bourget <redacted>
Signed-off-by: Shawn O. Pearce <redacted>
17 years agoDocumentation: rev-list-options: Rewrite simplification descriptions for clarity
Thomas Rast [Mon, 11 Aug 2008 23:55:36 +0000 (01:55 +0200)]
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 <redacted>
Signed-off-by: Junio C Hamano <redacted>
17 years agofilter-branch: use --simplify-merges
Thomas Rast [Tue, 12 Aug 2008 08:45:59 +0000 (10:45 +0200)]
filter-branch: use --simplify-merges

Use rev-list --simplify-merges everywhere.  This changes the behaviour
of --subdirectory-filter in cases such as

  O -- A -\
   \       \
    \- B -- M

where A and B bring the same changes to the subdirectory: It now keeps
both sides of the merge.  Previously, the history would have been
simplified to 'O -- A'.  Merges of unrelated side histories that never
touch the subdirectory are still removed.

Signed-off-by: Thomas Rast <redacted>
Signed-off-by: Junio C Hamano <redacted>
17 years agoMerge branch 'jc/post-simplify' into tr/filter-branch
Junio C Hamano [Wed, 13 Aug 2008 00:27:28 +0000 (17:27 -0700)]
Merge branch 'jc/post-simplify' into tr/filter-branch

* jc/post-simplify:
  Topo-sort before --simplify-merges
  revision traversal: show full history with merge simplification
  revision.c: whitespace fix

17 years agofilter-branch: fix ref rewriting with --subdirectory-filter
Thomas Rast [Tue, 12 Aug 2008 08:45:58 +0000 (10:45 +0200)]
filter-branch: fix ref rewriting with --subdirectory-filter

The previous ancestor discovery code failed on any refs that are
(pre-rewrite) ancestors of commits marked for rewriting.  This means
that in a situation

   A -- B(topic) -- C(master)

where B is dropped by --subdirectory-filter pruning, the 'topic' was
not moved up to A as intended, but left unrewritten because we asked
about 'git rev-list ^master topic', which does not return anything.

Instead, we use the straightforward

   git rev-list -1 $ref -- $filter_subdir

to find the right ancestor.  To justify this, note that the nearest
ancestor is unique: We use the output of

  git rev-list --parents -- $filter_subdir

to rewrite commits in the first pass, before any ref rewriting.  If B
is a non-merge commit, the only candidate is its parent.  If it is a
merge, there are two cases:

- All sides of the merge bring the same subdirectory contents.  Then
  rev-list already pruned away the merge in favour for just one of its
  parents, so there is only one candidate.

- Some merge sides, or the merge outcome, differ.  Then the merge is
  not pruned and can be rewritten directly.

So it is always safe to use rev-list -1.

Signed-off-by: Thomas Rast <redacted>
Signed-off-by: Junio C Hamano <redacted>
17 years agofilter-branch: Extend test to show rewriting bug
Thomas Rast [Tue, 12 Aug 2008 08:45:57 +0000 (10:45 +0200)]
filter-branch: Extend test to show rewriting bug

This extends the --subdirectory-filter test in t7003 to demonstrate a
rewriting bug: when rewriting two refs A and B such that B is an
ancestor of A, it fails to rewrite B.

The underlying issue is that the rev-list invocation at
git-filter-branch.sh:332 more or less boils down to

  git rev-list B --boundary ^A

which outputs nothing because B is an ancestor of A.

Signed-off-by: Thomas Rast <redacted>
Signed-off-by: Junio C Hamano <redacted>
17 years agoTeach git diff about BibTeX head hunk patterns
Gustaf Hendeby [Tue, 12 Aug 2008 14:24:26 +0000 (16:24 +0200)]
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 <redacted>
Signed-off-by: Junio C Hamano <redacted>
17 years agogitattributes: Document built in hunk header patterns
Gustaf Hendeby [Tue, 12 Aug 2008 14:24:25 +0000 (16:24 +0200)]
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 <redacted>
Signed-off-by: Junio C Hamano <redacted>
17 years agogit-daemon: SysV needs the signal handler reinstated.
Stephen R. van den Berg [Tue, 12 Aug 2008 19:36:13 +0000 (21:36 +0200)]
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 <redacted>
Signed-off-by: Junio C Hamano <redacted>
17 years agopack-objects: Allow missing base objects when creating thin packs
Shawn O. Pearce [Tue, 12 Aug 2008 18:31:06 +0000 (11:31 -0700)]
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 <redacted>
Acked-by: Nicolas Pitre <redacted>
Signed-off-by: Junio C Hamano <redacted>
17 years agodiff --check: do not unconditionally complain about trailing empty lines
Junio C Hamano [Tue, 12 Aug 2008 05:15:28 +0000 (22:15 -0700)]
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 <redacted>
17 years agoMerge branch 'maint'
Junio C Hamano [Tue, 12 Aug 2008 02:24:28 +0000 (19:24 -0700)]
Merge branch 'maint'

* maint:
  git-bisect: fix wrong usage of read(1)

17 years agoPut in the two other configuration elements found in the source
Anand Kumria [Sun, 10 Aug 2008 18:26:35 +0000 (19:26 +0100)]
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 <redacted>
Signed-off-by: Junio C Hamano <redacted>
17 years agoPut some documentation in about the parameters that have been added
Anand Kumria [Sun, 10 Aug 2008 18:26:34 +0000 (19:26 +0100)]
Put some documentation in about the parameters that have been added

Signed-off-by: Anand Kumria <redacted>
Signed-off-by: Junio C Hamano <redacted>
17 years agoMove git-p4.syncFromOrigin into a configuration parameters section
Anand Kumria [Sun, 10 Aug 2008 18:26:33 +0000 (19:26 +0100)]
Move git-p4.syncFromOrigin into a configuration parameters section

Signed-off-by: Anand Kumria <redacted>
Signed-off-by: Junio C Hamano <redacted>
17 years agoConsistently use 'git-p4' for the configuration entries
Anand Kumria [Sun, 10 Aug 2008 18:26:32 +0000 (19:26 +0100)]
Consistently use 'git-p4' for the configuration entries

Signed-off-by: Anand Kumria <redacted>
Signed-off-by: Junio C Hamano <redacted>
17 years agoIf the user has configured various parameters, use them.
Anand Kumria [Sun, 10 Aug 2008 18:26:31 +0000 (19:26 +0100)]
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 <redacted>
Signed-off-by: Junio C Hamano <redacted>
17 years agoSwitch to using 'p4_build_cmd'
Anand Kumria [Sun, 10 Aug 2008 18:26:30 +0000 (19:26 +0100)]
Switch to using 'p4_build_cmd'

Signed-off-by: Anand Kumria <redacted>
Signed-off-by: Junio C Hamano <redacted>
17 years agoIf we are in verbose mode, output what we are about to run (or return)
Anand Kumria [Sun, 10 Aug 2008 18:26:29 +0000 (19:26 +0100)]
If we are in verbose mode, output what we are about to run (or return)

Signed-off-by: Anand Kumria <redacted>
Signed-off-by: Junio C Hamano <redacted>
17 years agoAdd a single command that will be used to construct the 'p4' command
Anand Kumria [Sun, 10 Aug 2008 18:26:28 +0000 (19:26 +0100)]
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 <redacted>
Signed-off-by: Junio C Hamano <redacted>
17 years agoUtilise the new 'p4_system' function.
Anand Kumria [Sun, 10 Aug 2008 18:26:27 +0000 (19:26 +0100)]
Utilise the new 'p4_system' function.

Signed-off-by: Anand Kumria <redacted>
Signed-off-by: Junio C Hamano <redacted>
17 years agoHave a command that specifically invokes 'p4' (via system)
Anand Kumria [Sun, 10 Aug 2008 18:26:26 +0000 (19:26 +0100)]
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 <redacted>
Signed-off-by: Junio C Hamano <redacted>
17 years agoUtilise the new 'p4_read_pipe_lines' command
Anand Kumria [Sun, 10 Aug 2008 18:26:25 +0000 (19:26 +0100)]
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 <redacted>
Signed-off-by: Junio C Hamano <redacted>
17 years agoCreate a specific version of the read_pipe_lines command for p4 invocations
Anand Kumria [Sun, 10 Aug 2008 18:26:24 +0000 (19:26 +0100)]
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 <redacted>
Signed-off-by: Junio C Hamano <redacted>
17 years agoDocumentation: rev-list-options: Fix a typo
Thomas Rast [Mon, 11 Aug 2008 23:55:35 +0000 (01:55 +0200)]
Documentation: rev-list-options: Fix a typo

Signed-off-by: Thomas Rast <redacted>
Signed-off-by: Junio C Hamano <redacted>
17 years agoAdjust for the new way of enabling the default post-update hook
Petr Baudis [Mon, 11 Aug 2008 22:34:46 +0000 (00:34 +0200)]
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 <redacted>
Signed-off-by: Junio C Hamano <redacted>
17 years agogit-bisect: fix wrong usage of read(1)
Francis Moreau [Mon, 11 Aug 2008 17:37:46 +0000 (19:37 +0200)]
git-bisect: fix wrong usage of read(1)

Signed-off-by: Francis Moreau <redacted>
Signed-off-by: Junio C Hamano <redacted>
17 years agoFix typo in comments of longest_ancestor_length()
Nguyễn Thái Ngọc Duy [Sun, 10 Aug 2008 15:26:23 +0000 (22:26 +0700)]
Fix typo in comments of longest_ancestor_length()

Signed-off-by: Nguyễn Thái Ngọc Duy <redacted>
Signed-off-by: Junio C Hamano <redacted>
17 years agoMake cherry-pick use rerere for conflict resolution.
Abhijit Menon-Sen [Sun, 10 Aug 2008 11:48:55 +0000 (17:18 +0530)]
Make cherry-pick use rerere for conflict resolution.

Cherry-picking can be helped by reusing previous confliction
resolution by invoking rerere automatically.

Signed-off-by: Abhijit Menon-Sen <redacted>
Signed-off-by: Junio C Hamano <redacted>
17 years agocheckout --track: make up a sensible branch name if '-b' was omitted
Johannes Schindelin [Sat, 9 Aug 2008 14:00:12 +0000 (16:00 +0200)]
checkout --track: make up a sensible branch name if '-b' was omitted

What does the user most likely want with this command?

$ git checkout --track origin/next

Exactly.  A branch called 'next', that tracks origin's branch 'next'.
Make it so.

Signed-off-by: Johannes Schindelin <redacted>
Signed-off-by: Junio C Hamano <redacted>
17 years agoMerge branch 'maint'
Junio C Hamano [Mon, 11 Aug 2008 21:28:35 +0000 (14:28 -0700)]
Merge branch 'maint'

* maint:
  Re-fix rev-list-options documentation

17 years agoRe-fix rev-list-options documentation
Junio C Hamano [Mon, 11 Aug 2008 21:24:51 +0000 (14:24 -0700)]
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 <redacted>
17 years agoAdd test for diff-tree --stdin with two trees
Karl Hasselström [Sun, 10 Aug 2008 16:13:04 +0000 (18:13 +0200)]
Add test for diff-tree --stdin with two trees

Signed-off-by: Karl Hasselström <redacted>
Signed-off-by: Junio C Hamano <redacted>
17 years agoTeach git diff-tree --stdin to diff trees
Karl Hasselström [Sun, 10 Aug 2008 16:12:58 +0000 (18:12 +0200)]
Teach git diff-tree --stdin to diff trees

When feeding trees on the command line, you can give exactly two
trees, not three nor one; --stdin now supports this "two tree" form on
its input, in addition to accepting lines with one or more commits.

When diffing trees (either specified on the command line or from the
standard input), the -s, -v, --pretty, --abbrev-commit, --encoding,
--no-commit-id, and --always options are ignored, since they do not
apply to trees; and the -m, -c, and --cc options are ignored since
they would be meaningful only with three or more trees, which is not
supported (yet).

Signed-off-by: Karl Hasselström <redacted>
Signed-off-by: Junio C Hamano <redacted>
17 years agodiff-tree: Note that the commit ID is printed with --stdin
Karl Hasselström [Sun, 10 Aug 2008 16:12:53 +0000 (18:12 +0200)]
diff-tree: Note that the commit ID is printed with --stdin

It's sort of already documented with the --no-commit-id command-line
flag, but let's not hide important information from the user.

Signed-off-by: Karl Hasselström <redacted>
Signed-off-by: Junio C Hamano <redacted>
17 years agoRefactoring: Split up diff_tree_stdin
Karl Hasselström [Fri, 8 Aug 2008 20:48:23 +0000 (22:48 +0200)]
Refactoring: Split up diff_tree_stdin

Into a first half that determines what operation to do, and a second
half that does it.

Currently the only operation is diffing one or more commits, but a
later patch will add diffing of trees, at which point this refactoring
will pay off.

Signed-off-by: Karl Hasselström <redacted>
Signed-off-by: Junio C Hamano <redacted>
17 years agoMerge branch 'maint'
Junio C Hamano [Mon, 11 Aug 2008 07:53:31 +0000 (00:53 -0700)]
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

17 years agoDocumentation: fix invalid reference to 'mybranch' in user manual
Ivan Stankovic [Sun, 10 Aug 2008 16:22:14 +0000 (18:22 +0200)]
Documentation: fix invalid reference to 'mybranch' in user manual

Signed-off-by: Ivan Stankovic <redacted>
Signed-off-by: Junio C Hamano <redacted>
17 years agoFix deleting reflog entries from HEAD reflog
Junio C Hamano [Mon, 11 Aug 2008 06:21:25 +0000 (23:21 -0700)]
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 <redacted>
17 years agoreflog test: add more tests for 'reflog delete'
Pieter de Bie [Sat, 9 Aug 2008 23:33:29 +0000 (01:33 +0200)]
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 <redacted>
Signed-off-by: Junio C Hamano <redacted>
17 years agoDocumentation: rev-list-options: Fix -g paragraph formatting
Thomas Rast [Sun, 10 Aug 2008 13:04:34 +0000 (15:04 +0200)]
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 <redacted>
Signed-off-by: Junio C Hamano <redacted>
17 years agogitk: Allow safely calling nukefile from a run queue handler
Alexander Gavrilov [Sat, 9 Aug 2008 10:41:50 +0000 (14:41 +0400)]
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 <redacted>
Signed-off-by: Paul Mackerras <redacted>
17 years agogit-gui 0.11
Shawn O. Pearce [Sun, 10 Aug 2008 07:02:08 +0000 (00:02 -0700)]
git-gui 0.11

Signed-off-by: Shawn O. Pearce <redacted>
17 years agoUpdate draft RelNotes for 1.6.0
Junio C Hamano [Sat, 9 Aug 2008 22:11:48 +0000 (15:11 -0700)]
Update draft RelNotes for 1.6.0

Signed-off-by: Junio C Hamano <redacted>
17 years agoMerge branch 'maint'
Junio C Hamano [Sat, 9 Aug 2008 08:40:08 +0000 (01:40 -0700)]
Merge branch 'maint'

* maint:
  asciidoc markup fixes
  Fail properly when cloning from invalid HTTP URL

Conflicts:
Documentation/git-push.txt

17 years agomailinfo: fix MIME multi-part message boundary handling
Junio C Hamano [Sat, 9 Aug 2008 08:17:24 +0000 (01:17 -0700)]
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 <redacted>
17 years agoEnable parallel tests
Johannes Schindelin [Fri, 8 Aug 2008 11:08:37 +0000 (13:08 +0200)]
Enable parallel tests

On multiprocessor machines, or with I/O heavy tests (that leave the
CPU waiting a lot), it makes sense to parallelize the tests.

However, care has to be taken that the different jobs use different
trash directories.

This commit does so, by creating the trash directories with a suffix
that is unique with regard to the test, as it is the test's base name.

Further, the trash directory is removed in the test itself if
everything went fine, so that the trash directories do not
pile up only to be removed at the very end.

If a test failed, the trash directory is not removed.  Chances are
that the exact error message is lost in the clutter, but you can still
see what test failed from the name of the trash directory, and repeat
the test (without -j).

If all was good, you will see the aggregated results.

Suggestions to simplify this commit came from Junio and René.

There still is an issue with tests that want to run a server process and
listen to a fixed port (http and svn) --- they cannot run in parallel but
this patch does not address this issue.

Signed-off-by: Johannes Schindelin <redacted>
Signed-off-by: Junio C Hamano <redacted>
17 years agotests: Clarify dependencies between tests, 'aggregate-results' and 'clean'
Johannes Schindelin [Fri, 8 Aug 2008 05:59:18 +0000 (07:59 +0200)]
tests: Clarify dependencies between tests, 'aggregate-results' and 'clean'

The Makefile targets 'aggregate-results' and 'clean' pretended to be
independent.  This is not true, of course, since aggregate-results
needs the results _before_ they are removed.

Likewise, the tests should have been run already when the results are
to be aggregated.

However, as it is legitimate to run only a few tests, and then aggregate
just those results, so another target is introduced, that depends on all
tests, then aggregates the results, and only then removes the results.

Signed-off-by: Johannes Schindelin <redacted>
Signed-off-by: Junio C Hamano <redacted>
17 years agot9700: remove useless check
Johannes Schindelin [Fri, 8 Aug 2008 05:59:13 +0000 (07:59 +0200)]
t9700: remove useless check

t9700 used to check if the basename of the current directory is
'trash directory', the expensive way.

However, there is absolutely no good reason why this test should not
run in, say 'life is good' or 'i love tests'.  So remove the check
altogether.

Signed-off-by: Johannes Schindelin <redacted>
Signed-off-by: Junio C Hamano <redacted>
17 years agobuiltin-rm: Add a --force flag
Pieter de Bie [Fri, 8 Aug 2008 22:37:02 +0000 (00:37 +0200)]
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 <redacted>
Signed-off-by: Junio C Hamano <redacted>
17 years agogit-svn: wrap long lines in a few places
Eric Wong [Fri, 8 Aug 2008 08:41:58 +0000 (01:41 -0700)]
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 <redacted>

Signed-off-by: Eric Wong <redacted>
Signed-off-by: Junio C Hamano <redacted>
17 years agogit-svn: Allow deep branch names by supporting multi-globs
Marcus Griep [Fri, 8 Aug 2008 08:41:57 +0000 (01:41 -0700)]
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 <redacted>
Acked-by: Eric Wong <redacted>
Signed-off-by: Junio C Hamano <redacted>
17 years agoFix multi-glob assertion in git-svn
Marcus Griep [Fri, 8 Aug 2008 08:41:56 +0000 (01:41 -0700)]
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 <redacted>
Acked-by: Eric Wong <redacted>
Signed-off-by: Junio C Hamano <redacted>
17 years agofilter-branch: be more helpful when an annotated tag changes
Thomas Rast [Thu, 7 Aug 2008 23:50:31 +0000 (01:50 +0200)]
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 <redacted>
Signed-off-by: Junio C Hamano <redacted>
17 years agoDocumentation: filter-branch: document how to filter all refs
Thomas Rast [Thu, 7 Aug 2008 14:16:03 +0000 (16:16 +0200)]
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 <redacted>
Signed-off-by: Junio C Hamano <redacted>
17 years agoMakefile: add a target which will abort compilation with ancient shells
Brandon Casey [Thu, 7 Aug 2008 19:06:26 +0000 (14:06 -0500)]
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 <redacted>
Signed-off-by: Junio C Hamano <redacted>
17 years agobash: remove redundant check for 'git stash apply' options
SZEDER Gábor [Wed, 6 Aug 2008 15:45:23 +0000 (17:45 +0200)]
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 <redacted>
Acked-by: Shawn O. Pearce <redacted>
Signed-off-by: Junio C Hamano <redacted>
17 years agoGIT-VERSION-GEN: mark the version 'dirty' only if there are modified files
Junio C Hamano [Fri, 8 Aug 2008 20:31:27 +0000 (13:31 -0700)]
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 <redacted>
17 years agoMakefile: set SHELL to value of SHELL_PATH
Brandon Casey [Thu, 7 Aug 2008 19:03:42 +0000 (14:03 -0500)]
Makefile: set SHELL to value of SHELL_PATH

Signed-off-by: Brandon Casey <redacted>
Signed-off-by: Junio C Hamano <redacted>
17 years agoDocumentation: user-manual: "git commit -a" doesn't motivate .gitignore
Jonathan Nieder [Wed, 6 Aug 2008 21:22:00 +0000 (16:22 -0500)]
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 <redacted>
Acked-by: J. Bruce Fields <redacted>
Signed-off-by: Junio C Hamano <redacted>
17 years agogit-svn: add ability to specify --commit-url for dcommit
Eric Wong [Thu, 7 Aug 2008 09:06:16 +0000 (02:06 -0700)]
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 <redacted>
Signed-off-by: Junio C Hamano <redacted>
17 years agoDocumentation: commit-tree: remove 16 parents restriction
Thomas Rast [Fri, 8 Aug 2008 07:52:55 +0000 (09:52 +0200)]
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 <redacted>
Signed-off-by: Junio C Hamano <redacted>
17 years agoasciidoc markup fixes
Junio C Hamano [Thu, 7 Aug 2008 23:05:25 +0000 (16:05 -0700)]
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 <redacted>
17 years agoclone --mirror: avoid storing repeated tags
Johannes Schindelin [Fri, 8 Aug 2008 02:29:35 +0000 (04:29 +0200)]
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 <redacted>
Signed-off-by: Junio C Hamano <redacted>
17 years agoMerge branch 'lt/config-fsync' into maint
Junio C Hamano [Thu, 7 Aug 2008 01:56:23 +0000 (18:56 -0700)]
Merge branch 'lt/config-fsync' into maint

* lt/config-fsync:
  Add config option to enable 'fsync()' of object files
  Split up default "i18n" and "branch" config parsing into helper routines
  Split up default "user" config parsing into helper routine
  Split up default "core" config parsing into helper routine

17 years agoMerge branch 'jc/reflog-expire' into maint
Junio C Hamano [Thu, 7 Aug 2008 01:52:50 +0000 (18:52 -0700)]
Merge branch 'jc/reflog-expire' into maint

* jc/reflog-expire:
  Make default expiration period of reflog used for stash infinite
  Per-ref reflog expiry configuration

17 years agoMerge branch 'ag/rewrite_one' into maint
Junio C Hamano [Thu, 7 Aug 2008 01:48:32 +0000 (18:48 -0700)]
Merge branch 'ag/rewrite_one' into maint

* ag/rewrite_one:
  Fix quadratic performance in rewrite_one.

17 years agoFail properly when cloning from invalid HTTP URL
Petr Baudis [Thu, 7 Aug 2008 00:06:30 +0000 (02:06 +0200)]
Fail properly when cloning from invalid HTTP URL

Currently, when cloning from invalid HTTP URL, git clone will possibly
return curl error, then a confusing message about remote HEAD and then
return success and leave an empty repository behind, confusing either
the end-user or the automated service calling it (think repo.or.cz).

This patch changes the error() calls in get_refs_via_curl() to die()s,
akin to the other get_refs_*() functions.

Cc: Daniel Barkalow <redacted>
Signed-off-by: Petr Baudis <redacted>
Signed-off-by: Junio C Hamano <redacted>
17 years agoGIT 1.6.0-rc2
Junio C Hamano [Wed, 6 Aug 2008 19:44:55 +0000 (12:44 -0700)]
GIT 1.6.0-rc2

Signed-off-by: Junio C Hamano <redacted>
17 years agoperl/Makefile: handle paths with spaces in the NO_PERL_MAKEMAKER section
Brandon Casey [Tue, 5 Aug 2008 23:23:08 +0000 (18:23 -0500)]
perl/Makefile: handle paths with spaces in the NO_PERL_MAKEMAKER section

Use double quotes to protect against paths which may contain spaces.

Signed-off-by: Brandon Casey <redacted>
Signed-off-by: Junio C Hamano <redacted>
17 years agoSync with 1.5.6.5
Junio C Hamano [Wed, 6 Aug 2008 20:50:42 +0000 (13:50 -0700)]
Sync with 1.5.6.5

17 years agoGIT 1.5.6.5
Junio C Hamano [Wed, 6 Aug 2008 19:04:06 +0000 (12:04 -0700)]
GIT 1.5.6.5

Signed-off-by: Junio C Hamano <redacted>
17 years agoFiles given on the command line are relative to $cwd
Junio C Hamano [Wed, 6 Aug 2008 18:43:47 +0000 (11:43 -0700)]
Files given on the command line are relative to $cwd

When running "git commit -F file" and "git tag -F file" from a
subdirectory, we should take it as relative to the directory we started
from, not relative to the top-level directory.

This adds a helper function "parse_options_fix_filename()" to make it more
convenient to fix this class of issues.  Ideally, parse_options() should
support a new type of option, "OPT_FILENAME", to do this uniformly, but
this patch is meant to go to 'maint' to fix it minimally.

One thing to note is that value for "commit template file" that comes from
the command line is taken as relative to $cwd just like other parameters,
but when it comes from the configuration varilable 'commit.template', it
is taken as relative to the working tree root as before.  I think this
difference actually is sensible (not that I particularly think
commit.template itself is sensible).

Signed-off-by: Junio C Hamano <redacted>
17 years agoMerge git://repo.or.cz/git-gui
Junio C Hamano [Wed, 6 Aug 2008 20:32:18 +0000 (13:32 -0700)]
Merge git://repo.or.cz/git-gui

* git://repo.or.cz/git-gui:
  git-gui: Adapt discovery of oguilib to execdir 'libexec/git-core'
  git-gui: add a part about format strings in po/README
  git-gui: update po/it.po
  git-gui: update Japanese translation
  git-gui: Update swedish translation.
  git-gui: Update git-gui.pot for 0.11 nearing release
  git-gui: Update German translation

17 years agoMerge git://git.kernel.org/pub/scm/gitk/gitk
Junio C Hamano [Wed, 6 Aug 2008 20:32:12 +0000 (13:32 -0700)]
Merge git://git.kernel.org/pub/scm/gitk/gitk

* git://git.kernel.org/pub/scm/gitk/gitk:
  gitk: Update swedish translation.
  gitk: Updated German translation
  gitk: Fallback to selecting the head commit upon load
  gitk: Fixed automatic row selection during load
  gitk: Fixed broken exception handling in diff
  gitk: On Windows, use a Cygwin-specific flag for kill
  gitk: Arrange to kill diff-files & diff-index on quit
  gitk: Kill back-end processes on window close

17 years agoMerge branch 'rs/archive-parse-options'
Junio C Hamano [Wed, 6 Aug 2008 20:31:38 +0000 (13:31 -0700)]
Merge branch 'rs/archive-parse-options'

* rs/archive-parse-options:
  archive: allow --exec and --remote without equal sign

17 years agofix diff-tree --stdin documentation
Junio C Hamano [Wed, 6 Aug 2008 05:32:28 +0000 (22:32 -0700)]
fix diff-tree --stdin documentation

Long time ago, the feature of "diff-tree --stdin" to take a commit and its
parents on one line was broken, and did not support the common:

    git rev-list --parents $commits... -- $paths... |
    git diff-tree --stdin -v -p

usage pattern by Porcelains properly.  For diff-tree to talk sensibly
about commits, it needs to see commits, not just trees; the code was fixed
to take list of commits on the standard input in 1.2.0.

However we left the documentation stale for a long time, until Karl
Hasselström finally noticed it very recently.

Signed-off-by: Junio C Hamano <redacted>
17 years agoOptimize sha1_object_info for loose objects, not concurrent repacks
Steven Grimm [Tue, 5 Aug 2008 20:08:41 +0000 (13:08 -0700)]
Optimize sha1_object_info for loose objects, not concurrent repacks

When dealing with a repository with lots of loose objects, sha1_object_info
would rescan the packs directory every time an unpacked object was referenced
before finally giving up and looking for the loose object. This caused a lot
of extra unnecessary system calls during git pack-objects; the code was
rereading the entire pack directory once for each loose object file.

This patch looks for a loose object before falling back to rescanning the
pack directory, rather than the other way around.

Signed-off-by: Steven Grimm <redacted>
Acked-by: Shawn O. Pearce <redacted>
Signed-off-by: Junio C Hamano <redacted>
17 years agoTeach fsck and prune that tmp_obj_ file names may not be 14 bytes long
Brandon Casey [Tue, 5 Aug 2008 18:01:50 +0000 (13:01 -0500)]
Teach fsck and prune that tmp_obj_ file names may not be 14 bytes long

As Shawn pointed out, not all temporary file creation routines can
ensure that the generated temporary file is of a certain length.
e.g. Java's createTempFile(prefix, suffix). So just depend on the
prefix 'tmp_obj_' for detection.

Update prune, and fix the "fix" introduced by a08c53a1 :)

Signed-off-by: Brandon "appendixless" Casey <redacted>
Acked-by: Shawn O. Pearce <redacted>
Signed-off-by: Junio C Hamano <redacted>
17 years agobash completion: Add completion for 'git mv'
Lee Marlow [Tue, 5 Aug 2008 05:50:38 +0000 (23:50 -0600)]
bash completion: Add completion for 'git mv'

Add completions for all long options specified in the docs
    --dry-run

Signed-off-by: Lee Marlow <redacted>
Acked-by: Shawn O. Pearce <redacted>
Signed-off-by: Junio C Hamano <redacted>
git clone https://git.99rst.org/PROJECT