Merge branch 'maint'

* maint:
  Update draft release notes for 1.6.0.2
  stash: refresh the index before deciding if the work tree is dirty
  Mention the fact that 'git annotate' is only for backward compatibility.
  "blame -c" should be compatible with "annotate"
  git-gui: Fix diff parsing for lines starting with "--" or "++"
  git-gui: Fix string escaping in po2msg.sh
  git gui: show diffs with a minimum of 1 context line
  git-gui: update all remaining translations to French.
  git-gui: Update french translation
This commit is contained in:
Junio C Hamano 2008-09-06 16:47:32 -07:00
commit 4a09bc9664
10 changed files with 544 additions and 455 deletions

View File

@ -18,19 +18,32 @@ Fixes since v1.6.0.1
with GIT_WORK_TREE environment settings.
* "git apply --unidiff-zero" incorrectly applied a -U0 patch that inserts
a new line before the second line.
* "git blame -c" did not exactly work like "git annotate" when range
boundaries are involved.
* "git clone $there $here/" with extra trailing slashes after explicit
local directory name $here did not work as expected.
* "git diff --dirstat -M" did not add changes in subdirectories up
correctly for renamed paths.
* "git diff --cumulative" did not imply "--dirstat".
* "git for-each-ref refs/heads/" did not work as expected.
* "git log --grep=pattern -i" did not ignore case.
* "git gui" allowed users to feed patch without any context to be applied.
* "git gui" botched parsing "diff" output when a line that begins with two
dashes and a space gets removed or a line that begins with two pluses
and a space gets added.
* "git gui" translation updates and i18n fixes.
* "git log -i --grep=pattern" did not ignore case; neither "git log -E
--grep=pattern" triggered extended regexp.
* "git log --pretty="%ad" --date=short" did not use short format when
showing the timestamp.
@ -38,6 +51,9 @@ Fixes since v1.6.0.1
* Build procedure for "git shell" that used stub versions of some
functions and globals was not understood by linkers on some platforms.
* "git stash" was fooled by a stat-dirty but otherwise unmodified paths
and refused to work until the user refreshed the index.
* "git verify-pack -v" did not work correctly when given more than one
packfile.
@ -45,6 +61,7 @@ Also contains many documentation updates.
--
exec >/var/tmp/1
O=v1.6.0.1-49-g6a42cfe
O=v1.6.0.1-61-g1eff26c
echo O=$(git describe maint)
git shortlog --no-merges $O..maint

View File

@ -14,6 +14,11 @@ DESCRIPTION
Annotates each line in the given file with information from the commit
which introduced the line. Optionally annotate from a given revision.
The only difference between this command and linkgit:git-blame[1] is that
they use slightly different output formats, and this command exists only
for backward compatibility to support existing scripts, and provide more
familiar command name for people coming from other SCM systems.
OPTIONS
-------
include::blame-options.txt[]

View File

@ -38,7 +38,6 @@ static int show_root;
static int reverse;
static int blank_boundary;
static int incremental;
static int cmd_is_annotate;
static int xdl_opts = XDF_NEED_MINIMAL;
static struct string_list mailmap;
@ -1682,7 +1681,7 @@ static void emit_other(struct scoreboard *sb, struct blame_entry *ent, int opt)
if (suspect->commit->object.flags & UNINTERESTING) {
if (blank_boundary)
memset(hex, ' ', length);
else if (!cmd_is_annotate) {
else if (!(opt & OUTPUT_ANNOTATE_COMPAT)) {
length--;
putchar('^');
}
@ -2313,8 +2312,7 @@ int cmd_blame(int argc, const char **argv, const char *prefix)
};
struct parse_opt_ctx_t ctx;
cmd_is_annotate = !strcmp(argv[0], "annotate");
int cmd_is_annotate = !strcmp(argv[0], "annotate");
git_config(git_blame_config, NULL);
init_revisions(&revs, NULL);
@ -2342,6 +2340,9 @@ int cmd_blame(int argc, const char **argv, const char *prefix)
parse_done:
argc = parse_options_end(&ctx);
if (cmd_is_annotate)
output_option |= OUTPUT_ANNOTATE_COMPAT;
if (DIFF_OPT_TST(&revs.diffopt, FIND_COPIES_HARDER))
opt |= (PICKAXE_BLAME_COPY | PICKAXE_BLAME_MOVE |
PICKAXE_BLAME_COPY_HARDER);

View File

@ -1932,7 +1932,7 @@ proc show_more_context {} {
proc show_less_context {} {
global repo_config
if {$repo_config(gui.diffcontext) >= 1} {
if {$repo_config(gui.diffcontext) > 1} {
incr repo_config(gui.diffcontext) -1
reshow_diff
}

View File

@ -175,7 +175,7 @@ proc show_diff {path w {lno {}} {scroll_pos {}}} {
lappend cmd -p
lappend cmd --no-color
if {$repo_config(gui.diffcontext) >= 0} {
if {$repo_config(gui.diffcontext) >= 1} {
lappend cmd "-U$repo_config(gui.diffcontext)"
}
if {$w eq $ui_index} {
@ -192,6 +192,7 @@ proc show_diff {path w {lno {}} {scroll_pos {}}} {
return
}
set ::current_diff_inheader 1
fconfigure $fd \
-blocking 0 \
-encoding binary \
@ -207,18 +208,21 @@ proc read_diff {fd scroll_pos} {
while {[gets $fd line] >= 0} {
# -- Cleanup uninteresting diff header lines.
#
if { [string match {diff --git *} $line]
|| [string match {diff --cc *} $line]
|| [string match {diff --combined *} $line]
|| [string match {--- *} $line]
|| [string match {+++ *} $line]} {
append current_diff_header $line "\n"
continue
if {$::current_diff_inheader} {
if { [string match {diff --git *} $line]
|| [string match {diff --cc *} $line]
|| [string match {diff --combined *} $line]
|| [string match {--- *} $line]
|| [string match {+++ *} $line]} {
append current_diff_header $line "\n"
continue
}
}
if {[string match {index *} $line]} continue
if {$line eq {deleted file mode 120000}} {
set line "deleted symlink"
}
set ::current_diff_inheader 0
# -- Automatically detect if this is a 3 way diff.
#

View File

@ -125,7 +125,7 @@ proc do_options {} {
{b gui.matchtrackingbranch {mc "Match Tracking Branches"}}
{b gui.fastcopyblame {mc "Blame Copy Only On Changed Files"}}
{i-20..200 gui.copyblamethreshold {mc "Minimum Letters To Blame Copy On"}}
{i-0..99 gui.diffcontext {mc "Number of Diff Context Lines"}}
{i-1..99 gui.diffcontext {mc "Number of Diff Context Lines"}}
{i-0..99 gui.commitmsgwidth {mc "Commit Message Text Width"}}
{t gui.newbranchtemplate {mc "New Branch Name Template"}}
} {

File diff suppressed because it is too large Load Diff

View File

@ -11,8 +11,8 @@ proc u2a {s} {
foreach i [split $s ""] {
scan $i %c c
if {$c<128} {
# escape '[', '\' and ']'
if {$c == 0x5b || $c == 0x5d} {
# escape '[', '\', '$' and ']'
if {$c == 0x5b || $c == 0x5d || $c == 0x24} {
append res "\\"
}
append res $i

View File

@ -39,6 +39,7 @@ clear_stash () {
create_stash () {
stash_msg="$1"
git update-index -q --refresh
if no_changes
then
exit 0
@ -101,6 +102,7 @@ save_stash () {
stash_msg="$*"
git update-index -q --refresh
if no_changes
then
echo 'No local changes to save'
@ -150,6 +152,7 @@ show_stash () {
}
apply_stash () {
git update-index -q --refresh &&
git diff-files --quiet --ignore-submodules ||
die 'Cannot restore on top of a dirty state'

View File

@ -488,4 +488,17 @@ test_expect_success 'cvs co -c (shows module database)' '
! grep -v "^master[ ]\+master$" < out
'
#------------
# CVS ANNOTATE
#------------
cd "$WORKDIR"
test_expect_success 'cvs annotate' '
cd cvswork &&
GIT_CONFIG="$git_config" cvs annotate merge >../out &&
sed -e "s/ .*//" ../out >../actual &&
for i in 3 1 1 1 1 1 1 1 2 4; do echo 1.$i; done >../expect &&
test_cmp ../expect ../actual
'
test_done