Fredrik points out there is a useful wrapper runProgram() used
everywhere that we can use to feed input into subprocess. Use
it to catch errors from the subprocess; it is a good cleanup as
well.
Signed-off-by: Junio C Hamano <junkio@cox.net>
This does two things.
- When one branch renamed and the other branch did not, the
resulting half-merged file in the working tree used to swap
branches around and showed as if renaming side was "ours".
This was confusing and inconsistent (even though the conflict
markers were marked with branch names, it was not a good
enough excuse). This changes the order of arguments to
mergeFile in such a case to make sure we always see "our"
change between <<< and ===, and "their" change between ===
and >>>.
- When both branches renamed to the same path, and when one
branch renamed and the other branch did not, we attempt
mergeFile. When this automerge conflicted, we used to
collapse the index. Now we use update-index --index-info
to inject higher stage entries to leave the index in unmerged
state for these two cases.
What this still does _not_ do is to inject unmerged state into
the index when the structural changes conflict. I have not
thought things through what to do in each case yet, but the
cases this commit cover are the most common ones, so this would
be a good start.
Signed-off-by: Junio C Hamano <junkio@cox.net>
This would help sorting by subject in MUA work saner even though
MUA is too dumb to attempt sorting numbered subjects sanely.
Signed-off-by: Junio C Hamano <junkio@cox.net>
People seem to be getting test failure from t6021 not becuase
git is faulty but because they forgot to install "merge". Check
this and other trivial pilot errors in the first test.
Signed-off-by: Junio C Hamano <junkio@cox.net>
In order to support getting data into git with scripts, this adds a
--stdin option to git-hash-object, which will make it read from stdin.
Signed-off-by: Daniel Barkalow <barkalow@iabervon.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Fix a stupid bug I introduced when splitting the
accurate and fast changeset appliers.
Also, remove an old debugging statement I added
Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Martin Langhoff <martin@catalyst.net.nz>
This fixes the case (that worked originally in Martin's version)
where the only new/modified files are Arch control files.
Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Martin Langhoff <martin@catalyst.net.nz>
And make it the default.
This includes stats tracking to verbose mode
Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Martin Langhoff <martin@catalyst.net.nz>
Better logfile parsing, no longer confused by 'headers' after the first
blank line.
Re-enabled tag-reading with abrowse (baz and tla compatible)
Remove need to quote args to external processes
Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Martin Langhoff <martin@catalyst.net.nz>
add -D <depth> option to abrowse add -a switch to attempt to
auto-register archives at mirrors.sourcecontrol.net
(ML: Also removes some std libraries no longer in use)
Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Martin Langhoff <martin@catalyst.net.nz>
use git-diff-files instead of git diff-files so we don't rely on the
wrapper being installed (some people may have git as GNU interactive
tools :)
Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Martin Langhoff <martin@catalyst.net.nz>
set TMPDIR env correctly if -t <tmpdir> is passed from the command-line.
setting TMPDIR => 1 as an argument to tempdir() has no effect otherwise
Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Martin Langhoff <martin@catalyst.net.nz>
use safe_pipe_capture() or system() over backticks where
shellquoting may have been necessary.
More changes planned, so I'm not touching the parts I'm
planning on replacing entirely.
Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Martin Langhoff <martin@catalyst.net.nz>
This is just a belts-and-suspenders check, but makes sure we
have both "git" and "git-init-db" built, executable, and
checking.
Signed-off-by: Junio C Hamano <junkio@cox.net>
This is to catch an error where tests are run without first
building what are being tested. Relying on prefixing $PATH with
the build directory and expect that the PATH mechanism would
find what we just built would silently run an already installed
binaries from the PATH.
Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Explicit <head> arguments to git-prune replaces, instead of
extends, the list of heads used for reachability analysis by
fsck-objects. By giving a subset of heads by mistake, objects
reachable only from other heads can be removed, resulting in a
corrupted repository.
This commit stops replacing the list of heads, and makes the
command line arguments to add to them instead for safety.
Signed-off-by: Junio C Hamano <junkio@cox.net>
This is a companion patch to e23eff8be9
commit. The same logic, the same rationale that a comparison
function that returns an int should not just compute a ptrdiff_t
and return it.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Not replacing but always including our own refs may be more
desirable (and unarguably much safer), but at the same time I
have a suspicion that that might be forbidding a useful usage I
haven't thought of, so...
Signed-off-by: Junio C Hamano <junkio@cox.net>
This adds documentation for the -l and -n options to git-repack.
Signed-off-by: Nikolai Weibull <nikolai@bitwi.se>
Signed-off-by: Junio C Hamano <junkio@cox.net>
-h and -t are aliases for --heads and --tags to git-ls-remote.
Signed-off-by: Nikolai Weibull <nikolai@bitwi.se>
Signed-off-by: Junio C Hamano <junkio@cox.net>
The documentation was lacking descriptions for the --signoff and --check
options to git-format-patch. It was also missing the following long
option-names: --output-directory (-o), --numbered (-n), --keep-subject
(-k), --author (-a), --date (-d), and --mbox (-m).
Signed-off-by: Nikolai Weibull <nikolai@bitwi.se>
Signed-off-by: Junio C Hamano <junkio@cox.net>
* Added the -e option to the documentation of git-cherry-pick.
* Added the -e and --no-commit option to git-revert.
* Removed redundant case expression for -n as --no-edit (already taken by
--no-commit).
Signed-off-by: Nikolai Weibull <nikolai@bitwi.se>
Signed-off-by: Junio C Hamano <junkio@cox.net>
The -- option has been added to the documentation of git-verify-pack.
Signed-off-by: Nikolai Weibull <nikolai@bitwi.se>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Added the following long options to documentation:
* --all
* --signoff
* --verify
* --no-verify
* --edit
Also added documentation for the -- option for terminating option parsing.
Signed-off-by: Nikolai Weibull <nikolai@bitwi.se>
Signed-off-by: Junio C Hamano <junkio@cox.net>
All descriptions of the '--' option were the same except for that in
Documentation/git-merge-index.txt.
Signed-off-by: Nikolai Weibull <nikolai@bitwi.se>
Signed-off-by: Junio C Hamano <junkio@cox.net>
The git-am script actually transform --utf8 and --keep to -u and -k when
sent to git-mailinfo.
Signed-off-by: Nikolai Weibull <nikolai@bitwi.se>
Signed-off-by: Junio C Hamano <junkio@cox.net>
This provides (minimal) documentation for the --non-empty command-line
option to the pack-objects command.
Signed-off-by: Nikolai Weibull <nikolai@bitwi.se>
Signed-off-by: Junio C Hamano <junkio@cox.net>
When calling post-update hook, don't leave stdin and stdout connected to
the pushing connection.
Signed-off-by: Daniel Barkalow <barkalow@iabervon.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Finish each sentence with a full stop.
Instead of saying 'directory index' 'directory cache' etc,
consistently say 'index'.
Signed-off-by: Junio C Hamano <junkio@cox.net>
This uses a table of encoding names and aliases distilled from
http://www.iana.org/assignments/character-sets plus some heuristics
to convert standard encoding names to ones that Tcl recognizes.
Signed-off-by: Paul Mackerras <paulus@samba.org>
The new merge world order tells the merge strategies to leave
the cache unmerged and store the automerge result in the working
tree if automerge is not clean. This was done for the resolve
strategy and recursive strategy when no rename is involved, but
recording a conflicting merge in the rename case could not
easily be done by the recursive strategy.
This commit adds a new input format, in addition to the exsting
two, to "update-index --index-info".
(1) mode SP sha1 TAB path
The first format is what "git-apply --index-info"
reports, and used to reconstruct a partial tree
that is used for phony merge base tree when falling
back on 3-way merge.
(2) mode SP type SP sha1 TAB path
The second format is to stuff git-ls-tree output
into the index file.
(3) mode SP sha1 SP stage TAB path
This format is to put higher order stages into the
index file and matches git-ls-files --stage output.
To place a higher stage entry to the index, the path should
first be removed by feeding a mode=0 entry for the path, and
then feeding necessary input lines in the (3) format.
For example, starting with this index:
$ git ls-files -s
100644 8a1218a1024a212bb3db30becd860315f9f3ac52 0 frotz
$ git update-index --index-info ;# interactive session -- input follows...
0 0000000000000000000000000000000000000000 frotz
100644 8a1218a1024a212bb3db30becd860315f9f3ac52 1 frotz
100755 8a1218a1024a212bb3db30becd860315f9f3ac52 2 frotz
The first line of the input feeds 0 as the mode to remove the
path; the SHA1 does not matter as long as it is well formatted.
Then the second and third line feeds stage 1 and stage 2 entries
for that path. After the above, we would end up with this:
$ git ls-files -s
100644 8a1218a1024a212bb3db30becd860315f9f3ac52 1 frotz
100755 8a1218a1024a212bb3db30becd860315f9f3ac52 2 frotz
This completes the groundwork for the new merge world order.
Signed-off-by: Junio C Hamano <junkio@cox.net>