Skip to content

git-gui: add config value gui.diffopts for passing additional diff options #8

Closed
wants to merge 1 commit into from

1 participant

@tvogel
tvogel commented Jan 21, 2011

This patch adds a new field "Additional Diff Parameters" to git gui, together with a corresponding config variable "gui.diffopts" with empty default. The contained parameters are included in the gui's calls to git diff.

My motivation was to be able to pass "-b" or "-w" to diff.

@tvogel
tvogel commented Jan 21, 2011

Sorry, forgot to sign-off. Will do it again and send the patch to the mailing list. Ignore if you like.

@tvogel
tvogel commented Jan 21, 2011

Ok, sign-off added and author email corrected.

@tvogel tvogel git-gui: add config value gui.diffopts for passing additional diff op…
…tions

Signed-off-by: Tilman Vogel <tilman.vogel@web.de>
379a0a8
@tvogel
tvogel commented Jan 21, 2011

Sent to git mailing list.

@jonseymour jonseymour pushed a commit to jonseymour/git that referenced this pull request Apr 23, 2011
@pclouds pclouds t1510: setup case #8
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
9a5976c
@gitster gitster added a commit that referenced this pull request May 17, 2011
@gitster gitster What's cooking (2011/05 #8) abb8411
@dscho dscho referenced this pull request in msysgit/git Sep 11, 2011
@avar avar tests: Infrastructure for Git smoke testing
Add the capability to send smoke reports from the Git test suite.

Currently we only notice bugs in the test suite when it's run
manually. Bugs in Git that only occur on obscure platforms or setups
that the core developers aren't using can thus go unnoticed.

This series aims to change that. With it, anyone that's interested in
avoiding bitrot in Git can volunteer to run a smoke tester. A smoke
tester periodically compiles the latest version of Git, runs the test
suite, and submits a report to a central server indicating how the
test run went.

A smoke tester might run something like this in cron:

    #!/bin/sh
    cd ~/g/git
    git fetch
    for branch in maint master next pu; do
        git checkout origin/$i &&
        make clean all &&
        cd t &&
        make smoke_report
    done

The smoker might want to compile git with non-default flags, include
bisecting functionality or run the tests under valgrind. Doing that is
outside the scope of this patch, this just adds a report submission
mechanism. But including a canonical smoke runner is something we'll
want to include eventually.

What this does now is add smoke and smoke_report targets to t/Makefile
(this example only uses a few tests for demonstration):

    $ make clean smoke
    rm -f -r 'trash directory'.* test-results
    rm -f t????/cvsroot/CVSROOT/?*
    rm -f -r valgrind/bin
    rm -f .prove
    perl ./harness --git-version="1.7.2.1.173.gc9b40" \
                    --no-verbose \
                    --archive="test-results/git-smoke.tar.gz" \
                    t0000-basic.sh t0001-init.sh t0002-gitfile.sh t0003-attributes.sh t0004-unwritable.sh t0005-signals.sh t0006-date.sh
    t0000-basic.sh ....... ok
    t0001-init.sh ........ ok
    t0002-gitfile.sh ..... ok
    t0003-attributes.sh .. ok
    t0004-unwritable.sh .. ok
    t0005-signals.sh ..... ok
    t0006-date.sh ........ ok
    All tests successful.

    Test Summary Report
    -------------------
    t0000-basic.sh     (Wstat: 0 Tests: 46 Failed: 0)
      TODO passed:   5
    Files=7, Tests=134,  3 wallclock secs ( 0.06 usr  0.05 sys +  0.23 cusr  1.33 csys =  1.67 CPU)
    Result: PASS

    TAP Archive created at /home/avar/g/git/t/test-results/git-smoke.tar.gz

The smoke target uses TAP::Harness::Archive to aggregate the test
results into a tarball. The tarball contains two things, the output of
every test file that was run, and a metadata file:

Tarball contents:

    $ tar xzvf git-smoke.tar.gz
    t0004-unwritable.sh
    t0001-init.sh
    t0002-gitfile.sh
    t0005-signals.sh
    t0000-basic.sh
    t0003-attributes.sh
    t0006-date.sh
    meta.yml

A test report:

    $ cat t0005-signals.sh
    ok 1 - sigchain works
    # passed all 1 test(s)
    1..1

A metadata file:

    ---
    extra_properties:
    file_attributes:
      -
        description: t0000-basic.sh
        end_time: 1280437324.61398
        start_time: 1280437324.22186
      -
        description: t0001-init.sh
        end_time: 1280437325.12346
        start_time: 1280437324.62393
      -
        description: t0002-gitfile.sh
        end_time: 1280437325.29428
        start_time: 1280437325.13646
      -
        description: t0003-attributes.sh
        end_time: 1280437325.59678
        start_time: 1280437325.30565
      -
        description: t0004-unwritable.sh
        end_time: 1280437325.77376
        start_time: 1280437325.61003
      -
        description: t0005-signals.sh
        end_time: 1280437325.85426
        start_time: 1280437325.78727
      -
        description: t0006-date.sh
        end_time: 1280437326.2362
        start_time: 1280437325.86768
    file_order:
      - t0000-basic.sh
      - t0001-init.sh
      - t0002-gitfile.sh
      - t0003-attributes.sh
      - t0004-unwritable.sh
      - t0005-signals.sh
      - t0006-date.sh
    start_time: 1280437324
    stop_time: 1280437326

The "extra_properties" hash is where we'll stick Git-specific info,
like whether Git was compiled with gettext or the fallback regex
engine, and what branch we're compiling. Currently no metadata like
this is included.

The entire tarball is then submitted to a central smokebox at
smoke.git.nix.is. This is done with curl(1) via the "smoke_report"
target:

    $ make smoke_report
    curl \
                    -H "Expect: " \
                    -F project=Git \
                    -F architecture=x86_64 \
                    -F platform=Linux \
                    -F revision="1.7.2.1.173.gc9b40" \
                    -F report_file=@test-results/git-smoke.tar.gz \
                    http://smoke.git.nix.is/app/projects/process_add_report/1 \
            | grep -v ^Redirecting
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100  117k  100    63  100  117k      3   6430  0:00:21  0:00:18  0:00:03     0
    Reported #8 added.

Reports are then made available on the smokebox via a web interface:

    http://smoke.git.nix.is/app/projects/smoke_reports/1

The smoke reports are also mirrored to a Git repository hosted on
GitHub:

    http://github.com/gitsmoke/smoke-reports

The Smolder SQLite database that contains metadata about the reports
is also made available:

    http://github.com/gitsmoke/smoke-database

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
f9033d0
@erdavila erdavila pushed a commit that referenced this pull request Sep 13, 2011
@gitster gitster What's cooking (2010/01 #8) 25fdd77
@gitster gitster added a commit that referenced this pull request Sep 29, 2011
@gitster gitster What's cooking (2011/09 #8) 19f396b
@gitster gitster added a commit that referenced this pull request Oct 21, 2011
@gitster gitster What's cooking (2011/10 #8) ea64bed
@gitster gitster added a commit that referenced this pull request Dec 22, 2011
@gitster gitster What's cooking (2011/12 #8) 6a7057e
@avar avar referenced this pull request in TortoiseGit/tgit Jan 13, 2012
@avar avar tests: Infrastructure for Git smoke testing
Add the capability to send smoke reports from the Git test suite.

Currently we only notice bugs in the test suite when it's run
manually. Bugs in Git that only occur on obscure platforms or setups
that the core developers aren't using can thus go unnoticed.

This series aims to change that. With it, anyone that's interested in
avoiding bitrot in Git can volunteer to run a smoke tester. A smoke
tester periodically compiles the latest version of Git, runs the test
suite, and submits a report to a central server indicating how the
test run went.

A smoke tester might run something like this in cron:

    #!/bin/sh
    cd ~/g/git
    git fetch
    for branch in maint master next pu; do
        git checkout origin/$i &&
        make clean all &&
        cd t &&
        make smoke_report
    done

The smoker might want to compile git with non-default flags, include
bisecting functionality or run the tests under valgrind. Doing that is
outside the scope of this patch, this just adds a report submission
mechanism. But including a canonical smoke runner is something we'll
want to include eventually.

What this does now is add smoke and smoke_report targets to t/Makefile
(this example only uses a few tests for demonstration):

    $ make clean smoke
    rm -f -r 'trash directory'.* test-results
    rm -f t????/cvsroot/CVSROOT/?*
    rm -f -r valgrind/bin
    rm -f .prove
    perl ./harness --git-version="1.7.2.1.173.gc9b40" \
                    --no-verbose \
                    --archive="test-results/git-smoke.tar.gz" \
                    t0000-basic.sh t0001-init.sh t0002-gitfile.sh t0003-attributes.sh t0004-unwritable.sh t0005-signals.sh t0006-date.sh
    t0000-basic.sh ....... ok
    t0001-init.sh ........ ok
    t0002-gitfile.sh ..... ok
    t0003-attributes.sh .. ok
    t0004-unwritable.sh .. ok
    t0005-signals.sh ..... ok
    t0006-date.sh ........ ok
    All tests successful.

    Test Summary Report
    -------------------
    t0000-basic.sh     (Wstat: 0 Tests: 46 Failed: 0)
      TODO passed:   5
    Files=7, Tests=134,  3 wallclock secs ( 0.06 usr  0.05 sys +  0.23 cusr  1.33 csys =  1.67 CPU)
    Result: PASS

    TAP Archive created at /home/avar/g/git/t/test-results/git-smoke.tar.gz

The smoke target uses TAP::Harness::Archive to aggregate the test
results into a tarball. The tarball contains two things, the output of
every test file that was run, and a metadata file:

Tarball contents:

    $ tar xzvf git-smoke.tar.gz
    t0004-unwritable.sh
    t0001-init.sh
    t0002-gitfile.sh
    t0005-signals.sh
    t0000-basic.sh
    t0003-attributes.sh
    t0006-date.sh
    meta.yml

A test report:

    $ cat t0005-signals.sh
    ok 1 - sigchain works
    # passed all 1 test(s)
    1..1

A metadata file:

    ---
    extra_properties:
    file_attributes:
      -
        description: t0000-basic.sh
        end_time: 1280437324.61398
        start_time: 1280437324.22186
      -
        description: t0001-init.sh
        end_time: 1280437325.12346
        start_time: 1280437324.62393
      -
        description: t0002-gitfile.sh
        end_time: 1280437325.29428
        start_time: 1280437325.13646
      -
        description: t0003-attributes.sh
        end_time: 1280437325.59678
        start_time: 1280437325.30565
      -
        description: t0004-unwritable.sh
        end_time: 1280437325.77376
        start_time: 1280437325.61003
      -
        description: t0005-signals.sh
        end_time: 1280437325.85426
        start_time: 1280437325.78727
      -
        description: t0006-date.sh
        end_time: 1280437326.2362
        start_time: 1280437325.86768
    file_order:
      - t0000-basic.sh
      - t0001-init.sh
      - t0002-gitfile.sh
      - t0003-attributes.sh
      - t0004-unwritable.sh
      - t0005-signals.sh
      - t0006-date.sh
    start_time: 1280437324
    stop_time: 1280437326

The "extra_properties" hash is where we'll stick Git-specific info,
like whether Git was compiled with gettext or the fallback regex
engine, and what branch we're compiling. Currently no metadata like
this is included.

The entire tarball is then submitted to a central smokebox at
smoke.git.nix.is. This is done with curl(1) via the "smoke_report"
target:

    $ make smoke_report
    curl \
                    -H "Expect: " \
                    -F project=Git \
                    -F architecture=x86_64 \
                    -F platform=Linux \
                    -F revision="1.7.2.1.173.gc9b40" \
                    -F report_file=@test-results/git-smoke.tar.gz \
                    http://smoke.git.nix.is/app/projects/process_add_report/1 \
            | grep -v ^Redirecting
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100  117k  100    63  100  117k      3   6430  0:00:21  0:00:18  0:00:03     0
    Reported #8 added.

Reports are then made available on the smokebox via a web interface:

    http://smoke.git.nix.is/app/projects/smoke_reports/1

The smoke reports are also mirrored to a Git repository hosted on
GitHub:

    http://github.com/gitsmoke/smoke-reports

The Smolder SQLite database that contains metadata about the reports
is also made available:

    http://github.com/gitsmoke/smoke-database

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
b6b84d1
@gitster gitster added a commit that referenced this pull request Feb 1, 2012
@gitster gitster What's cooking (2012/01 #8) 15445e7
@sunny256 sunny256 pushed a commit to sunny256/git that referenced this pull request Feb 23, 2012
@gitster gitster What's cooking (2012/02 #8) d1ebe84
@gitster gitster added a commit that referenced this pull request Mar 28, 2012
@gitster gitster What's cooking (2012/03 #8) 5b1049d
@jnareb jnareb pushed a commit to jnareb/git that referenced this pull request Apr 21, 2012
Junio C Hamano What's cooking (2012/04 #8) 25f444d
@gitster gitster added a commit that referenced this pull request Jun 28, 2012
@gitster gitster What's cooking (2012/06 #8) bc1ab86
@gitster gitster added a commit that referenced this pull request Jul 27, 2012
@gitster gitster What's cooking (2012/07 #8) 98c759d
@gitster gitster added a commit that referenced this pull request Aug 28, 2012
@gitster gitster What's cooking (2012/08 #8) 29acbf5
@gitster gitster added a commit that referenced this pull request Sep 24, 2012
@gitster gitster What's cooking (2012/09 #8) d208190
@peff peff added a commit to peff/git that referenced this pull request Oct 25, 2012
@peff peff What's cooking (2012/10 #8) 8bc2e84
@gitster gitster added a commit that referenced this pull request Nov 29, 2012
@gitster gitster What's cooking (2012/11 #8) d4b03c3
@gitster gitster added a commit that referenced this pull request Jan 1, 2013
@gitster gitster What's cooking (2012/12 #8) 0271b1b
@gitster gitster added a commit that referenced this pull request Jan 22, 2013
@gitster gitster What's cooking (2013/01 #8) d93fe0c
@gitster gitster added a commit that referenced this pull request Feb 20, 2013
@gitster gitster What's cooking (2013/02 #8) ae46ec3
@gitster gitster added a commit that referenced this pull request Mar 29, 2013
@gitster gitster What's cooking (2013/03 #8) cf3e4ee
@gitster gitster added a commit that referenced this pull request Apr 23, 2013
@gitster gitster What's cooking (2013/04 #8) 35e1dc2
@gitster gitster added a commit that referenced this pull request May 28, 2013
@gitster gitster What's cooking (2013/05 #8) 01f7ee5
@gitster gitster added a commit that referenced this pull request Jun 25, 2013
@gitster gitster What's cooking (2013/06 #8) e81ad98
@gitster gitster added a commit that referenced this pull request Jul 22, 2013
@gitster gitster What's cooking (2013/07 #8) bf8fd10
@sunny256 sunny256 pushed a commit to sunny256/git that referenced this pull request Sep 26, 2013
@jrn jrn What's cooking (2013/09 #8) 27f3d73
@gitster gitster added a commit that referenced this pull request Oct 30, 2013
@gitster gitster What's cooking (2013/10 #8) 1b91ac6
@gitster gitster added a commit that referenced this pull request Mar 17, 2014
@gitster gitster Merge branch 'pw/branch-config-message' into jch
Among the many attempts to microproject #8, this seemed to be the
most "done" among the table based ones; I however tend to think
that the original with minimum refactoring would be easier to read.

* pw/branch-config-message:
  install_branch_config(): simplify verbose messages logic

# Conflicts:
# 	branch.c
5b16ad9
@gitster gitster added a commit that referenced this pull request Mar 18, 2014
@gitster gitster Merge branch 'pw/branch-config-message' into jch
Among the many attempts to microproject #8, this seemed to be the
most "done" among the table based ones; I however tend to think
that the original with minimum refactoring would be easier to read.

* pw/branch-config-message:
  install_branch_config(): simplify verbose messages logic

# Conflicts:
# 	branch.c
067ec5d
@gitster gitster added a commit that referenced this pull request Mar 18, 2014
@gitster gitster Merge branch 'pw/branch-config-message' into jch
Among the many attempts to microproject #8, this seemed to be the
most "done" among the table based ones; I however tend to think
that the original with minimum refactoring would be easier to read.

* pw/branch-config-message:
  install_branch_config(): simplify verbose messages logic

# Conflicts:
# 	branch.c
82c289c
@gitster gitster added a commit that referenced this pull request Mar 19, 2014
@gitster gitster Merge branch 'pw/branch-config-message' into jch
Among the many attempts to microproject #8, this seemed to be the
most "done" among the table based ones; I however tend to think
that the original with minimum refactoring would be easier to read.

* pw/branch-config-message:
  install_branch_config(): simplify verbose messages logic

# Conflicts:
# 	branch.c
55d1f07
@gitster gitster added a commit that referenced this pull request Mar 20, 2014
@gitster gitster Merge branch 'pw/branch-config-message' into jch
Among the many attempts to microproject #8, this seemed to be the
most "done" among the table based ones; I however tend to think
that the original with minimum refactoring would be easier to read.

* pw/branch-config-message:
  install_branch_config(): simplify verbose messages logic

# Conflicts:
# 	branch.c
bc7979a
@gitster gitster added a commit that referenced this pull request Mar 20, 2014
@gitster gitster Merge branch 'pw/branch-config-message' into jch
Among the many attempts to microproject #8, this seemed to be the
most "done" among the table based ones; I however tend to think
that the original with minimum refactoring would be easier to read.

* pw/branch-config-message:
  install_branch_config(): simplify verbose messages logic

# Conflicts:
# 	branch.c
04065b3
@gitster gitster added a commit that referenced this pull request Mar 21, 2014
@gitster gitster Merge branch 'pw/branch-config-message' into jch
Among the many attempts to microproject #8, this seemed to be the
most "done" among the table based ones; I however tend to think
that the original with minimum refactoring would be easier to read.

* pw/branch-config-message:
  install_branch_config(): simplify verbose messages logic

# Conflicts:
# 	branch.c
25a96c9
@gitster gitster added a commit that referenced this pull request Apr 1, 2014
@gitster gitster What's cooking (2014/03 #8) a8bbd00
@gitster gitster added a commit that referenced this pull request Apr 25, 2014
@gitster gitster What's cooking (2014/04 #8) 7152a42
@gitster gitster added a commit that referenced this pull request Sep 29, 2014
@gitster gitster What's cooking (2014/09 #8) 8e87c5b
@gitster gitster added a commit that referenced this pull request Nov 5, 2014
@gitster gitster What's cooking (2014/10 #8) 55ef5f0
@gitster gitster added a commit that referenced this pull request Mar 6, 2015
@gitster gitster Post 2.3 cycle (batch #8)
Signed-off-by: Junio C Hamano <gitster@pobox.com>
d67f9d5
@gitster gitster added a commit that referenced this pull request Mar 6, 2015
@gitster gitster Sync with master
* master:
  Post 2.3 cycle (batch #8)
  Git 2.3.2
9704172
@xiongyan xiongyan pushed a commit that referenced this pull request Mar 13, 2015
@gitster gitster Post 2.3 cycle (batch #8)
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4eac23a
@gitster gitster added a commit that referenced this pull request Mar 23, 2015
@gitster gitster What's cooking (2015/03 #8) 77ac1a0
@gitster gitster added a commit that referenced this pull request May 29, 2015
@gitster gitster What's cooking (2015/05 #8) edb72b0
@gitster gitster added a commit that referenced this pull request Jul 31, 2015
@gitster gitster What's cooking (2015/07 #8) 9864e9c
@gitster gitster added a commit that referenced this pull request Feb 26, 2016
@gitster gitster What's cooking (2016/02 #8) 5904532
@pclouds pclouds added a commit to pclouds/git that referenced this pull request Mar 24, 2016
@pclouds pclouds environment.c: setup git_common_dir automatically if needed
In the case when .git is detected, setup_discovered_git_dir() will not
call set_git_dir() and expect setup_git_env() to be called when
get_git_dir() is first used. If get_git_common_dir() is called first,
it'll return NULL because it's setup at the same time git_dir is
setup. Call setup_git_env() to avoid this dependency.

This can be triggered from reading pager config with this stack trace

    #0  get_git_common_dir
    #1  do_git_common_path
    #2  git_common_path
    #3  git_common_config_path
    #4  git_config_with_options
    #5  git_config_raw
    #6  git_config_check_init
    #7  git_config_get_value
    #8  check_pager_config
    #9  run_builtin
    #10 handle_builtin
    #11 run_argv
    #12 main
7d42b11
@gitster gitster added a commit that referenced this pull request Apr 29, 2016
@gitster gitster What's cooking (2016/04 #8) 712652b
@pclouds pclouds added a commit to pclouds/git that referenced this pull request May 9, 2016
@pclouds pclouds environment.c: setup git_common_dir automatically if needed
In the case when .git is detected, setup_discovered_git_dir() will not
call set_git_dir() and expect setup_git_env() to be called when
get_git_dir() is first used. If get_git_common_dir() is called first,
it'll return NULL because it's setup at the same time git_dir is
setup. Call setup_git_env() to avoid this dependency.

This can be triggered from reading pager config with this stack trace

    #0  get_git_common_dir
    #1  do_git_common_path
    #2  git_common_path
    #3  git_common_config_path
    #4  git_config_with_options
    #5  git_config_raw
    #6  git_config_check_init
    #7  git_config_get_value
    #8  check_pager_config
    #9  run_builtin
    #10 handle_builtin
    #11 run_argv
    #12 main
55354ab
@gitster gitster added a commit that referenced this pull request May 26, 2016
@gitster gitster What's cooking (2016/05 #8) c32e74b
@gitster gitster added a commit that referenced this pull request Jun 23, 2016
@gitster gitster What's cooking (2016/06 #8) f10cb13
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.